i have a testbench which states at the top:
'timescale 1 ns/ 1 ps
a clock which is defined as:
always begin
#5 sys_clk = ~sys_clk;
#20 clk_in = ~clk_in;
#8 clk_acq = ~clk_asq;
end
run the simulation using a do file: vsim in do file
but the clock period in ModelSim waveform, when measured by the cursor, is:66ns and not 10ns clock waveform any idea?
I don't really understand what causes this behavior.
Edit: also, if i run the fallowing commands in the TESTBENCH:
initial
begin
#1 $display("T=0t at time #1",$realtime);
#1 $display("T=0t at time #2",$realtime);
#1 $display("T=0t at time #3",$realtime);
#1 $display("T=0t at time #4",$realtime);
#2 $display("T=0t at time #5",$realtime);
end
i get:
T=1000 at time #1
T=2000 at time #2
T=3000 at time #3
T=4000 at time #4
T=6000 at time #5
I guess this is a clue, but i have no idea what causing it.