Reputation: 209
I found two different sources that explain inertial delay in Verilog HDL in two different ways.
1) The first one says that any input signal shorter than the specified delay will be ignored.
2) The second one says that, given a change at one of the inputs, the output signal will be evaluated at the scheduled time using the values of the input signal at that time.
For example: Consider a delayed buffer
assign #4 out = in;
initial
begin
in = 0;
#5 in = 1;
#1 in = 0;
#1 in = 1;
end
If we monitor the signals, this would result in
0 5 6 7 8 9 10 11
| | | | | | | |
__ _________________
in _________| |__|
_____
out1) XXXXXXX____________________|
___________
out2) XXXXXXX______________|
out1) ignored the input (5,6) pulse in "up" and the (6,7) pulse in "down" state for being too short in time, only 1 time unit. But then "in" stayed up long enough (7,11) and thus out changed at 11.
out2) scheduled an evaluation at time step 9, because the input changed at time 5. Similarly at times 10 and 11 for "in" having changed at times 6 and 7 respectively. So, at times 9, 10 and 11, "out" takes the current value of "in" at these times, which is always "up" in this case.
Which evaluation is the right one?
Upvotes: 4
Views: 13289
Reputation: 1816
I would suggest you to look at the following links to get a good idea of how to implement inertial delay and transport delay in Verilog:
Upvotes: 1