You are on page 1of 3

1.1.

PRE-LAB:
1. What are the two types of LED 7-Segment displays?
There are two types of LED 7-segment displays: common cathode (CC) and common anode
(CA). The difference between the two displays is the common cathode has all the cathodes
of the 7-segments connected directly together and the common anode has all the anodes of
the 7-segments connected together. Shown below is a common anode seven segment.

As shown above all the anode segments are connected together. When working with a CA
seven segment display, power must be applied externally to the the anode connection that
is common to all the segments.Then by applying a ground to a particular segment
connection (a-g), the appropriate segment will light up. An additional resistor must be
added to the circuit to limit the amount of current flowing thru each LED segment.

A common cathode seven segment is different from a common anode segment in that the
cathodes of all the LEDs are connected together. For the use of this seven segment the
common cathode connection must be grounded and power must be applied to appropriate
segment in order to illuminate that segment.

2. Define logic value for the variable defined in Verilog code?


Variables
A variable on the other hand is an abstraction of a data storage element and can hold
values. A flip-flop is a good example of a storage element. Verilog data-type reg can be used
to model hardware registers since it can hold values between assignments. Note that a reg
need not always represent a flip-flop because it can also be used to represent combinational
logic. In the image shown on the left, we have a flip-flop that can store 1 bit and the flip-flop
on the right can store 4-bits.

3. What is the key word for Continuous assignments?


Procedural Continuous Assignments
Formal Definition
Procedural continuous assignments provide a means to continuously drive a value into a
register or a net.
Simplified Syntax
assign register_assignment ;
deassign register_left_value ;
force register_assignment | net_assignment ;
release register_left_value | net_left_value ;
register_left_value - left hand-side operand ;
net_left_value - left hand-side operand ;
Description
In the assign statement, the left hand-side operand can be a register or a concatenation of
registers in contrast to continuous assignments where the left hand-side operands are nets.
However, the memory word, bit-select or part-select cannot be used on the left hand-side.
The priority of procedural continuous assignment is higher than that of the procedural
assignments. The deassign keyword informs the end of the driving of the corresponding
register. After a deassign, register values remain the same until driven by another
procedural or procedural continuous assignment. If the assign keyword is used a second
time for the same register, the first register will be deassigned and a new procedural
continuous assignment statement takes place. The keywords force and release have the
same effect as assign and deassign; however the left hand-side moperand should be a net or
a bit-select or a part-select of vector net or concatenation of both. It cannot be part select
or bit-select of a vector register or a memory word. An assign declared as a force overrides
all procedural assignments to the register until the release statement is executed. In the
same way, if a net is driven by a procedural continuous assignment all previous assignments
are overridden until the release statement is executed. In the register case, the value will be
maintained to the next procedural continuous assignment.

You might also like