Merge pull request #328 from betrusted-io/precise_clocks
add the possibility for a "precise" clock solution
This commit is contained in:
commit
caacc41103
|
@ -74,7 +74,7 @@ class XilinxClocking(Module, AutoCSR):
|
||||||
valid = False
|
valid = False
|
||||||
for d in range(*self.clkout_divide_range):
|
for d in range(*self.clkout_divide_range):
|
||||||
clk_freq = vco_freq/d
|
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{}_freq".format(n)] = clk_freq
|
||||||
config["clkout{}_divide".format(n)] = d
|
config["clkout{}_divide".format(n)] = d
|
||||||
config["clkout{}_phase".format(n)] = p
|
config["clkout{}_phase".format(n)] = p
|
||||||
|
|
Loading…
Reference in New Issue