forked from M-Labs/artiq-zynq
cxp upconn: add sys_clk_freq parameter to set pll
This commit is contained in:
parent
e6550c68cf
commit
cdc7294e99
|
@ -6,7 +6,7 @@ from misoc.interconnect.csr import *
|
|||
from misoc.interconnect import stream
|
||||
|
||||
class CXP_UpConn(Module, AutoCSR):
|
||||
def __init__(self, pads, tx_fifo_depth=32):
|
||||
def __init__(self, pads, sys_clk_freq, tx_fifo_depth=32):
|
||||
self.clock_domains.cd_cxp_upconn = ClockDomain()
|
||||
self.clk_reset = CSRStorage(reset=1)
|
||||
self.bitrate2x_enable = CSRStorage()
|
||||
|
@ -26,11 +26,11 @@ class CXP_UpConn(Module, AutoCSR):
|
|||
o_LOCKED=pll_locked,
|
||||
i_RST=ResetSignal("sys"),
|
||||
|
||||
p_CLKIN1_PERIOD=8, # ns
|
||||
p_CLKIN1_PERIOD=1e9/sys_clk_freq, # ns
|
||||
i_CLKIN1=ClockSignal("sys"),
|
||||
|
||||
# VCO @ 1.25GHz
|
||||
p_CLKFBOUT_MULT=10, p_DIVCLK_DIVIDE=1,
|
||||
p_CLKFBOUT_MULT=1.25e9/sys_clk_freq, p_DIVCLK_DIVIDE=1,
|
||||
i_CLKFBIN=pll_fb_clk, o_CLKFBOUT=pll_fb_clk,
|
||||
|
||||
# 20.83MHz (48ns)
|
||||
|
|
Loading…
Reference in New Issue