I have difficulty understanding how the delay (mainly inertial delay: AFTER) mechanism works in VHDL. I'll start with this:

target <= waveform AFTER 3 NS;

As long as waveform is a pulse longer than 3ns it only gets delayed by 3ns, else nothing appears on target. But that's just the result of how VHDL interprets the above signal assignment. I want to know what exactly happens there! For example what happens if we have a conditional assignment defining waveform itself, like this:

waveform <= '1' AFTER 2 NS WHEN (waveform = '0' AND NOW < 10 NS)
                           ELSE '0' AFTER 5 NS;

(I got a bit carried away writing the condition!), What I mean is which time and value for waveform are taken into account when evaluating the condition to assign waveform to target. Or is waveform simply evaluated (drawn) to obtain an actual WAVEFORM and then applied to target as I said above (shorter than 3ns gets thrown away, otherwise just shifts 3ns); [I know its obviously not the second way, just wanted to make my point.]


1 Answer 1


VHDL has two delay mechanisms: Transport and Inertial Delay mechanisms.

delay_mechanism ⇐ transport | [ reject time_expression ] inertial

If you simply write:

delay_mechanism <= time_expression

The VHDL translator will assume it's a "inertial" delay mechanism.

Transport delay mechanism is used to model an ideal device with infinite frequency response, what in what out. The waveform only is delayed, no matter how short your input pulses are.

Inertial delay mechanism mimic the real world. In reality, most electronic circuits don't have infinite frequency response, so model them using 'transport delay mechanism' may not be appropriate. Just imagine a RC filter, if your input pulse is very short, you may not see the pulse from the output. So, inertial delay is the mechanism used by default in a signal assignment. Your first model will 'filter' any pulse shorter than 3ns. For pulses wider than 3ns, it will delay them.

In the second model, if 'waveform' is in your process's sensitivity-list, every time 'waveform' has a change event, a new transaction will be scheduled, and the output changes after the delay time. It's just when 'waveform' changes, a new change is scheduled.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.