Académique Documents
Professionnel Documents
Culture Documents
lec13.tex 1
The first section includes a number of statements the input variables are specified as 0, 1, X (don’t
to identify the design. The last statement of this sec- care), and C for a low-high-low clock pulse. The
tion gives a code to identify the device we will use. values of the outputs are given as the logic levels H
In this course we will use G16V8. Note that each or L.
statement ends with a semicolon.
The second section of the file uses PIN statements
to assign symbolic names to the input and output
CUPL and CSIM Examples
pins. The 16V8 is a 20-pin package with 16 inputs
The listings show the CUPL and CSIM input and
and 8 outputs (each output is also available as an in-
output files for a simple sequential logic circuit.
put). Pins 1 to 9 and 11 are inputs while pins 12 to
19 can be used as inputs or outputs. If an input is to
Name Lab4 ;
be used to clock flip-flops it must be on pin 1. Vari- PartNo 0 ;
able names are case sensitive and should begin with Date 19/3/98 ;
a letter. Rev 1 ;
Designer Ed Casas ;
The final section gives the logic equations that de- Company UBC ECE ;
fine the outputs (or register inputs) as functions of Assembly 0 ;
Location 0 ;
the inputs. The operators !, &, # and $ correspond Device g16v8 ;
to NOT, AND, OR and XOR. If an output variable
Pin 1 = clk ; /* clock */
is to be a registered output, the .D extension must be Pin 2 = show ; /* display enable */
added to the output variable name so that the expres- Pin 19 = q2 ; /* state FFs */
sion applies to the D input of the output flip-flop. Pin 18 = q1 ;
Pin 17 = q0 ;
Pin 16 = out2 ; /* outputs */
Pin 15 = out1 ;
Simulation using CSIM Pin 14 = out0 ;