From 0ef5ced49224252fabc0be083a28840b69096bf2 Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 14 Dec 2018 16:39:52 +0000 Subject: [PATCH] compat.sim: match clock period. --- nmigen/compat/sim/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nmigen/compat/sim/__init__.py b/nmigen/compat/sim/__init__.py index c2a7c7b..4ee0454 100644 --- a/nmigen/compat/sim/__init__.py +++ b/nmigen/compat/sim/__init__.py @@ -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, domain) + sim.add_clock(period / 1e9, domain) for domain, process in generators.items(): sim.add_sync_process(process, domain) sim.run() -- 2.30.2