From 1de5e2039f7316d232f60479420de826f7dc71be Mon Sep 17 00:00:00 2001 From: mwojcik Date: Tue, 5 Oct 2021 08:40:28 +0200 Subject: [PATCH 01/12] moved gateware files from drtio port --- src/gateware/kasli_soc.py | 331 +++++++++++++++++++++++++++- src/gateware/zc706.py | 448 +++++++++++++++++++++++++++++++++++--- 2 files changed, 744 insertions(+), 35 deletions(-) diff --git a/src/gateware/kasli_soc.py b/src/gateware/kasli_soc.py index 5226501..c4ca52b 100755 --- a/src/gateware/kasli_soc.py +++ b/src/gateware/kasli_soc.py @@ -16,10 +16,15 @@ from artiq.coredevice import jsondesc from artiq.gateware import rtio, eem_7series from artiq.gateware.rtio.phy import ttl_simple +from artiq.gateware.drtio.transceiver import gtx_7series +from artiq.gateware.drtio.siphaser import SiPhaser7Series +from artiq.gateware.drtio.rx_synchronizer import XilinxRXSynchronizer +from artiq.gateware.drtio import * + import dma import analyzer import acpki - +import aux_controller class RTIOCRG(Module, AutoCSR): def __init__(self, platform): @@ -71,6 +76,36 @@ class RTIOCRG(Module, AutoCSR): ] +class _RTIOClockMultiplier(Module, AutoCSR): + def __init__(self, rtio_clk_freq): + self.pll_reset = CSRStorage(reset=1) + self.pll_locked = CSRStatus() + self.clock_domains.cd_rtiox4 = ClockDomain(reset_less=True) + + # See "Global Clock Network Deskew Using Two BUFGs" in ug472. + clkfbout = Signal() + clkfbin = Signal() + rtiox4_clk = Signal() + pll_locked = Signal() + self.specials += [ + Instance("MMCME2_BASE", + p_CLKIN1_PERIOD=1e9/rtio_clk_freq, + i_CLKIN1=ClockSignal("rtio"), + i_RST=self.pll_reset.storage, + o_LOCKED=pll_locked, + + p_CLKFBOUT_MULT_F=8.0, p_DIVCLK_DIVIDE=1, + + o_CLKFBOUT=clkfbout, i_CLKFBIN=clkfbin, + + p_CLKOUT0_DIVIDE_F=2.0, o_CLKOUT0=rtiox4_clk, + ), + Instance("BUFG", i_I=clkfbout, o_O=clkfbin), + Instance("BUFG", i_I=rtiox4_clk, o_O=self.cd_rtiox4.clk), + + MultiReg(pll_locked, self.pll_locked.status) + ] + eem_iostandard_dict = { 0: "LVDS_25", 1: "LVDS_25", @@ -173,13 +208,295 @@ class GenericStandalone(SoCCore): class GenericMaster(SoCCore): - def __init__(self, description, **kwargs): - raise NotImplementedError + def __init__(self, description, acpki=False): + sys_clk_freq = 125e6 + + self.acpki = acpki + self.rustc_cfg = dict() + + platform = kasli_soc.Platform() + platform.toolchain.bitstream_commands.extend([ + "set_property BITSTREAM.GENERAL.COMPRESS True [current_design]", + ]) + ident = self.__class__.__name__ + if self.acpki: + ident = "acpki_" + ident + SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident) + + platform.add_platform_command("create_clock -name clk_fpga_0 -period 8 [get_pins \"PS7/FCLKCLK[0]\"]") + platform.add_platform_command("set_input_jitter clk_fpga_0 0.24") + + # kasli_soc has no SATA, but it has 4x SFP + # not sure yet why sfp0 is omitted in MasterMode + data_pads = [platform.request("sfp", i) for i in range(4)] + + self.submodules.drtio_transceiver = gtx_7series.GTX( + clock_pads=platform.request("clk125_gtp"), + pads=data_pads, + sys_clk_freq=sys_clk_freq) + self.csr_devices.append("drtio_transceiver") + + self.crg = self.ps7 # HACK for eem_7series to find the clock + self.submodules.rtio_crg = RTIOCRG(self.platform) + self.csr_devices.append("rtio_crg") + self.platform.add_period_constraint(self.rtio_crg.cd_rtio.clk, 8.) + self.platform.add_false_path_constraints( + self.ps7.cd_sys.clk, + self.rtio_crg.cd_rtio.clk) + + self.rtio_channels = [] + has_grabber = any(peripheral["type"] == "grabber" for peripheral in description["peripherals"]) + if has_grabber: + self.grabber_csr_group = [] + eem_7series.add_peripherals(self, description["peripherals"], iostandard=eem_iostandard) + for i in (0, 1): + print("USER LED at RTIO channel 0x{:06x}".format(len(self.rtio_channels))) + user_led = self.platform.request("user_led", i) + phy = ttl_simple.Output(user_led) + self.submodules += phy + self.rtio_channels.append(rtio.Channel.from_phy(phy)) + self.config["RTIO_LOG_CHANNEL"] = len(self.rtio_channels) + self.rtio_channels.append(rtio.LogChannel()) + + self.submodules.rtio_tsc = rtio.TSC("async", glbl_fine_ts_width=3) + + drtio_csr_group = [] + drtioaux_csr_group = [] + drtioaux_memory_group = [] + self.drtio_cri = [] + for i in range(len(self.drtio_transceiver.channels)): + core_name = "drtio" + str(i) + coreaux_name = "drtioaux" + str(i) + memory_name = "drtioaux" + str(i) + "_mem" + drtio_csr_group.append(core_name) + drtioaux_csr_group.append(coreaux_name) + drtioaux_memory_group.append(memory_name) + + cdr = ClockDomainsRenamer({"rtio_rx": "rtio_rx" + str(i)}) + + core = cdr(DRTIOMaster(self.rtio_tsc, self.drtio_transceiver.channels[i])) + setattr(self.submodules, core_name, core) + self.drtio_cri.append(core.cri) + self.csr_devices.append(core_name) + + coreaux = cdr(aux_controller.DRTIOAuxControllerBare(core.link_layer)) + setattr(self.submodules, coreaux_name, coreaux) + self.csr_devices.append(coreaux_name) + + size = coreaux.get_mem_size() + memory_address = self.axi2csr.register_port(coreaux.get_tx_port(), size) + self.axi2csr.register_port(coreaux.get_rx_port(), size) + self.add_memory_region(memory_name, self.mem_map["csr"] + memory_address, size * 2) + self.rustc_cfg["has_drtio"] = None + self.rustc_cfg["has_drtio_routing"] = None + self.add_csr_group("drtio", drtio_csr_group) + self.add_csr_group("drtioaux", drtioaux_csr_group) + self.add_memory_group("drtioaux_mem", drtioaux_memory_group) + + self.submodules.rtio_core = rtio.Core(self.rtio_tsc, self.rtio_channels) + self.csr_devices.append("rtio_core") + + if self.acpki: + self.rustc_cfg["ki_impl"] = "acp" + self.submodules.rtio = acpki.KernelInitiator(self.rtio_tsc, + bus=self.ps7.s_axi_acp, + user=self.ps7.s_axi_acp_user, + evento=self.ps7.event.o) + self.csr_devices.append("rtio") + else: + self.rustc_cfg["ki_impl"] = "csr" + self.submodules.rtio = rtio.KernelInitiator(self.rtio_tsc, now64=True) + self.csr_devices.append("rtio") + + self.submodules.rtio_dma = dma.DMA(self.ps7.s_axi_hp0) + self.csr_devices.append("rtio_dma") + + self.submodules.cri_con = rtio.CRIInterconnectShared( + [self.rtio.cri, self.rtio_dma.cri], + [self.rtio_core.cri] + self.drtio_cri, + enable_routing=True) + self.csr_devices.append("cri_con") + + self.submodules.rtio_moninj = rtio.MonInj(self.rtio_channels) + self.csr_devices.append("rtio_moninj") + + self.submodules.routing_table = rtio.RoutingTableAccess(self.cri_con) + self.csr_devices.append("routing_table") + + self.submodules.rtio_analyzer = analyzer.Analyzer(self.rtio_tsc, self.rtio_core.cri, + self.ps7.s_axi_hp1) + self.csr_devices.append("rtio_analyzer") + + if has_grabber: + self.rustc_cfg["has_grabber"] = None + self.add_csr_group("grabber", self.grabber_csr_group) + for grabber in self.grabber_csr_group: + self.platform.add_false_path_constraints( + self.rtio_crg.cd_rtio.clk, getattr(self, grabber).deserializer.cd_cl.clk) class GenericSatellite(SoCCore): - def __init__(self, description, **kwargs): - raise NotImplementedError + def __init__(self, description, acpki=False): + sys_clk_freq = 125e6 + rtio_clk_freq = 125e6 + + self.acpki = acpki + self.rustc_cfg = dict() + + platform = kasli_soc.Platform() + platform.toolchain.bitstream_commands.extend([ + "set_property BITSTREAM.GENERAL.COMPRESS True [current_design]", + ]) + ident = self.__class__.__name__ + if self.acpki: + ident = "acpki_" + ident + SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident) + + platform.add_platform_command("create_clock -name clk_fpga_0 -period 8 [get_pins \"PS7/FCLKCLK[0]\"]") + platform.add_platform_command("set_input_jitter clk_fpga_0 0.24") + + self.crg = self.ps7 # HACK for eem_7series to find the clock + self.submodules.rtio_crg = _RTIOClockMultiplier(rtio_clk_freq) + self.csr_devices.append("rtio_crg") + + data_pads = [platform.request("sfp", i) for i in range(4)] + + self.submodules.drtio_transceiver = gtx_7series.GTX( + clock_pads=platform.request("clk125_gtp"), + pads=data_pads, + sys_clk_freq=sys_clk_freq) + self.csr_devices.append("drtio_transceiver") + + self.rtio_channels = [] + has_grabber = any(peripheral["type"] == "grabber" for peripheral in description["peripherals"]) + if has_grabber: + self.grabber_csr_group = [] + eem_7series.add_peripherals(self, description["peripherals"], iostandard=eem_iostandard) + for i in (0, 1): + print("USER LED at RTIO channel 0x{:06x}".format(len(self.rtio_channels))) + user_led = self.platform.request("user_led", i) + phy = ttl_simple.Output(user_led) + self.submodules += phy + self.rtio_channels.append(rtio.Channel.from_phy(phy)) + self.config["RTIO_LOG_CHANNEL"] = len(self.rtio_channels) + self.rtio_channels.append(rtio.LogChannel()) + + self.submodules.rtio_tsc = rtio.TSC("sync", glbl_fine_ts_width=3) + + drtioaux_csr_group = [] + drtioaux_memory_group = [] + drtiorep_csr_group = [] + self.drtio_cri = [] + for i in range(len(self.drtio_transceiver.channels)): + coreaux_name = "drtioaux" + str(i) + memory_name = "drtioaux" + str(i) + "_mem" + drtioaux_csr_group.append(coreaux_name) + drtioaux_memory_group.append(memory_name) + + cdr = ClockDomainsRenamer({"rtio_rx": "rtio_rx" + str(i)}) + + if i == 0: + self.submodules.rx_synchronizer = cdr(XilinxRXSynchronizer()) + core = cdr(DRTIOSatellite( + self.rtio_tsc, self.drtio_transceiver.channels[i], + self.rx_synchronizer)) + self.submodules.drtiosat = core + self.csr_devices.append("drtiosat") + else: + corerep_name = "drtiorep" + str(i-1) + drtiorep_csr_group.append(corerep_name) + + core = cdr(DRTIORepeater( + self.rtio_tsc, self.drtio_transceiver.channels[i])) + setattr(self.submodules, corerep_name, core) + self.drtio_cri.append(core.cri) + self.csr_devices.append(corerep_name) + + coreaux = cdr(aux_controller.DRTIOAuxControllerBare(core.link_layer)) + setattr(self.submodules, coreaux_name, coreaux) + self.csr_devices.append(coreaux_name) + + mem_size = coreaux.get_mem_size() + tx_port = coreaux.get_tx_port() + rx_port = coreaux.get_rx_port() + memory_address = self.axi2csr.register_port(tx_port, mem_size) + # rcv in upper half of the memory, thus added second + self.axi2csr.register_port(rx_port, mem_size) + # and registered in PS interface + # manually, because software refers to rx/tx by halves of entire memory block, not names + self.add_memory_region(memory_name, self.mem_map["csr"] + memory_address, mem_size * 2) + self.rustc_cfg["has_drtio"] = None + self.rustc_cfg["has_drtio_routing"] = None + self.add_csr_group("drtioaux", drtioaux_csr_group) + self.add_memory_group("drtioaux_mem", drtioaux_memory_group) + self.add_csr_group("drtiorep", drtiorep_csr_group) + + if self.acpki: + self.rustc_cfg["ki_impl"] = "acp" + self.submodules.rtio = acpki.KernelInitiator(self.rtio_tsc, + bus=self.ps7.s_axi_acp, + user=self.ps7.s_axi_acp_user, + evento=self.ps7.event.o) + self.csr_devices.append("rtio") + else: + self.rustc_cfg["ki_impl"] = "csr" + self.submodules.rtio = rtio.KernelInitiator(self.rtio_tsc, now64=True) + self.csr_devices.append("rtio") + + self.submodules.rtio_dma = dma.DMA(self.ps7.s_axi_hp0) + self.csr_devices.append("rtio_dma") + + self.submodules.local_io = SyncRTIO(self.rtio_tsc, self.rtio_channels) + self.comb += self.drtiosat.async_errors.eq(self.local_io.async_errors) + + self.submodules.cri_con = rtio.CRIInterconnectShared( + [self.drtiosat.cri], + [self.local_io.cri] + self.drtio_cri, + mode="sync", enable_routing=True) + self.csr_devices.append("cri_con") + + self.submodules.routing_table = rtio.RoutingTableAccess(self.cri_con) + self.csr_devices.append("routing_table") + + self.submodules.rtio_moninj = rtio.MonInj(self.rtio_channels) + self.csr_devices.append("rtio_moninj") + + rtio_clk_period = 1e9/rtio_clk_freq + self.rustc_cfg["rtio_frequency"] = str(rtio_clk_freq/1e6) + + self.submodules.siphaser = SiPhaser7Series( + si5324_clkin=platform.request("cdr_clk"), + rx_synchronizer=self.rx_synchronizer, + ultrascale=False, + rtio_clk_freq=self.drtio_transceiver.rtio_clk_freq) + platform.add_false_path_constraints( + self.crg.cd_sys.clk, self.siphaser.mmcm_freerun_output) + self.csr_devices.append("siphaser") + self.rustc_cfg["has_si5324"] = None + self.rustc_cfg["has_siphaser"] = None + self.rustc_cfg["si5324_soft_reset"] = None + + gtx0 = self.drtio_transceiver.gtxs[0] + platform.add_period_constraint(gtx0.txoutclk, rtio_clk_period) + platform.add_period_constraint(gtx0.rxoutclk, rtio_clk_period) + platform.add_false_path_constraints( + self.crg.cd_sys.clk, + gtx0.txoutclk, gtx0.rxoutclk) + for gtx in self.drtio_transceiver.gtxs[1:]: + platform.add_period_constraint(gtx.rxoutclk, rtio_clk_period) + platform.add_false_path_constraints( + self.crg.cd_sys.clk, gtx.rxoutclk) + + if has_grabber: + self.rustc_cfg["has_grabber"] = None + self.add_csr_group("grabber", self.grabber_csr_group) + # no RTIO CRG here + + +def write_mem_file(soc, filename): + with open(filename, "w") as f: + f.write(cpu_interface.get_mem_rust( + soc.get_memory_regions(), soc.get_memory_groups(), None)) def write_csr_file(soc, filename): @@ -204,6 +521,8 @@ def main(): help="build Rust interface into the specified file") parser.add_argument("-c", default=None, help="build Rust compiler configuration into the specified file") + parser.add_argument("-m", default=None, + help="build Rust memory interface into the specified file") parser.add_argument("-g", default=None, help="build gateware into the specified directory") parser.add_argument("--acpki", default=False, action="store_true", @@ -230,6 +549,8 @@ def main(): if args.r is not None: write_csr_file(soc, args.r) + if args.m is not None: + write_mem_file(soc, args.m) if args.c is not None: write_rustc_cfg_file(soc, args.c) if args.g is not None: diff --git a/src/gateware/zc706.py b/src/gateware/zc706.py index 766cab5..69d72e4 100755 --- a/src/gateware/zc706.py +++ b/src/gateware/zc706.py @@ -11,14 +11,20 @@ from migen_axi.integration.soc_core import SoCCore from migen_axi.platforms import zc706 from misoc.interconnect.csr import * from misoc.integration import cpu_interface +from misoc.cores import gpio from artiq.gateware import rtio, nist_clock, nist_qc2 from artiq.gateware.rtio.phy import ttl_simple, ttl_serdes_7series, dds, spi2 +from artiq.gateware.drtio.transceiver import gtx_7series +from artiq.gateware.drtio.siphaser import SiPhaser7Series +from artiq.gateware.drtio.rx_synchronizer import XilinxRXSynchronizer +from artiq.gateware.drtio import * + import dma import analyzer import acpki - +import aux_controller class RTIOCRG(Module, AutoCSR): def __init__(self, platform, rtio_internal_clk): @@ -64,23 +70,88 @@ class RTIOCRG(Module, AutoCSR): ] +class _RTIOClockMultiplier(Module, AutoCSR): + def __init__(self, rtio_clk_freq): + self.pll_reset = CSRStorage(reset=1) + self.pll_locked = CSRStatus() + self.clock_domains.cd_rtiox4 = ClockDomain(reset_less=True) + + # See "Global Clock Network Deskew Using Two BUFGs" in ug472. + clkfbout = Signal() + clkfbin = Signal() + rtiox4_clk = Signal() + pll_locked = Signal() + self.specials += [ + Instance("MMCME2_BASE", + p_CLKIN1_PERIOD=1e9/rtio_clk_freq, + i_CLKIN1=ClockSignal("rtio"), + i_RST=self.pll_reset.storage, + o_LOCKED=pll_locked, + + p_CLKFBOUT_MULT_F=8.0, p_DIVCLK_DIVIDE=1, + + o_CLKFBOUT=clkfbout, i_CLKFBIN=clkfbin, + + p_CLKOUT0_DIVIDE_F=2.0, o_CLKOUT0=rtiox4_clk, + ), + Instance("BUFG", i_I=clkfbout, o_O=clkfbin), + Instance("BUFG", i_I=rtiox4_clk, o_O=self.cd_rtiox4.clk), + + MultiReg(pll_locked, self.pll_locked.status) + ] + + +def fix_serdes_timing_path(platform): + # ignore timing of path from OSERDESE2 through the pad to ISERDESE2 + platform.add_platform_command( + "set_false_path -quiet " + "-through [get_pins -filter {{REF_PIN_NAME == OQ || REF_PIN_NAME == TQ}} " + "-of [get_cells -filter {{REF_NAME == OSERDESE2}}]] " + "-to [get_pins -filter {{REF_PIN_NAME == D}} " + "-of [get_cells -filter {{REF_NAME == ISERDESE2}}]]" + ) + + +# The NIST backplanes require setting VADJ to 3.3V by reprogramming the power supply. +# This also changes the I/O standard for some on-board LEDs. +leds_fmc33 = [ + ("user_led_33", 0, Pins("Y21"), IOStandard("LVCMOS33")), + ("user_led_33", 1, Pins("G2"), IOStandard("LVCMOS15")), + ("user_led_33", 2, Pins("W21"), IOStandard("LVCMOS33")), + ("user_led_33", 3, Pins("A17"), IOStandard("LVCMOS15")), +] + +# same deal as with LEDs - changed I/O standard. +si5324_fmc33 = [ + ("si5324_33", 0, + Subsignal("rst_n", Pins("W23"), IOStandard("LVCMOS33")), + Subsignal("int", Pins("AJ25"), IOStandard("LVCMOS33")) + ), +] + + +def prepare_zc706_platform(platform): + platform.toolchain.bitstream_commands.extend([ + "set_property BITSTREAM.GENERAL.COMPRESS True [current_design]", + ]) + platform.add_platform_command("create_clock -name clk_fpga_0 -period 8 [get_pins \"PS7/FCLKCLK[0]\"]") + platform.add_platform_command("set_input_jitter clk_fpga_0 0.24") + return platform + + class ZC706(SoCCore): def __init__(self, acpki=False): self.acpki = acpki self.rustc_cfg = dict() platform = zc706.Platform() - platform.toolchain.bitstream_commands.extend([ - "set_property BITSTREAM.GENERAL.COMPRESS True [current_design]", - ]) + platform = prepare_zc706_platform(platform) + ident = self.__class__.__name__ if self.acpki: ident = "acpki_" + ident SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident) - platform.add_platform_command("create_clock -name clk_fpga_0 -period 8 [get_pins \"PS7/FCLKCLK[0]\"]") - platform.add_platform_command("set_input_jitter clk_fpga_0 0.24") - self.submodules.rtio_crg = RTIOCRG(self.platform, self.ps7.cd_sys.clk) self.csr_devices.append("rtio_crg") self.rustc_cfg["has_rtio_crg_clock_sel"] = None @@ -122,10 +193,284 @@ class ZC706(SoCCore): self.csr_devices.append("rtio_analyzer") -class Simple(ZC706): - def __init__(self, **kwargs): - ZC706.__init__(self, **kwargs) +class _MasterBase(SoCCore): + def __init__(self, acpki=False, use_si5324_33=False): + self.acpki = acpki + self.rustc_cfg = dict() + platform = zc706.Platform() + platform = prepare_zc706_platform(platform) + ident = self.__class__.__name__ + if self.acpki: + ident = "acpki_" + ident + SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident) + + platform.add_platform_command("create_clock -name clk_fpga_0 -period 8 [get_pins \"PS7/FCLKCLK[0]\"]") + platform.add_platform_command("set_input_jitter clk_fpga_0 0.24") + + if use_si5324_33: + platform.add_extension(si5324_fmc33) + + self.sys_clk_freq = 125e6 + + platform = self.platform + + self.comb += platform.request("sfp_tx_disable_n").eq(1) + data_pads = [ + platform.request("sfp") + ] + + # 1000BASE_BX10 Ethernet compatible, 125MHz RTIO clock + self.submodules.drtio_transceiver = gtx_7series.GTX( + clock_pads=platform.request("si5324_clkout"), + pads=data_pads, + sys_clk_freq=self.sys_clk_freq) + self.csr_devices.append("drtio_transceiver") + + self.submodules.rtio_tsc = rtio.TSC("async", glbl_fine_ts_width=3) + + drtio_csr_group = [] + drtioaux_csr_group = [] + drtioaux_memory_group = [] + self.drtio_cri = [] + for i in range(len(self.drtio_transceiver.channels)): + core_name = "drtio" + str(i) + coreaux_name = "drtioaux" + str(i) + memory_name = "drtioaux" + str(i) + "_mem" + drtio_csr_group.append(core_name) + drtioaux_csr_group.append(coreaux_name) + drtioaux_memory_group.append(memory_name) + + cdr = ClockDomainsRenamer({"rtio_rx": "rtio_rx" + str(i)}) + + core = cdr(DRTIOMaster( + self.rtio_tsc, self.drtio_transceiver.channels[i])) + setattr(self.submodules, core_name, core) + self.drtio_cri.append(core.cri) + self.csr_devices.append(core_name) + + coreaux = cdr(aux_controller.DRTIOAuxControllerBare(core.link_layer)) + setattr(self.submodules, coreaux_name, coreaux) + self.csr_devices.append(coreaux_name) + + mem_size = coreaux.get_mem_size() + memory_address = self.axi2csr.register_port(coreaux.get_tx_port(), mem_size) + self.axi2csr.register_port(coreaux.get_rx_port(), mem_size) + self.add_memory_region(memory_name, self.mem_map["csr"] + memory_address, mem_size * 2) + self.rustc_cfg["has_drtio"] = None + self.rustc_cfg["has_drtio_routing"] = None + self.add_csr_group("drtio", drtio_csr_group) + self.add_csr_group("drtioaux", drtioaux_csr_group) + self.add_memory_group("drtioaux_mem", drtioaux_memory_group) + + self.rustc_cfg["RTIO_FREQUENCY"] = str(self.drtio_transceiver.rtio_clk_freq/1e6) + + if use_si5324_33: + self.submodules.si5324_rst_n = gpio.GPIOOut(platform.request("si5324_33").rst_n) + else: + self.submodules.si5324_rst_n = gpio.GPIOOut(platform.request("si5324").rst_n) + self.csr_devices.append("si5324_rst_n") + self.rustc_cfg["has_si5324"] = None + self.rustc_cfg["si5324_as_synthesizer"] = None + + rtio_clk_period = 1e9/self.drtio_transceiver.rtio_clk_freq + # Constrain TX & RX timing for the first transceiver channel + # (First channel acts as master for phase alignment for all channels' TX) + gtx0 = self.drtio_transceiver.gtxs[0] + platform.add_period_constraint(gtx0.txoutclk, rtio_clk_period) + platform.add_period_constraint(gtx0.rxoutclk, rtio_clk_period) + platform.add_false_path_constraints( + self.ps7.cd_sys.clk, + gtx0.txoutclk, gtx0.rxoutclk) + # Constrain RX timing for the each transceiver channel + # (Each channel performs single-lane phase alignment for RX) + for gtx in self.drtio_transceiver.gtxs[1:]: + platform.add_period_constraint(gtx.rxoutclk, rtio_clk_period) + platform.add_false_path_constraints( + self.ps7.cd_sys.clk, gtx0.txoutclk, gtx.rxoutclk) + + self.submodules.rtio_crg = _RTIOClockMultiplier(self.sys_clk_freq) + self.csr_devices.append("rtio_crg") + fix_serdes_timing_path(self.platform) + + def add_rtio(self, rtio_channels): + self.submodules.rtio_tsc = rtio.TSC("async", glbl_fine_ts_width=3) + self.submodules.rtio_core = rtio.Core(self.rtio_tsc, rtio_channels) + self.csr_devices.append("rtio_core") + + if self.acpki: + self.rustc_cfg["ki_impl"] = "acp" + self.submodules.rtio = acpki.KernelInitiator(self.rtio_tsc, + bus=self.ps7.s_axi_acp, + user=self.ps7.s_axi_acp_user, + evento=self.ps7.event.o) + self.csr_devices.append("rtio") + else: + self.rustc_cfg["ki_impl"] = "csr" + self.submodules.rtio = rtio.KernelInitiator(self.rtio_tsc, now64=True) + self.csr_devices.append("rtio") + + self.submodules.rtio_dma = dma.DMA(self.ps7.s_axi_hp0) + self.csr_devices.append("rtio_dma") + + self.submodules.local_io = SyncRTIO(self.rtio_tsc, rtio_channels) + self.submodules.cri_con = rtio.CRIInterconnectShared( + [self.rtio.cri, self.rtio_dma.cri], + [self.local_io.cri] + self.drtio_cri, + mode="sync", enable_routing=True) + self.csr_devices.append("cri_con") + + self.submodules.rtio_moninj = rtio.MonInj(rtio_channels) + self.csr_devices.append("rtio_moninj") + + self.submodules.rtio_analyzer = analyzer.Analyzer(self.rtio_tsc, self.rtio_core.cri, + self.ps7.s_axi_hp1) + self.csr_devices.append("rtio_analyzer") + + self.submodules.routing_table = rtio.RoutingTableAccess(self.cri_con) + self.csr_devices.append("routing_table") + + +class _SatelliteBase(SoCCore): + def __init__(self, acpki=False, use_si5324_33=False): + self.acpki = acpki + self.rustc_cfg = dict() + + platform = zc706.Platform() + platform = prepare_zc706_platform(platform) + ident = self.__class__.__name__ + if self.acpki: + ident = "acpki_" + ident + SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident) + + if use_si5324_33: + platform.add_extension(si5324_fmc33) + + self.sys_clk_freq = 125e6 + platform = self.platform + + # SFP + self.comb += platform.request("sfp_tx_disable_n").eq(0) + data_pads = [ + platform.request("sfp") + ] + + self.submodules.rtio_tsc = rtio.TSC("sync", glbl_fine_ts_width=3) + + # 1000BASE_BX10 Ethernet compatible, 125MHz RTIO clock + self.submodules.drtio_transceiver = gtx_7series.GTX( + clock_pads=platform.request("si5324_clkout"), + pads=data_pads, + sys_clk_freq=self.sys_clk_freq) + self.csr_devices.append("drtio_transceiver") + + drtioaux_csr_group = [] + drtioaux_memory_group = [] + self.drtio_cri = [] + for i in range(len(self.drtio_transceiver.channels)): + coreaux_name = "drtioaux" + str(i) + memory_name = "drtioaux" + str(i) + "_mem" + drtioaux_csr_group.append(coreaux_name) + drtioaux_memory_group.append(memory_name) + + cdr = ClockDomainsRenamer({"rtio_rx": "rtio_rx" + str(i)}) + + # Satellite + if i == 0: + self.submodules.rx_synchronizer = cdr(XilinxRXSynchronizer()) + core = cdr(DRTIOSatellite( + self.rtio_tsc, self.drtio_transceiver.channels[0], self.rx_synchronizer)) + self.submodules.drtiosat = core + self.csr_devices.append("drtiosat") + # Repeaters - there would be for i != 0 - however zc706 only has one SFP + # and no other means to connect to + + coreaux = cdr(aux_controller.DRTIOAuxControllerBare(core.link_layer)) + setattr(self.submodules, coreaux_name, coreaux) + self.csr_devices.append(coreaux_name) + + mem_size = coreaux.get_mem_size() + tx_port = coreaux.get_tx_port() + rx_port = coreaux.get_rx_port() + memory_address = self.axi2csr.register_port(tx_port, mem_size) + # rcv in upper half of the memory, thus added second + self.axi2csr.register_port(rx_port, mem_size) + # and registered in PS interface + # manually, because software refers to rx/tx by halves of entire memory block, not names + self.add_memory_region(memory_name, self.mem_map["csr"] + memory_address, mem_size * 2) + self.rustc_cfg["has_drtio"] = None + # no repeaters - it does not have drtio routing support + self.add_csr_group("drtioaux", drtioaux_csr_group) + self.add_memory_group("drtioaux_mem", drtioaux_memory_group) + + self.rustc_cfg["rtio_frequency"] = str(self.drtio_transceiver.rtio_clk_freq/1e6) + + # Si5324 Phaser + self.submodules.siphaser = SiPhaser7Series( + si5324_clkin=platform.request("si5324_clkin"), + rx_synchronizer=self.rx_synchronizer, + ultrascale=False, + rtio_clk_freq=self.drtio_transceiver.rtio_clk_freq) + platform.add_false_path_constraints( + self.ps7.cd_sys.clk, self.siphaser.mmcm_freerun_output) + self.csr_devices.append("siphaser") + if use_si5324_33: + self.submodules.si5324_rst_n = gpio.GPIOOut(platform.request("si5324_33").rst_n) + else: + self.submodules.si5324_rst_n = gpio.GPIOOut(platform.request("si5324").rst_n) + self.csr_devices.append("si5324_rst_n") + self.rustc_cfg["has_si5324"] = None + self.rustc_cfg["has_siphaser"] = None + + rtio_clk_period = 1e9/self.drtio_transceiver.rtio_clk_freq + # Constrain TX & RX timing for the first transceiver channel + # (First channel acts as master for phase alignment for all channels' TX) + gtx0 = self.drtio_transceiver.gtxs[0] + platform.add_period_constraint(gtx0.txoutclk, rtio_clk_period) + platform.add_period_constraint(gtx0.rxoutclk, rtio_clk_period) + platform.add_false_path_constraints( + self.ps7.cd_sys.clk, + gtx0.txoutclk, gtx0.rxoutclk) + # Constrain RX timing for the each transceiver channel + # (Each channel performs single-lane phase alignment for RX) + for gtx in self.drtio_transceiver.gtxs[1:]: + platform.add_period_constraint(gtx.rxoutclk, rtio_clk_period) + platform.add_false_path_constraints( + self.ps7.cd_sys.clk, gtx.rxoutclk) + + self.submodules.rtio_crg = _RTIOClockMultiplier(self.sys_clk_freq) + self.csr_devices.append("rtio_crg") + fix_serdes_timing_path(self.platform) + + def add_rtio(self, rtio_channels): + self.submodules.rtio_moninj = rtio.MonInj(rtio_channels) + self.csr_devices.append("rtio_moninj") + + if self.acpki: + self.rustc_cfg["ki_impl"] = "acp" + self.submodules.rtio = acpki.KernelInitiator(self.rtio_tsc, + bus=self.ps7.s_axi_acp, + user=self.ps7.s_axi_acp_user, + evento=self.ps7.event.o) + self.csr_devices.append("rtio") + else: + self.rustc_cfg["ki_impl"] = "csr" + self.submodules.rtio = rtio.KernelInitiator(self.rtio_tsc, now64=True) + self.csr_devices.append("rtio") + + self.submodules.local_io = SyncRTIO(self.rtio_tsc, rtio_channels) + self.submodules.cri_con = rtio.CRIInterconnectShared( + [self.drtiosat.cri], + [self.local_io.cri] + self.drtio_cri, + mode="sync", enable_routing=True) + self.csr_devices.append("cri_con") + + self.submodules.routing_table = rtio.RoutingTableAccess(self.cri_con) + self.csr_devices.append("routing_table") + + +class _Simple_RTIO: + def __init__(self): platform = self.platform rtio_channels = [] @@ -140,23 +485,11 @@ class Simple(ZC706): self.add_rtio(rtio_channels) -# The NIST backplanes require setting VADJ to 3.3V by reprogramming the power supply. -# This also changes the I/O standard for some on-board LEDs. -leds_fmc33 = [ - ("user_led_33", 0, Pins("Y21"), IOStandard("LVCMOS33")), - ("user_led_33", 1, Pins("G2"), IOStandard("LVCMOS15")), - ("user_led_33", 2, Pins("W21"), IOStandard("LVCMOS33")), - ("user_led_33", 3, Pins("A17"), IOStandard("LVCMOS15")), -] - - -class NIST_CLOCK(ZC706): +class _NIST_CLOCK_RTIO: """ NIST clock hardware, with old backplane and 11 DDS channels """ - def __init__(self, **kwargs): - ZC706.__init__(self, **kwargs) - + def __init__(self): platform = self.platform platform.add_extension(nist_clock.fmc_adapter_io) platform.add_extension(leds_fmc33) @@ -203,14 +536,12 @@ class NIST_CLOCK(ZC706): self.add_rtio(rtio_channels) -class NIST_QC2(ZC706): +class _NIST_QC2_RTIO: """ NIST QC2 hardware, as used in Quantum I and Quantum II, with new backplane and 24 DDS channels. Two backplanes are used. """ - def __init__(self, **kwargs): - ZC706.__init__(self, **kwargs) - + def __init__(self): platform = self.platform platform.add_extension(nist_qc2.fmc_adapter_io) platform.add_extension(leds_fmc33) @@ -253,7 +584,56 @@ class NIST_QC2(ZC706): self.add_rtio(rtio_channels) -VARIANTS = {cls.__name__.lower(): cls for cls in [Simple, NIST_CLOCK, NIST_QC2]} +class Simple(ZC706, _Simple_RTIO): + def __init__(self, acpki): + ZC706.__init__(self, acpki) + _Simple_RTIO.__init__(self) + +class Master(_MasterBase, _Simple_RTIO): + def __init__(self, acpki): + _MasterBase.__init__(self, acpki, use_si5324_33=False) + _Simple_RTIO.__init__(self) + +class Satellite(_SatelliteBase, _Simple_RTIO): + def __init__(self, acpki): + _SatelliteBase.__init__(self, acpki, use_si5324_33=False) + _Simple_RTIO.__init__(self) + +class NIST_CLOCK(ZC706, _NIST_CLOCK_RTIO): + def __init__(self, acpki): + ZC706.__init__(self, acpki) + _NIST_CLOCK_RTIO.__init__(self) + +class NIST_CLOCK_Master(_MasterBase, _NIST_CLOCK_RTIO): + def __init__(self, acpki): + _MasterBase.__init__(self, acpki, use_si5324_33=True) + + _NIST_CLOCK_RTIO.__init__(self) + +class NIST_CLOCK_Satellite(_SatelliteBase, _NIST_CLOCK_RTIO): + def __init__(self, acpki): + _SatelliteBase.__init__(self, acpki, use_si5324_33=True) + _NIST_CLOCK_RTIO.__init__(self) + +class NIST_QC2(ZC706, _NIST_QC2_RTIO): + def __init__(self, acpki): + ZC706.__init__(self, acpki) + _NIST_QC2_RTIO.__init__(self) + +class NIST_QC2_Master(_MasterBase, _NIST_QC2_RTIO): + def __init__(self, acpki): + _MasterBase.__init__(self, acpki, use_si5324_33=True) + _NIST_QC2_RTIO.__init__(self) + +class NIST_QC2_Satellite(_SatelliteBase, _NIST_QC2_RTIO): + def __init__(self, acpki): + _SatelliteBase.__init__(self, acpki, use_si5324_33=True) + _NIST_QC2_RTIO.__init__(self) + + +VARIANTS = {cls.__name__.lower(): cls for cls in [Simple, Master, Satellite, + NIST_CLOCK, NIST_CLOCK_Master, NIST_CLOCK_Satellite, + NIST_QC2, NIST_QC2_Master, NIST_QC2_Satellite]} def write_csr_file(soc, filename): @@ -261,6 +641,11 @@ def write_csr_file(soc, filename): f.write(cpu_interface.get_csr_rust( soc.get_csr_regions(), soc.get_csr_groups(), soc.get_constants())) +def write_mem_file(soc, filename): + with open(filename, "w") as f: + f.write(cpu_interface.get_mem_rust( + soc.get_memory_regions(), soc.get_memory_groups(), None)) + def write_rustc_cfg_file(soc, filename): with open(filename, "w") as f: @@ -276,6 +661,8 @@ def main(): description="ARTIQ port to the ZC706 Zynq development kit") parser.add_argument("-r", default=None, help="build Rust interface into the specified file") + parser.add_argument("-m", default=None, + help="build Rust memory interface into the specified file") parser.add_argument("-c", default=None, help="build Rust compiler configuration into the specified file") parser.add_argument("-g", default=None, @@ -300,11 +687,12 @@ def main(): if args.r is not None: write_csr_file(soc, args.r) + if args.m is not None: + write_mem_file(soc, args.m) if args.c is not None: write_rustc_cfg_file(soc, args.c) if args.g is not None: soc.build(build_dir=args.g) - if __name__ == "__main__": main() -- 2.42.0 From 49bbee88bc98cf2babfc764ee876982c6882616f Mon Sep 17 00:00:00 2001 From: mwojcik Date: Tue, 5 Oct 2021 08:40:53 +0200 Subject: [PATCH 02/12] added missing aux_controller file --- src/gateware/aux_controller.py | 85 ++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/gateware/aux_controller.py diff --git a/src/gateware/aux_controller.py b/src/gateware/aux_controller.py new file mode 100644 index 0000000..fc667b7 --- /dev/null +++ b/src/gateware/aux_controller.py @@ -0,0 +1,85 @@ +"""Auxiliary controller, common to satellite and master""" + +from artiq.gateware.drtio.aux_controller import Transmitter, Receiver +from migen.fhdl.simplify import FullMemoryWE +from misoc.interconnect.csr import * +from migen_axi.interconnect.sram import SRAM +from migen_axi.interconnect import axi + +max_packet = 1024 + +class _DRTIOAuxControllerBase(Module): + def __init__(self, link_layer): + self.bus = axi.Interface() + self.submodules.transmitter = Transmitter(link_layer, len(self.bus.w.data)) + self.submodules.receiver = Receiver(link_layer, len(self.bus.w.data)) + + def get_csrs(self): + return self.transmitter.get_csrs() + self.receiver.get_csrs() + + +# TODO: FullMemoryWE should be applied by migen.build +@FullMemoryWE() +class DRTIOAuxControllerAxi(_DRTIOAuxControllerBase): + def __init__(self, link_layer): + _DRTIOAuxControllerBase.__init__(self, link_layer) + + tx_sdram_if = SRAM(self.transmitter.mem, read_only=False) + rx_sdram_if = SRAM(self.receiver.mem, read_only=True) + aw_decoder = axi.AddressDecoder(self.bus.aw, + [(lambda a: a[log2_int(max_packet)] == 0, tx_sdram_if.bus.aw), + (lambda a: a[log2_int(max_packet)] == 1, rx_sdram_if.bus.aw)], + register=True) + ar_decoder = axi.AddressDecoder(self.bus.ar, + [(lambda a: a[log2_int(max_packet)] == 0, tx_sdram_if.bus.ar), + (lambda a: a[log2_int(max_packet)] == 1, rx_sdram_if.bus.ar)], + register=True) + # unlike wb, axi address decoder only connects ar/aw lanes, + # the rest must also be connected! + # not quite unlike an address decoder itself. + + # connect bus.b with tx.b + self.comb += [tx_sdram_if.bus.b.ready.eq(self.bus.b.ready), + self.bus.b.id.eq(tx_sdram_if.bus.b.id), + self.bus.b.resp.eq(tx_sdram_if.bus.b.resp), + self.bus.b.valid.eq(tx_sdram_if.bus.b.valid)] + # connect bus.w with tx.w + # no worries about w.valid and slave sel here, only tx will be written to + self.comb += [tx_sdram_if.bus.w.id.eq(self.bus.w.id), + tx_sdram_if.bus.w.data.eq(self.bus.w.data), + tx_sdram_if.bus.w.strb.eq(self.bus.w.strb), + tx_sdram_if.bus.w.last.eq(self.bus.w.last), + tx_sdram_if.bus.w.valid.eq(self.bus.w.valid), + self.bus.w.ready.eq(tx_sdram_if.bus.w.ready)] + # connect bus.r with rx.r and tx.r w/o data + self.comb += [self.bus.r.id.eq(rx_sdram_if.bus.r.id | tx_sdram_if.bus.r.id), + #self.bus.r.data.eq(rx_sdram_if.bus.r.data | tx_sdram_if.bus.r.data), + self.bus.r.resp.eq(rx_sdram_if.bus.r.resp | tx_sdram_if.bus.r.resp), + self.bus.r.last.eq(rx_sdram_if.bus.r.last | tx_sdram_if.bus.r.last), + self.bus.r.valid.eq(rx_sdram_if.bus.r.valid | tx_sdram_if.bus.r.valid), + rx_sdram_if.bus.r.ready.eq(self.bus.r.ready), + tx_sdram_if.bus.r.ready.eq(self.bus.r.ready)] + # connect read data after being masked + masked = [Replicate(rx_sdram_if.bus.r.valid, + len(self.bus.r.data) + ) & rx_sdram_if.bus.r.data, + Replicate(tx_sdram_if.bus.r.valid, + len(self.bus.r.data) + ) & tx_sdram_if.bus.r.data] + self.comb += self.bus.r.data.eq(reduce(or_, masked)) + + self.submodules += tx_sdram_if, rx_sdram_if, aw_decoder, ar_decoder + + +@FullMemoryWE() +class DRTIOAuxControllerBare(_DRTIOAuxControllerBase): + # Barebones version of the AuxController. No SRAM, no decoders. + # add memories manually from tx and rx in target code. + def get_tx_port(self): + return self.transmitter.mem.get_port(write_capable=True) + + def get_rx_port(self): + return self.receiver.mem.get_port(write_capable=False) + + def get_mem_size(self): + return max_packet -- 2.42.0 From e24ba9f8862be21a699777bc01801d97a2bc7446 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Wed, 6 Oct 2021 08:44:43 +0200 Subject: [PATCH 03/12] platform is modified in-place, no need to return --- src/gateware/zc706.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gateware/zc706.py b/src/gateware/zc706.py index 69d72e4..4c32145 100755 --- a/src/gateware/zc706.py +++ b/src/gateware/zc706.py @@ -136,7 +136,6 @@ def prepare_zc706_platform(platform): ]) platform.add_platform_command("create_clock -name clk_fpga_0 -period 8 [get_pins \"PS7/FCLKCLK[0]\"]") platform.add_platform_command("set_input_jitter clk_fpga_0 0.24") - return platform class ZC706(SoCCore): @@ -145,7 +144,7 @@ class ZC706(SoCCore): self.rustc_cfg = dict() platform = zc706.Platform() - platform = prepare_zc706_platform(platform) + prepare_zc706_platform(platform) ident = self.__class__.__name__ if self.acpki: @@ -199,7 +198,7 @@ class _MasterBase(SoCCore): self.rustc_cfg = dict() platform = zc706.Platform() - platform = prepare_zc706_platform(platform) + prepare_zc706_platform(platform) ident = self.__class__.__name__ if self.acpki: ident = "acpki_" + ident @@ -337,7 +336,7 @@ class _SatelliteBase(SoCCore): self.rustc_cfg = dict() platform = zc706.Platform() - platform = prepare_zc706_platform(platform) + prepare_zc706_platform(platform) ident = self.__class__.__name__ if self.acpki: ident = "acpki_" + ident -- 2.42.0 From 9bbc12be2334688283e1b741bff09b247a4e6ebf Mon Sep 17 00:00:00 2001 From: mwojcik Date: Wed, 6 Oct 2021 09:08:11 +0200 Subject: [PATCH 04/12] aux_controller renamed to drtio_aux_controller --- src/gateware/{aux_controller.py => drtio_aux_controller.py} | 0 src/gateware/kasli_soc.py | 2 +- src/gateware/zc706.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/gateware/{aux_controller.py => drtio_aux_controller.py} (100%) diff --git a/src/gateware/aux_controller.py b/src/gateware/drtio_aux_controller.py similarity index 100% rename from src/gateware/aux_controller.py rename to src/gateware/drtio_aux_controller.py diff --git a/src/gateware/kasli_soc.py b/src/gateware/kasli_soc.py index c4ca52b..82a46f4 100755 --- a/src/gateware/kasli_soc.py +++ b/src/gateware/kasli_soc.py @@ -24,7 +24,7 @@ from artiq.gateware.drtio import * import dma import analyzer import acpki -import aux_controller +import drtio_aux_controller class RTIOCRG(Module, AutoCSR): def __init__(self, platform): diff --git a/src/gateware/zc706.py b/src/gateware/zc706.py index 4c32145..c982c70 100755 --- a/src/gateware/zc706.py +++ b/src/gateware/zc706.py @@ -24,7 +24,7 @@ from artiq.gateware.drtio import * import dma import analyzer import acpki -import aux_controller +import drtio_aux_controller class RTIOCRG(Module, AutoCSR): def __init__(self, platform, rtio_internal_clk): -- 2.42.0 From 91fae0b6c9b20b4cd397f3669349992bfd55ff1a Mon Sep 17 00:00:00 2001 From: mwojcik Date: Wed, 6 Oct 2021 10:47:50 +0200 Subject: [PATCH 05/12] fix aux_controller -> drtio_aux_controller --- src/gateware/kasli_soc.py | 4 ++-- src/gateware/zc706.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gateware/kasli_soc.py b/src/gateware/kasli_soc.py index 82a46f4..ff1667c 100755 --- a/src/gateware/kasli_soc.py +++ b/src/gateware/kasli_soc.py @@ -279,7 +279,7 @@ class GenericMaster(SoCCore): self.drtio_cri.append(core.cri) self.csr_devices.append(core_name) - coreaux = cdr(aux_controller.DRTIOAuxControllerBare(core.link_layer)) + coreaux = cdr(drtio_aux_controller.DRTIOAuxControllerBare(core.link_layer)) setattr(self.submodules, coreaux_name, coreaux) self.csr_devices.append(coreaux_name) @@ -412,7 +412,7 @@ class GenericSatellite(SoCCore): self.drtio_cri.append(core.cri) self.csr_devices.append(corerep_name) - coreaux = cdr(aux_controller.DRTIOAuxControllerBare(core.link_layer)) + coreaux = cdr(drtio_aux_controller.DRTIOAuxControllerBare(core.link_layer)) setattr(self.submodules, coreaux_name, coreaux) self.csr_devices.append(coreaux_name) diff --git a/src/gateware/zc706.py b/src/gateware/zc706.py index c982c70..9ef1c76 100755 --- a/src/gateware/zc706.py +++ b/src/gateware/zc706.py @@ -248,7 +248,7 @@ class _MasterBase(SoCCore): self.drtio_cri.append(core.cri) self.csr_devices.append(core_name) - coreaux = cdr(aux_controller.DRTIOAuxControllerBare(core.link_layer)) + coreaux = cdr(drtio_aux_controller.DRTIOAuxControllerBare(core.link_layer)) setattr(self.submodules, coreaux_name, coreaux) self.csr_devices.append(coreaux_name) @@ -384,7 +384,7 @@ class _SatelliteBase(SoCCore): # Repeaters - there would be for i != 0 - however zc706 only has one SFP # and no other means to connect to - coreaux = cdr(aux_controller.DRTIOAuxControllerBare(core.link_layer)) + coreaux = cdr(drtio_aux_controller.DRTIOAuxControllerBare(core.link_layer)) setattr(self.submodules, coreaux_name, coreaux) self.csr_devices.append(coreaux_name) -- 2.42.0 From 0f8a7f3a4cb38ca476b450ff8f69232a317200b4 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Wed, 6 Oct 2021 11:31:39 +0200 Subject: [PATCH 06/12] kasli_soc: fix master rtio clock --- src/gateware/kasli_soc.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/gateware/kasli_soc.py b/src/gateware/kasli_soc.py index ff1667c..30c5d05 100755 --- a/src/gateware/kasli_soc.py +++ b/src/gateware/kasli_soc.py @@ -210,6 +210,7 @@ class GenericStandalone(SoCCore): class GenericMaster(SoCCore): def __init__(self, description, acpki=False): sys_clk_freq = 125e6 + rtio_clk_freq = 125e6 self.acpki = acpki self.rustc_cfg = dict() @@ -237,12 +238,8 @@ class GenericMaster(SoCCore): self.csr_devices.append("drtio_transceiver") self.crg = self.ps7 # HACK for eem_7series to find the clock - self.submodules.rtio_crg = RTIOCRG(self.platform) + self.submodules.rtio_crg = _RTIOClockMultiplier(rtio_clk_freq) self.csr_devices.append("rtio_crg") - self.platform.add_period_constraint(self.rtio_crg.cd_rtio.clk, 8.) - self.platform.add_false_path_constraints( - self.ps7.cd_sys.clk, - self.rtio_crg.cd_rtio.clk) self.rtio_channels = [] has_grabber = any(peripheral["type"] == "grabber" for peripheral in description["peripherals"]) @@ -330,9 +327,6 @@ class GenericMaster(SoCCore): if has_grabber: self.rustc_cfg["has_grabber"] = None self.add_csr_group("grabber", self.grabber_csr_group) - for grabber in self.grabber_csr_group: - self.platform.add_false_path_constraints( - self.rtio_crg.cd_rtio.clk, getattr(self, grabber).deserializer.cd_cl.clk) class GenericSatellite(SoCCore): -- 2.42.0 From df5436409d99d528d235bd72d6f12139cc2fa8c5 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Wed, 6 Oct 2021 11:39:45 +0200 Subject: [PATCH 07/12] prepared for rtioclkmultiplier/serdes in artiq --- src/gateware/kasli_soc.py | 36 +++------------------------- src/gateware/zc706.py | 49 ++++----------------------------------- 2 files changed, 7 insertions(+), 78 deletions(-) diff --git a/src/gateware/kasli_soc.py b/src/gateware/kasli_soc.py index 30c5d05..f6f98b4 100755 --- a/src/gateware/kasli_soc.py +++ b/src/gateware/kasli_soc.py @@ -15,7 +15,7 @@ from misoc.integration import cpu_interface from artiq.coredevice import jsondesc from artiq.gateware import rtio, eem_7series from artiq.gateware.rtio.phy import ttl_simple - +from artiq.gateware.rtio.xilinx_clocking import RTIOClockMultiplier from artiq.gateware.drtio.transceiver import gtx_7series from artiq.gateware.drtio.siphaser import SiPhaser7Series from artiq.gateware.drtio.rx_synchronizer import XilinxRXSynchronizer @@ -75,36 +75,6 @@ class RTIOCRG(Module, AutoCSR): MultiReg(pll_locked, self.pll_locked.status) ] - -class _RTIOClockMultiplier(Module, AutoCSR): - def __init__(self, rtio_clk_freq): - self.pll_reset = CSRStorage(reset=1) - self.pll_locked = CSRStatus() - self.clock_domains.cd_rtiox4 = ClockDomain(reset_less=True) - - # See "Global Clock Network Deskew Using Two BUFGs" in ug472. - clkfbout = Signal() - clkfbin = Signal() - rtiox4_clk = Signal() - pll_locked = Signal() - self.specials += [ - Instance("MMCME2_BASE", - p_CLKIN1_PERIOD=1e9/rtio_clk_freq, - i_CLKIN1=ClockSignal("rtio"), - i_RST=self.pll_reset.storage, - o_LOCKED=pll_locked, - - p_CLKFBOUT_MULT_F=8.0, p_DIVCLK_DIVIDE=1, - - o_CLKFBOUT=clkfbout, i_CLKFBIN=clkfbin, - - p_CLKOUT0_DIVIDE_F=2.0, o_CLKOUT0=rtiox4_clk, - ), - Instance("BUFG", i_I=clkfbout, o_O=clkfbin), - Instance("BUFG", i_I=rtiox4_clk, o_O=self.cd_rtiox4.clk), - - MultiReg(pll_locked, self.pll_locked.status) - ] eem_iostandard_dict = { 0: "LVDS_25", @@ -238,7 +208,7 @@ class GenericMaster(SoCCore): self.csr_devices.append("drtio_transceiver") self.crg = self.ps7 # HACK for eem_7series to find the clock - self.submodules.rtio_crg = _RTIOClockMultiplier(rtio_clk_freq) + self.submodules.rtio_crg = RTIOClockMultiplier(rtio_clk_freq) self.csr_devices.append("rtio_crg") self.rtio_channels = [] @@ -350,7 +320,7 @@ class GenericSatellite(SoCCore): platform.add_platform_command("set_input_jitter clk_fpga_0 0.24") self.crg = self.ps7 # HACK for eem_7series to find the clock - self.submodules.rtio_crg = _RTIOClockMultiplier(rtio_clk_freq) + self.submodules.rtio_crg = RTIOClockMultiplier(rtio_clk_freq) self.csr_devices.append("rtio_crg") data_pads = [platform.request("sfp", i) for i in range(4)] diff --git a/src/gateware/zc706.py b/src/gateware/zc706.py index 9ef1c76..b636688 100755 --- a/src/gateware/zc706.py +++ b/src/gateware/zc706.py @@ -15,7 +15,7 @@ from misoc.cores import gpio from artiq.gateware import rtio, nist_clock, nist_qc2 from artiq.gateware.rtio.phy import ttl_simple, ttl_serdes_7series, dds, spi2 - +from artiq.gateware.rtio.xilinx_clocking import RTIOClockMultiplier, fix_serdes_timing_path from artiq.gateware.drtio.transceiver import gtx_7series from artiq.gateware.drtio.siphaser import SiPhaser7Series from artiq.gateware.drtio.rx_synchronizer import XilinxRXSynchronizer @@ -26,6 +26,7 @@ import analyzer import acpki import drtio_aux_controller + class RTIOCRG(Module, AutoCSR): def __init__(self, platform, rtio_internal_clk): self.clock_sel = CSRStorage() @@ -70,48 +71,6 @@ class RTIOCRG(Module, AutoCSR): ] -class _RTIOClockMultiplier(Module, AutoCSR): - def __init__(self, rtio_clk_freq): - self.pll_reset = CSRStorage(reset=1) - self.pll_locked = CSRStatus() - self.clock_domains.cd_rtiox4 = ClockDomain(reset_less=True) - - # See "Global Clock Network Deskew Using Two BUFGs" in ug472. - clkfbout = Signal() - clkfbin = Signal() - rtiox4_clk = Signal() - pll_locked = Signal() - self.specials += [ - Instance("MMCME2_BASE", - p_CLKIN1_PERIOD=1e9/rtio_clk_freq, - i_CLKIN1=ClockSignal("rtio"), - i_RST=self.pll_reset.storage, - o_LOCKED=pll_locked, - - p_CLKFBOUT_MULT_F=8.0, p_DIVCLK_DIVIDE=1, - - o_CLKFBOUT=clkfbout, i_CLKFBIN=clkfbin, - - p_CLKOUT0_DIVIDE_F=2.0, o_CLKOUT0=rtiox4_clk, - ), - Instance("BUFG", i_I=clkfbout, o_O=clkfbin), - Instance("BUFG", i_I=rtiox4_clk, o_O=self.cd_rtiox4.clk), - - MultiReg(pll_locked, self.pll_locked.status) - ] - - -def fix_serdes_timing_path(platform): - # ignore timing of path from OSERDESE2 through the pad to ISERDESE2 - platform.add_platform_command( - "set_false_path -quiet " - "-through [get_pins -filter {{REF_PIN_NAME == OQ || REF_PIN_NAME == TQ}} " - "-of [get_cells -filter {{REF_NAME == OSERDESE2}}]] " - "-to [get_pins -filter {{REF_PIN_NAME == D}} " - "-of [get_cells -filter {{REF_NAME == ISERDESE2}}]]" - ) - - # The NIST backplanes require setting VADJ to 3.3V by reprogramming the power supply. # This also changes the I/O standard for some on-board LEDs. leds_fmc33 = [ @@ -288,7 +247,7 @@ class _MasterBase(SoCCore): platform.add_false_path_constraints( self.ps7.cd_sys.clk, gtx0.txoutclk, gtx.rxoutclk) - self.submodules.rtio_crg = _RTIOClockMultiplier(self.sys_clk_freq) + self.submodules.rtio_crg = RTIOClockMultiplier(self.sys_clk_freq) self.csr_devices.append("rtio_crg") fix_serdes_timing_path(self.platform) @@ -437,7 +396,7 @@ class _SatelliteBase(SoCCore): platform.add_false_path_constraints( self.ps7.cd_sys.clk, gtx.rxoutclk) - self.submodules.rtio_crg = _RTIOClockMultiplier(self.sys_clk_freq) + self.submodules.rtio_crg = RTIOClockMultiplier(self.sys_clk_freq) self.csr_devices.append("rtio_crg") fix_serdes_timing_path(self.platform) -- 2.42.0 From 655bcb99cf4fe8f8cbc7ed5c5c98226a3c301c3d Mon Sep 17 00:00:00 2001 From: mwojcik Date: Wed, 6 Oct 2021 11:45:46 +0200 Subject: [PATCH 08/12] removed use_si5324_33 --- src/gateware/zc706.py | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/src/gateware/zc706.py b/src/gateware/zc706.py index b636688..95441fe 100755 --- a/src/gateware/zc706.py +++ b/src/gateware/zc706.py @@ -152,7 +152,7 @@ class ZC706(SoCCore): class _MasterBase(SoCCore): - def __init__(self, acpki=False, use_si5324_33=False): + def __init__(self, acpki=False): self.acpki = acpki self.rustc_cfg = dict() @@ -163,11 +163,7 @@ class _MasterBase(SoCCore): ident = "acpki_" + ident SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident) - platform.add_platform_command("create_clock -name clk_fpga_0 -period 8 [get_pins \"PS7/FCLKCLK[0]\"]") - platform.add_platform_command("set_input_jitter clk_fpga_0 0.24") - - if use_si5324_33: - platform.add_extension(si5324_fmc33) + platform.add_extension(si5324_fmc33) self.sys_clk_freq = 125e6 @@ -223,10 +219,7 @@ class _MasterBase(SoCCore): self.rustc_cfg["RTIO_FREQUENCY"] = str(self.drtio_transceiver.rtio_clk_freq/1e6) - if use_si5324_33: - self.submodules.si5324_rst_n = gpio.GPIOOut(platform.request("si5324_33").rst_n) - else: - self.submodules.si5324_rst_n = gpio.GPIOOut(platform.request("si5324").rst_n) + self.submodules.si5324_rst_n = gpio.GPIOOut(platform.request("si5324_33").rst_n) self.csr_devices.append("si5324_rst_n") self.rustc_cfg["has_si5324"] = None self.rustc_cfg["si5324_as_synthesizer"] = None @@ -290,7 +283,7 @@ class _MasterBase(SoCCore): class _SatelliteBase(SoCCore): - def __init__(self, acpki=False, use_si5324_33=False): + def __init__(self, acpki=False): self.acpki = acpki self.rustc_cfg = dict() @@ -301,8 +294,7 @@ class _SatelliteBase(SoCCore): ident = "acpki_" + ident SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident) - if use_si5324_33: - platform.add_extension(si5324_fmc33) + platform.add_extension(si5324_fmc33) self.sys_clk_freq = 125e6 platform = self.platform @@ -372,10 +364,7 @@ class _SatelliteBase(SoCCore): platform.add_false_path_constraints( self.ps7.cd_sys.clk, self.siphaser.mmcm_freerun_output) self.csr_devices.append("siphaser") - if use_si5324_33: - self.submodules.si5324_rst_n = gpio.GPIOOut(platform.request("si5324_33").rst_n) - else: - self.submodules.si5324_rst_n = gpio.GPIOOut(platform.request("si5324").rst_n) + self.submodules.si5324_rst_n = gpio.GPIOOut(platform.request("si5324_33").rst_n) self.csr_devices.append("si5324_rst_n") self.rustc_cfg["has_si5324"] = None self.rustc_cfg["has_siphaser"] = None @@ -549,12 +538,12 @@ class Simple(ZC706, _Simple_RTIO): class Master(_MasterBase, _Simple_RTIO): def __init__(self, acpki): - _MasterBase.__init__(self, acpki, use_si5324_33=False) + _MasterBase.__init__(self, acpki) _Simple_RTIO.__init__(self) class Satellite(_SatelliteBase, _Simple_RTIO): def __init__(self, acpki): - _SatelliteBase.__init__(self, acpki, use_si5324_33=False) + _SatelliteBase.__init__(self, acpki) _Simple_RTIO.__init__(self) class NIST_CLOCK(ZC706, _NIST_CLOCK_RTIO): @@ -564,13 +553,13 @@ class NIST_CLOCK(ZC706, _NIST_CLOCK_RTIO): class NIST_CLOCK_Master(_MasterBase, _NIST_CLOCK_RTIO): def __init__(self, acpki): - _MasterBase.__init__(self, acpki, use_si5324_33=True) + _MasterBase.__init__(self, acpki) _NIST_CLOCK_RTIO.__init__(self) class NIST_CLOCK_Satellite(_SatelliteBase, _NIST_CLOCK_RTIO): def __init__(self, acpki): - _SatelliteBase.__init__(self, acpki, use_si5324_33=True) + _SatelliteBase.__init__(self, acpki) _NIST_CLOCK_RTIO.__init__(self) class NIST_QC2(ZC706, _NIST_QC2_RTIO): @@ -580,12 +569,12 @@ class NIST_QC2(ZC706, _NIST_QC2_RTIO): class NIST_QC2_Master(_MasterBase, _NIST_QC2_RTIO): def __init__(self, acpki): - _MasterBase.__init__(self, acpki, use_si5324_33=True) + _MasterBase.__init__(self, acpki) _NIST_QC2_RTIO.__init__(self) class NIST_QC2_Satellite(_SatelliteBase, _NIST_QC2_RTIO): def __init__(self, acpki): - _SatelliteBase.__init__(self, acpki, use_si5324_33=True) + _SatelliteBase.__init__(self, acpki) _NIST_QC2_RTIO.__init__(self) -- 2.42.0 From 25c5b670fa886a352efee6ebdf371a6eae257d8b Mon Sep 17 00:00:00 2001 From: mwojcik Date: Wed, 6 Oct 2021 11:51:54 +0200 Subject: [PATCH 09/12] removed simple variants targets --- src/gateware/zc706.py | 39 +++------------------------------------ 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/src/gateware/zc706.py b/src/gateware/zc706.py index 95441fe..086b038 100755 --- a/src/gateware/zc706.py +++ b/src/gateware/zc706.py @@ -416,22 +416,6 @@ class _SatelliteBase(SoCCore): self.csr_devices.append("routing_table") -class _Simple_RTIO: - def __init__(self): - platform = self.platform - - rtio_channels = [] - for i in range(4): - phy = ttl_simple.Output(platform.request("user_led", i)) - self.submodules += phy - rtio_channels.append(rtio.Channel.from_phy(phy)) - - self.config["RTIO_LOG_CHANNEL"] = len(rtio_channels) - rtio_channels.append(rtio.LogChannel()) - - self.add_rtio(rtio_channels) - - class _NIST_CLOCK_RTIO: """ NIST clock hardware, with old backplane and 11 DDS channels @@ -530,22 +514,6 @@ class _NIST_QC2_RTIO: self.add_rtio(rtio_channels) - -class Simple(ZC706, _Simple_RTIO): - def __init__(self, acpki): - ZC706.__init__(self, acpki) - _Simple_RTIO.__init__(self) - -class Master(_MasterBase, _Simple_RTIO): - def __init__(self, acpki): - _MasterBase.__init__(self, acpki) - _Simple_RTIO.__init__(self) - -class Satellite(_SatelliteBase, _Simple_RTIO): - def __init__(self, acpki): - _SatelliteBase.__init__(self, acpki) - _Simple_RTIO.__init__(self) - class NIST_CLOCK(ZC706, _NIST_CLOCK_RTIO): def __init__(self, acpki): ZC706.__init__(self, acpki) @@ -578,8 +546,7 @@ class NIST_QC2_Satellite(_SatelliteBase, _NIST_QC2_RTIO): _NIST_QC2_RTIO.__init__(self) -VARIANTS = {cls.__name__.lower(): cls for cls in [Simple, Master, Satellite, - NIST_CLOCK, NIST_CLOCK_Master, NIST_CLOCK_Satellite, +VARIANTS = {cls.__name__.lower(): cls for cls in [NIST_CLOCK, NIST_CLOCK_Master, NIST_CLOCK_Satellite, NIST_QC2, NIST_QC2_Master, NIST_QC2_Satellite]} @@ -614,9 +581,9 @@ def main(): help="build Rust compiler configuration into the specified file") parser.add_argument("-g", default=None, help="build gateware into the specified directory") - parser.add_argument("-V", "--variant", default="simple", + parser.add_argument("-V", "--variant", default="nist_clock", help="variant: " - "[acpki_]simple/nist_clock/nist_qc2 " + "[acpki_]nist_clock/nist_qc2[_master/_satellite] " "(default: %(default)s)") args = parser.parse_args() -- 2.42.0 From 7362f6784da064de79e419360a90e01402e6b7a8 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Wed, 6 Oct 2021 11:53:34 +0200 Subject: [PATCH 10/12] Revert "removed simple variants targets" - this is not the place for it This reverts commit 25c5b670fa886a352efee6ebdf371a6eae257d8b. --- src/gateware/zc706.py | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/src/gateware/zc706.py b/src/gateware/zc706.py index 086b038..95441fe 100755 --- a/src/gateware/zc706.py +++ b/src/gateware/zc706.py @@ -416,6 +416,22 @@ class _SatelliteBase(SoCCore): self.csr_devices.append("routing_table") +class _Simple_RTIO: + def __init__(self): + platform = self.platform + + rtio_channels = [] + for i in range(4): + phy = ttl_simple.Output(platform.request("user_led", i)) + self.submodules += phy + rtio_channels.append(rtio.Channel.from_phy(phy)) + + self.config["RTIO_LOG_CHANNEL"] = len(rtio_channels) + rtio_channels.append(rtio.LogChannel()) + + self.add_rtio(rtio_channels) + + class _NIST_CLOCK_RTIO: """ NIST clock hardware, with old backplane and 11 DDS channels @@ -514,6 +530,22 @@ class _NIST_QC2_RTIO: self.add_rtio(rtio_channels) + +class Simple(ZC706, _Simple_RTIO): + def __init__(self, acpki): + ZC706.__init__(self, acpki) + _Simple_RTIO.__init__(self) + +class Master(_MasterBase, _Simple_RTIO): + def __init__(self, acpki): + _MasterBase.__init__(self, acpki) + _Simple_RTIO.__init__(self) + +class Satellite(_SatelliteBase, _Simple_RTIO): + def __init__(self, acpki): + _SatelliteBase.__init__(self, acpki) + _Simple_RTIO.__init__(self) + class NIST_CLOCK(ZC706, _NIST_CLOCK_RTIO): def __init__(self, acpki): ZC706.__init__(self, acpki) @@ -546,7 +578,8 @@ class NIST_QC2_Satellite(_SatelliteBase, _NIST_QC2_RTIO): _NIST_QC2_RTIO.__init__(self) -VARIANTS = {cls.__name__.lower(): cls for cls in [NIST_CLOCK, NIST_CLOCK_Master, NIST_CLOCK_Satellite, +VARIANTS = {cls.__name__.lower(): cls for cls in [Simple, Master, Satellite, + NIST_CLOCK, NIST_CLOCK_Master, NIST_CLOCK_Satellite, NIST_QC2, NIST_QC2_Master, NIST_QC2_Satellite]} @@ -581,9 +614,9 @@ def main(): help="build Rust compiler configuration into the specified file") parser.add_argument("-g", default=None, help="build gateware into the specified directory") - parser.add_argument("-V", "--variant", default="nist_clock", + parser.add_argument("-V", "--variant", default="simple", help="variant: " - "[acpki_]nist_clock/nist_qc2[_master/_satellite] " + "[acpki_]simple/nist_clock/nist_qc2 " "(default: %(default)s)") args = parser.parse_args() -- 2.42.0 From b11f689e2dca7e332b71ff2ef6feba86d2f0617c Mon Sep 17 00:00:00 2001 From: mwojcik Date: Thu, 7 Oct 2021 11:44:43 +0200 Subject: [PATCH 11/12] zc706: added user_sma_mgt, repeaters for sat --- src/gateware/zc706.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/gateware/zc706.py b/src/gateware/zc706.py index 95441fe..0f71b20 100755 --- a/src/gateware/zc706.py +++ b/src/gateware/zc706.py @@ -171,7 +171,8 @@ class _MasterBase(SoCCore): self.comb += platform.request("sfp_tx_disable_n").eq(1) data_pads = [ - platform.request("sfp") + platform.request("sfp"), + platform.request("user_sma_mgt") ] # 1000BASE_BX10 Ethernet compatible, 125MHz RTIO clock @@ -302,7 +303,8 @@ class _SatelliteBase(SoCCore): # SFP self.comb += platform.request("sfp_tx_disable_n").eq(0) data_pads = [ - platform.request("sfp") + platform.request("sfp"), + platform.request("user_sma_mgt") ] self.submodules.rtio_tsc = rtio.TSC("sync", glbl_fine_ts_width=3) @@ -316,6 +318,7 @@ class _SatelliteBase(SoCCore): drtioaux_csr_group = [] drtioaux_memory_group = [] + drtiorep_csr_group = [] self.drtio_cri = [] for i in range(len(self.drtio_transceiver.channels)): coreaux_name = "drtioaux" + str(i) @@ -332,8 +335,15 @@ class _SatelliteBase(SoCCore): self.rtio_tsc, self.drtio_transceiver.channels[0], self.rx_synchronizer)) self.submodules.drtiosat = core self.csr_devices.append("drtiosat") - # Repeaters - there would be for i != 0 - however zc706 only has one SFP - # and no other means to connect to + # Repeaters + else: + corerep_name = "drtiorep" + str(i-1) + drtiorep_csr_group.append(corerep_name) + core = cdr(DRTIORepeater( + self.rtio_tsc, self.drtio_transceiver.channels[i])) + setattr(self.submodules, corerep_name, core) + self.drtio_cri.append(core.cri) + self.csr_devices.append(corerep_name) coreaux = cdr(drtio_aux_controller.DRTIOAuxControllerBare(core.link_layer)) setattr(self.submodules, coreaux_name, coreaux) @@ -349,7 +359,7 @@ class _SatelliteBase(SoCCore): # manually, because software refers to rx/tx by halves of entire memory block, not names self.add_memory_region(memory_name, self.mem_map["csr"] + memory_address, mem_size * 2) self.rustc_cfg["has_drtio"] = None - # no repeaters - it does not have drtio routing support + self.rustc_cfg["has_drtio_routing"] = None self.add_csr_group("drtioaux", drtioaux_csr_group) self.add_memory_group("drtioaux_mem", drtioaux_memory_group) -- 2.42.0 From 6c2c4a9119e882e7a9b3742e987a2772950e8291 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Thu, 7 Oct 2021 11:51:34 +0200 Subject: [PATCH 12/12] zc706: forgot to add drtiorep csr group --- src/gateware/zc706.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gateware/zc706.py b/src/gateware/zc706.py index 0f71b20..89def33 100755 --- a/src/gateware/zc706.py +++ b/src/gateware/zc706.py @@ -361,6 +361,7 @@ class _SatelliteBase(SoCCore): self.rustc_cfg["has_drtio"] = None self.rustc_cfg["has_drtio_routing"] = None self.add_csr_group("drtioaux", drtioaux_csr_group) + self.add_csr_group("drtiorep", drtiorep_csr_group) self.add_memory_group("drtioaux_mem", drtioaux_memory_group) self.rustc_cfg["rtio_frequency"] = str(self.drtio_transceiver.rtio_clk_freq/1e6) -- 2.42.0