forked from M-Labs/artiq
1
0
Fork 0

sayma_rtm: use bufio for sys4x (needed since we are using a -1 speedgrade)

This commit is contained in:
Florent Kermarrec 2018-05-01 22:16:35 +02:00
parent b48e782dd6
commit 05955bfd79
1 changed files with 12 additions and 16 deletions

View File

@ -30,29 +30,25 @@ class CRG(Module):
pll_locked = Signal() pll_locked = Signal()
pll_fb = Signal() pll_fb = Signal()
pll_sys = Signal()
pll_sys4x = Signal() pll_sys4x = Signal()
pll_clk200 = Signal() pll_clk200 = Signal()
self.specials += [ self.specials += [
Instance("PLLE2_BASE", Instance("MMCME2_BASE",
p_STARTUP_WAIT="FALSE", o_LOCKED=pll_locked, p_STARTUP_WAIT="FALSE", o_LOCKED=pll_locked,
# VCO @ 1GHz # VCO @ 1GHz
p_REF_JITTER1=0.01, p_CLKIN1_PERIOD=10.0, p_REF_JITTER1=0.01, p_CLKIN1_PERIOD=10.0,
p_CLKFBOUT_MULT=10, p_DIVCLK_DIVIDE=1, p_CLKFBOUT_MULT_F=10, p_DIVCLK_DIVIDE=1,
i_CLKIN1=self.serwb_refclk, i_CLKFBIN=pll_fb, o_CLKFBOUT=pll_fb, i_CLKIN1=self.serwb_refclk, i_CLKFBIN=pll_fb, o_CLKFBOUT=pll_fb,
# 125MHz
p_CLKOUT0_DIVIDE=8, p_CLKOUT0_PHASE=0.0, o_CLKOUT0=pll_sys,
# 500MHz # 500MHz
p_CLKOUT1_DIVIDE=2, p_CLKOUT1_PHASE=0.0, o_CLKOUT1=pll_sys4x, p_CLKOUT0_DIVIDE_F=2, p_CLKOUT0_PHASE=0.0, o_CLKOUT0=pll_sys4x,
# 200MHz # 200MHz
p_CLKOUT2_DIVIDE=5, p_CLKOUT2_PHASE=0.0, o_CLKOUT2=pll_clk200 p_CLKOUT1_DIVIDE=5, p_CLKOUT1_PHASE=0.0, o_CLKOUT1=pll_clk200
), ),
Instance("BUFG", i_I=pll_sys, o_O=self.cd_sys.clk), Instance("BUFR", p_BUFR_DIVIDE="4", i_I=pll_sys4x, o_O=self.cd_sys.clk),
Instance("BUFG", i_I=pll_sys4x, o_O=self.cd_sys4x.clk), Instance("BUFIO", i_I=pll_sys4x, o_O=self.cd_sys4x.clk),
Instance("BUFG", i_I=pll_clk200, o_O=self.cd_clk200.clk), Instance("BUFG", i_I=pll_clk200, o_O=self.cd_clk200.clk),
AsyncResetSynchronizer(self.cd_sys, ~pll_locked | self.serwb_reset), AsyncResetSynchronizer(self.cd_sys, ~pll_locked | self.serwb_reset),
AsyncResetSynchronizer(self.cd_clk200, ~pll_locked | self.serwb_reset) AsyncResetSynchronizer(self.cd_clk200, ~pll_locked | self.serwb_reset)