From 63f9935f17211c964e2b950bf88942330fa28fee Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 21 Feb 2024 11:39:49 +0100 Subject: [PATCH] build/sim/config: Convert periods_ps to int since otherwise too restrictive on possible frequencies generation. --- litex/build/sim/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litex/build/sim/config.py b/litex/build/sim/config.py index 6d62dbb8e..20aafe1d6 100644 --- a/litex/build/sim/config.py +++ b/litex/build/sim/config.py @@ -74,7 +74,7 @@ def _calculate_timebase_ps(clockers): Currently we allow only for integer periods (in ps), which it's quite restrictive. """ # convert to picoseconds, 1ps is our finest timebase for dumping simulation data - periods_ps = [1e12 / c["args"]["freq_hz"] for c in clockers] + periods_ps = [int(1e12 / c["args"]["freq_hz"]) for c in clockers] phase_shifts_ps = [p * c["args"]["phase_deg"]/360 for c, p in zip(clockers, periods_ps)] # calculate timebase as greatest common denominator