Skip to content

Commit 24a060c

Browse files
committed
Simulation time adjustment for the older versions of Verilator.
1 parent 03b5361 commit 24a060c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

tests/simulation/simulator/verilator/simulation_simulator_verilator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def mkTest():
6464
test = mkTest()
6565

6666
sim = simulation.Simulator(test, sim='verilator')
67-
rslt = sim.run(sim_time=1000 * 2)
67+
rslt = sim.run(sim_time=1000 * 2 - 5, outputfile='out')
6868
print(rslt)
6969

7070
# sim.view_waveform()

tests/simulation/simulator/verilator/test_simulation_simulator_verilator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,12 @@
195195
LED: 5 count: 17
196196
LED: 5 count: 18
197197
LED: 5 count: 19
198-
LED: 5 count: 20
199198
"""
200199

201200

202201
def test():
203202
vg.reset()
204203
test_module = simulation_simulator_verilator.mkTest()
205204
sim = vg.simulation.Simulator(test_module, sim='verilator')
206-
rslt = sim.run(sim_time=1000 * 2)
205+
rslt = sim.run(sim_time=1000 * 2 - 5)
207206
assert(expected_rslt == rslt)

0 commit comments

Comments
 (0)