# Pastebin QIatcBGM # CRG ---------------------------------------------------------------------------------------------- class _CRG(Module): def __init__(self, platform, sys_clk_freq): self.clock_domains.cd_sys = ClockDomain() # # # cfgmclk = Signal() self.specials += Instance("STARTUPE2", i_CLK = 0, i_GSR = 0, i_GTS = 0, i_KEYCLEARB = 1, i_PACK = 0, i_USRCCLKO = cfgmclk, i_USRCCLKTS = 0, i_USRDONEO = 1, i_USRDONETS = 1, o_CFGMCLK = cfgmclk ) self.comb += self.cd_sys.clk.eq(cfgmclk)