Closed drom closed 3 years ago
Example:
User adds 2 clock signals: clk8 and clk6 with period 8 and 6 units respectively.
clk8
clk6
sim.addClock(new Clock(dut.clk8, 8)); sim.addClock(new Clock(dut.clk6, 6));
Over the period of 17 units, simulator will run eval loop 34 times (ticks1) even so, it is sufficient to run it only 9 times. (ticks2)
eval
{signal: [ {name: 'clk8', wave: 'L.H...L...H...L..'}, {name: 'clk6', wave: 'LH..L..H..L..H..L'}, {name: 'ticks1', wave: 'HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH', period: 0.5}, {name: 'ticks2', wave: '1.H.H...H...H.H.....H.....H.H...H.', period: 0.5}, ]}
Main simulation loop should progress with variable time delta. Example: https://github.com/drom/clocker/blob/master/src/tb.cpp#L28
Special code should calculate next delta and update clock counters. Example: https://github.com/drom/clocker/blob/master/src/clocker.h
Done. v0.12.0 released
Example:
User adds 2 clock signals:
clk8
andclk6
with period 8 and 6 units respectively.Over the period of 17 units, simulator will run
eval
loop 34 times (ticks1) even so, it is sufficient to run it only 9 times. (ticks2)Main simulation loop should progress with variable time delta. Example: https://github.com/drom/clocker/blob/master/src/tb.cpp#L28
Special code should calculate next delta and update clock counters. Example: https://github.com/drom/clocker/blob/master/src/clocker.h