Skip to content

Commit

Permalink
build/sim/config: Convert periods_ps to int since otherwise too restr…
Browse files Browse the repository at this point in the history
…ictive on possible frequencies generation.
  • Loading branch information
enjoy-digital committed Feb 21, 2024
1 parent 129446d commit 63f9935
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion litex/build/sim/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 63f9935

Please sign in to comment.