sim: write process commands to VCD file.

If delta cycles are expanded (i.e. if the `fs_per_delta` argument to
`Simulator.write_vcd` is not zero), then create a string typed variable
for each testbench in the simulation, which reflects the current
command being executed by that testbench. To make all commands visible,
insert a (visual) delta cycle after each executed command, and ensure
that there is a change/crossing point in the waveform display each time
a command is executed, even if several identical ones in a row.

If delta cycles are not expanded, the behavior is unchanged.
This commit is contained in:
Catherine 2024-03-23 09:09:37 +00:00
parent 36fb9035e4
commit 11f7b887ad
3 changed files with 57 additions and 4 deletions

View file

@ -1191,6 +1191,15 @@ class SimulatorIntegrationTestCase(FHDLTestCase):
with sim.write_vcd("test.vcd", fs_per_delta=1):
sim.run()
def test_process_name_collision(self):
def testbench():
yield Passive()
sim = Simulator(Module())
sim.add_testbench(testbench)
sim.add_testbench(testbench)
with sim.write_vcd("test.vcd", fs_per_delta=1):
sim.run()
class SimulatorRegressionTestCase(FHDLTestCase):
def test_bug_325(self):