| 
 
  
  
  
  
  
   |  |   Verilog 
Projects with GAL PLDs
   IntroductionIn this last lab dealing with GAL programmable logic devices, you will gain 
experience using Verilog (instead of ABEL) as the method for describing your 
circuit design to the CAD tools. Objective
  |  | Implement simple combinational and sequential circuits on GAL PLDs using 
  Verilog |  Parts ListEquipment
  |  | Agilent 54622D mixed-signal oscilloscope (MSO) |  |  | Digital probes for MSO |  |  | Agilent 33120A function/arbitrary waveform generator |  |  | Fixed 5-volt power supply |  |  | Breadboard |  
 Prelab
  Study the on-line documentation for procedures for implementing a Verilog-based 
  design on a GAL programmable logic device (see ECE333 web page, “Resources” 
  section, then PLD Design Flow: GAL, Verilog). Note that the procedure is very 
  similar to the ABEL-based method, but significant differences exist in setting 
  up the project, assigning pin locations, and applying test vectors.
Write, enter, and simulate a bit counter specified as follows: 
   
    |  | Accepts a 5-bit input |  |  | Produces a 3-bit output |  |  | The output is the binary representation of the number of input bits that 
    are “1”. |  |  | Example: the input “10110” produces the output “011” (three). |  NOTE: You will need to use the version of ispLEVER that is installed in 
  B-200. Verilog synthesis appears to be disabled in the "Starter Kit" version. 
  Analyze the sequential circuit described in Verilog below so that you can 
  draw the gate-level equivalent circuit (individual flip-flops, gates, and 
  wires): 
  
     module WhatIsIt (C,R,Q);
   input C,R;
   output [2:0] Q;
   reg [2:0] Q;
   always @ (posedge C or posedge R)
      if (R)
         Q <= 3'b1;
      else
         Q <= {Q[2]^Q[0],Q[2],Q[1]};
endmodule
  Your lab notebook pages should include all your work, including Verilog 
  descriptions, simulation test vectors, and simulation waveforms.
A photocopy of your prelab pages is due at the beginning of the class the day 
  before lab. LabPlease use the  
Lab Help Queue to request assistance in lab. 
  Implement and test your bit counter using five bits of your 74HC4040 as 
  the input. Explain your test method and evaluate your results.
Demonstrate your bit counter to the instructor.
Implement and test the sequential circuit. Propose an explanation for the 
  behavior of this circuit. Suggest a possible use for this circuit.
Demonstrate your sequential circuit to the instructor.
 All done!
  |  | Clean up your work area |  |  | Remember to submit your lab notebook for grading at the beginning of next 
  week's lab |    |