back.pysim: make initial phase configurable.

This commit is contained in:
whitequark 2018-12-14 16:46:16 +00:00
parent 0ef5ced492
commit e230383aac
2 changed files with 6 additions and 4 deletions

View file

@ -18,7 +18,7 @@ def run_simulation(fragment_or_module, generators, clocks={"sync": 10}, vcd_name
with Simulator(fragment, vcd_file=open(vcd_name, "w") if vcd_name else None) as sim:
for domain, period in clocks.items():
sim.add_clock(period / 1e9, domain)
sim.add_clock(period / 1e9, domain=domain)
for domain, process in generators.items():
sim.add_sync_process(process, domain)
sim.add_sync_process(process, domain=domain)
sim.run()