build/sim/config: Convert periods_ps to int since otherwise too restrictive on possible frequencies generation.

This commit is contained in:
Florent Kermarrec 2024-02-21 11:39:49 +01:00
parent 129446dea2
commit 63f9935f17
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ def _calculate_timebase_ps(clockers):
Currently we allow only for integer periods (in ps), which it's quite restrictive. 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 # 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)] phase_shifts_ps = [p * c["args"]["phase_deg"]/360 for c, p in zip(clockers, periods_ps)]
# calculate timebase as greatest common denominator # calculate timebase as greatest common denominator