Presentation 4
Presentation 4
• Types of Delays:
• Inertial delay
• Transport delay
• Net delay
Delays in Verilog (continued)
Inertial delay: intended to model gates and other devices that
do not propagate short pulses from the input to the output.
• An input pulse that is shorter than the delay of the
assignment does not propagate to the output. This feature is
called inertial delay.
• If a gate has an ideal inertial delay T, in addition to delaying
the input signals by time T, any pulse with a width less than
T is rejected.
For example, if a gate has an inertial delay of 5 ns, a pulse
width 5ns would pass through, but a pulse of width 4.999 ns
would be rejected.
Delays in Verilog (continued)
2-4
Delays in Verilog (continued)
• The delay in the statement Z1 <= #10 X; is called intra-
assignment delay. The expression on the right hand side is
evaluated but not assigned to Z1 until the delay has elapsed
(also called delayed assignment).
• In a statement like #10 Z1 <= X; the delay of #10 elapses first
and then the expression is evaluated and assigned to Z1 (also
called delayed evaluation).
Delays in Verilog (continued)
Net delay: refers to the time it takes from any driver on the net
to change value to the time when the net value is updated
and propagated further.
The assign statement for D works with a 7ns inertial delay and
rejects any pulse below 7ns.
Hence D rejects the 3ns, 2ns and 5ns pulses in Y. The 3ns net
delay from the wire statement is added to the signal that comes
out from the assign statement.
In the case of E, pulses below 3 ns are rejected. Hence the 3 ns
pulse in Y passes through the assign statement for E, the 2 ns
pulse is rejected and the 5ns pulse is accepted. Hence the 3 ns
and 5 ns pulses get combined in the absence of the 2ns pulse to
yield output on E appears as a big 10ns pulse.
Compilation, Simulation, and
Synthesis of Verilog Code
• Three phases in the simulation of Verilog code:
analysis (compilation), elaboration, and
simulation:
2-11
Compilation, Simulation, and Synthesis of Verilog
Code (continued)
• Verilog event queue is divided into five regions:
– 1. Active event region: events that occur at the current
simulation time.
– 2. Inactive event region: events that occur at the current
simulation time but that shall be processed after all the
active events are processed.
– 3. Non-blocking assign update region: events that have
been evaluated during some previous simulation time but
that shall be assigned at this simulation time after all the
active and inactive events are processed.
– 4. Monitor event region: events that shall be processed after
all the active, inactive, and non-blocking assign update
events are processed. 2-12
– 5. Future event region: events that occur at some future
simulation time are in this region.
When each Verilog statement is processed, events are added to the various
queue regions according to the following convention for each type of
statement:
i. Continuous assignment—evaluate RHS and add to active region as an
active update event.
ii. Procedural continuous assign—evaluate RHS and add to active region as
an update event.
iii. Blocking assignment with delay—compute RHS and put into future
event region for time after delay.
iv. Blocking assignment with no delay—compute RHS and put into inactive
region for current time.
v. Non-blocking assignment with no delay—compute RHS and schedule as
non-blocking assign update event for current time if zero delay.
vi. Non-blocking assignment with delay—compute RHS and schedule as
nonblocking assign update event for future time if zero delay.
vii. $monitor and $strobe system tasks—create monitor events for these
system tasks. (These events are continuously reenabled in every successive
time step.)
Compilation, Simulation, and Synthesis of Verilog Code
(continued)
2-14
Compilation, Simulation, and Synthesis of Verilog Code
(continued)
2-16
Verilog Data Types and Operators (continued)
2-17
Verilog Data Types and Operators (continued)
2-18
Verilog Data Types and Operators (continued)