mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
add the possibility for a "precise" clock solution
If clocks and multipliers are planned well, we can have a zero-error solution for clocks. Suggest to change < to <= in margin comparison loop, so that a "perfect" solution is allowed to converge.
This commit is contained in:
parent
9336fe1139
commit
219bb7f294
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ class XilinxClocking(Module, AutoCSR):
|
|||
valid = False
|
||||
for d in range(*self.clkout_divide_range):
|
||||
clk_freq = vco_freq/d
|
||||
if abs(clk_freq - f) < f*m:
|
||||
if abs(clk_freq - f) <= f*m:
|
||||
config["clkout{}_freq".format(n)] = clk_freq
|
||||
config["clkout{}_divide".format(n)] = d
|
||||
config["clkout{}_phase".format(n)] = p
|
||||
|
|
Loading…
Reference in a new issue