I am new to Modelsim. I have a processor. In this module clock cycle is 40 ps and I simulate the project with 20 ps speed.
forever #20 clk=~clk;
I have added some variables to the list to be able to see their values in each cycle. But I've realized that there are ps and delta values that occur after one clock cycle.
This is created after 80 ps.
This is created 40 ps later.(One clock cycle)
See there are +1 +2 +3 +4. I assume they are related to some time value but couldn't understand exactly. I know that in each @nedege (towards 0,from 1 to 0) pc is loaded. My question is why do I see different number of clock cycle times.(For 0 there are 5 rows, for 20 there is only one,for 40 there 2 and so on)
Why are their occurrances in the list view different? Because from my perspective when clock is changed from 1 to 0 current instruction is loaded. But in the image as you can see -in 40ps rows- current instruction is different. The one with +1 is current instruction but the one with +2 is next instruction.
And what is the meaning of these delta values? As far as I know, there are 3 different timing control in Modelsim(delay-based timing control,event-based timing control,level-sensetive timing control). I guess I am using delay-based timing control by using @posedge and @nededge keywords.
In Verilog simulators time evolves from event to event, so they are called event-driver simulators.
Actually execution evolves through a number of region where events are scheduled to advance simulation. What you are seeing is the evolution from one delta-delay to another in the same cycle.
At 20ps, probably it's happening the clock negedge and no events are scheduled further.
At 40ps, probably it's happening the posedge of clock. This event has effect on all signals that are waiting for @posedge and that have to be updated. So the scheduler adds some events to the event-queue, one each signal, and after minimum time advance (+ 1 delta delay), the simulator evaluates the highest priority one.
Delta-delay is the minimum timeunit advance possible. If you print all signals in your design, you can check which one is updated at each event.
Remember that evolution inside same cycle could be not deterministic.
More info can be found here: https://electronics.stackexchange.com/q/99223