Search code examples
vhdl

event and transaction in vhdl(timing diagram)


I tried to solve the problem, but I got a different table than the table that xilinx shows. I attatched both my answer and real answer. Xilinx shows that "out" is 'U' until 36ns, after 36ns, it is '1'. Can anyone help me about why the "out" graphics is not assigned any value before 36ns?(I think it should be assigned first at 20 ns). my answer question


Solution

  • This turned out to be a really good question. I initially thought you had done something wrong when simulating, but then I ran my own simulation and got the same result.

    It turns out that the a <= b after x assignment uses something called the "inertial time model" by default. In this mode scheduled events will be cancelled if b changes again before x time has passed. The purpose is to filter pulses shorter than the specified delay. In your case this is what the simulator will do:

    • At t=0, out is scheduled to change to 1 at t=20.
    • At t=12, tem1 or tem2 changes to 0. The scheduled change at t=20 is cancelled and a new change to 0 is scheduled at t=32.
    • At t=16, tem1 or tem2 changes back to 1. Again the scheduled change is cancelled and a new change is scheduled at t=36.
    • After this tem1 or tem2 remains at 1, so the change at t=36 is executed and out finally changes from U.

    You can change to the "transport delay model" using out <= transport tem1 or tem2 after 20 ns; In this case your drawn waveform will match with simulation.