def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder for Kasli systems") builder_args(parser) soc_kasli_args(parser) parser.set_defaults(output_dir="artiq_kasli") parser.add_argument("-V", "--variant", default="opticlock", help="variant: opticlock/sysu/master/satellite " "(default: %(default)s)") args = parser.parse_args() variant = args.variant.lower() if variant == "opticlock": cls = Opticlock elif variant == "sysu": cls = SYSU elif variant == "master": cls = Master elif variant == "satellite": cls = Satellite else: raise SystemExit("Invalid variant (-V/--variant)") soc = cls(**soc_kasli_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="Sayma AMC gateware and firmware builder") builder_args(parser) soc_sayma_amc_args(parser) parser.set_defaults(output_dir="artiq_sayma") parser.add_argument("-V", "--variant", default="satellite", help="variant: satellite/simplesatellite " "(default: %(default)s)") parser.add_argument("--sfp", default=False, help="use SFP port for DRTIO instead of uTCA backplane") parser.add_argument("--rtm-csr-csv", default=os.path.join("artiq_sayma", "rtm_gateware", "rtm_csr.csv"), help="CSV file listing remote CSRs on RTM (default: %(default)s)") parser.add_argument("--jdcg-type", default="sawg", help="Change type of signal generator. This is used exclusively for " "development and debugging.") parser.add_argument("--with-wrpll", default=False, action="store_true") args = parser.parse_args() variant = args.variant.lower() if variant == "satellite": soc = Satellite(with_sfp=args.sfp, jdcg_type=args.jdcg_type, with_wrpll=args.with_wrpll, **soc_sayma_amc_argdict(args)) elif variant == "simplesatellite": soc = SimpleSatellite(with_sfp=args.sfp, with_wrpll=args.with_wrpll, **soc_sayma_amc_argdict(args)) else: raise SystemExit("Invalid variant (-V/--variant)") build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="KC705 gateware and firmware builder") builder_args(parser) soc_kc705_args(parser) parser.set_defaults(output_dir="artiq_kc705") parser.add_argument("-V", "--variant", default="nist_clock", help="variant: " "nist_clock/nist_qc2/sma_spi " "(default: %(default)s)") parser.add_argument("--identifier-str", default=None, help="Override ROM identifier") args = parser.parse_args() variant = args.variant.lower() try: cls = VARIANTS[variant] except KeyError: raise SystemExit("Invalid variant (-V/--variant)") soc = cls(identifier_str=args.identifier_str, **soc_kc705_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="Sayma RTM gateware and firmware builder") builder_args(parser) soc_sayma_rtm_args(parser) parser.add_argument("--rtio-clk-freq", default=150, type=int, help="RTIO clock frequency in MHz") parser.add_argument("--with-wrpll", default=False, action="store_true") parser.add_argument("--gateware-identifier-str", default=None, help="Override ROM identifier") parser.set_defaults(output_dir=os.path.join("artiq_sayma", "rtm")) args = parser.parse_args() soc = Satellite(rtio_clk_freq=1e6 * args.rtio_clk_freq, with_wrpll=args.with_wrpll, gateware_identifier_str=args.gateware_identifier_str, **soc_sayma_rtm_argdict(args)) builder = SatmanSoCBuilder(soc, **builder_argdict(args)) try: builder.build() except subprocess.CalledProcessError as e: raise SystemExit("Command {} failed".format(" ".join(e.cmd)))
def main(): parser = argparse.ArgumentParser( description="KC705 gateware and firmware builder") builder_args(parser) soc_kc705_args(parser) parser.set_defaults(output_dir="artiq_kc705") parser.add_argument("-V", "--variant", default="nist_clock", help="variant: " "nist_clock/nist_qc2/sma_spi " "(default: %(default)s)") args = parser.parse_args() variant = args.variant.lower() if variant == "nist_clock": cls = NIST_CLOCK elif variant == "nist_qc2": cls = NIST_QC2 elif variant == "sma_spi": cls = SMA_SPI else: raise SystemExit("Invalid variant (-V/--variant)") soc = cls(**soc_kc705_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="Sayma AMC gateware and firmware builder") builder_args(parser) soc_sayma_amc_args(parser) parser.set_defaults(output_dir="artiq_sayma") parser.add_argument("-V", "--variant", default="satellite", help="variant: satellite/simplesatellite/master " "(default: %(default)s)") parser.add_argument( "--rtm-csr-csv", default=os.path.join("artiq_sayma", "rtm_gateware", "rtm_csr.csv"), help="CSV file listing remote CSRs on RTM (default: %(default)s)") parser.add_argument( "--without-sawg", default=False, action="store_true", help="Remove SAWG RTIO channels feeding the JESD links (speeds up " "compilation time). Replaces them with fixed pattern generators.") args = parser.parse_args() variant = args.variant.lower() if variant == "satellite": soc = Satellite(with_sawg=not args.without_sawg, **soc_sayma_amc_argdict(args)) elif variant == "simplesatellite": soc = SimpleSatellite(**soc_sayma_amc_argdict(args)) elif variant == "master": soc = Master(**soc_sayma_amc_argdict(args)) else: raise SystemExit("Invalid variant (-V/--variant)") build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder for Kasli systems") builder_args(parser) soc_kasli_args(parser) parser.set_defaults(output_dir="artiq_kasli") variants = { cls.__name__.lower(): cls for cls in [ Opticlock, SUServo, SYSU, MITLL, MITLL2, USTC, Tsinghua, WIPM, NUDT, PTB, HUB, LUH, VLBAIMaster, VLBAISatellite, Tester, Master, Satellite ] } parser.add_argument("-V", "--variant", default="opticlock", help="variant: {} (default: %(default)s)".format( "/".join(sorted(variants.keys())))) args = parser.parse_args() variant = args.variant.lower() try: cls = variants[variant] except KeyError: raise SystemExit("Invalid variant (-V/--variant)") soc = cls(**soc_kasli_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ core device builder / KC705 " "+ NIST Ions QC1/CLOCK/QC2 hardware adapters") builder_args(parser) soc_kc705_args(parser) parser.add_argument("-H", "--hw-adapter", default="clock", help="hardware adapter type: qc1/clock/qc2 " "(default: %(default)s)") args = parser.parse_args() hw_adapter = args.hw_adapter.lower() if hw_adapter == "qc1": cls = NIST_QC1 elif hw_adapter == "clock": cls = NIST_CLOCK elif hw_adapter == "qc2": cls = NIST_QC2 else: print("Invalid hardware adapter string (-H/--hw-adapter), " "choose from qc1, clock or qc2") sys.exit(1) soc = cls(**soc_kc705_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder for generic Kasli systems") builder_args(parser) soc_kasli_args(parser) parser.set_defaults(output_dir="artiq_kasli") parser.add_argument("description", metavar="DESCRIPTION", help="JSON system description file") args = parser.parse_args() with open(args.description, "r") as f: description = json.load(f) if description["target"] != "kasli": raise ValueError("Description is for a different target") if description["base"] == "standalone": cls = GenericStandalone elif description["base"] == "master": cls = GenericMaster elif description["base"] == "satellite": cls = GenericSatellite else: raise ValueError("Invalid base") soc = cls(description, **soc_kasli_argdict(args)) args.variant = description["variant"] build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder for KC705 systems") builder_args(parser) soc_kc705_args(parser) parser.set_defaults(output_dir="artiq_kc705") parser.add_argument( "-V", "--variant", default="nist_clock", help="variant: " "[standalone: nist_clock/nist_qc2] " "[DRTIO master: nist_clock_master/nist_qc2_master] " "[DRTIO satellite: nist_clock_satellite/nist_qc2_satellite] " "(default: %(default)s)") parser.add_argument("--gateware-identifier-str", default=None, help="Override ROM identifier") parser.add_argument("--drtio100mhz", action="store_true", default=False, help="DRTIO systems only - use 100MHz RTIO clock") args = parser.parse_args() variant = args.variant.lower() try: cls = VARIANTS[variant] except KeyError: raise SystemExit("Invalid variant (-V/--variant)") soc = cls(gateware_identifier_str=args.gateware_identifier_str, drtio_100mhz=args.drtio100mhz, **soc_kc705_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder / Sayma AMC stand-alone") builder_args(parser) soc_sdram_args(parser) parser.add_argument( "--rtm-csr-csv", default=os.path.join("artiq_sayma_rtm", "sayma_rtm_csr.csv"), help="CSV file listing remote CSRs on RTM (default: %(default)s)") parser.add_argument( "--with-sawg", default=False, action="store_true", help="add JESD204B and SAWG channels (default: %(default)s)") args = parser.parse_args() soc = SaymaAMCStandalone(with_sawg=args.with_sawg, **soc_sdram_argdict(args)) remote_csr_regions = remote_csr.get_remote_csr_regions( soc.mem_map["serwb"] | soc.shadow_base, args.rtm_csr_csv) for name, origin, busword, csrs in remote_csr_regions: soc.add_csr_region(name, origin, busword, csrs) # Configuration for RTM peripherals. Keep in sync with sayma_rtm.py! soc.config["HAS_HMC830_7043"] = None soc.config["CONVERTER_SPI_HMC830_CS"] = 0 soc.config["CONVERTER_SPI_HMC7043_CS"] = 1 soc.config["CONVERTER_SPI_FIRST_AD9154_CS"] = 2 build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder for Kasli systems") builder_args(parser) soc_kasli_args(parser) parser.set_defaults(output_dir="artiq_kasli") parser.add_argument("-V", "--variant", default="tester", help="variant: {} (default: %(default)s)".format( "/".join(sorted(VARIANTS.keys())))) parser.add_argument("--with-wrpll", default=False, action="store_true") parser.add_argument("--identifier-str", default=None, help="Override ROM identifier") args = parser.parse_args() argdict = dict() if args.with_wrpll: argdict["with_wrpll"] = True argdict["identifier_str"] = args.identifier_str variant = args.variant.lower() try: cls = VARIANTS[variant] except KeyError: raise SystemExit("Invalid variant (-V/--variant)") soc = cls(**soc_kasli_argdict(args), **argdict) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder / KC705 DRTIO master") builder_args(parser) soc_kc705_args(parser) args = parser.parse_args() soc = Master(**soc_kc705_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ remote TTL demo (transmitter)") builder_args(parser) soc_kc705_args(parser) args = parser.parse_args() soc = ARTIQTTLTX(**soc_kc705_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder / KC705 phaser demo") builder_args(parser) soc_kc705_args(parser) args = parser.parse_args() soc = Phaser(**soc_kc705_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder / Pipistrello demo") builder_args(parser) soc_pipistrello_args(parser) args = parser.parse_args() soc = Demo(**soc_pipistrello_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder for AFCK 1v1 systems") builder_args(parser) soc_afck1v1_args(parser) parser.set_defaults(output_dir="artiq_afck1v1") args = parser.parse_args() soc = StandaloneBase(**soc_afck1v1_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ core device builder / Pipistrello " "+ NIST Ions QC1 hardware adapter") builder_args(parser) soc_pipistrello_args(parser) args = parser.parse_args() soc = NIST_QC1(**soc_pipistrello_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="Metlino gateware and firmware builder") builder_args(parser) soc_sdram_args(parser) parser.set_defaults(output_dir="artiq_metlino") args = parser.parse_args() args.variant = "master" soc = Master(**soc_sdram_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder / " "KC705 SMA SPI demo/test for PDQ2") builder_args(parser) soc_kc705_args(parser) args = parser.parse_args() soc = SMA_SPI(**soc_kc705_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="Metlino gateware and firmware builder") builder_args(parser) soc_sdram_args(parser) parser.set_defaults(output_dir="artiq_metlino") parser.add_argument("--identifier-str", default=None, help="Override ROM identifier") args = parser.parse_args() args.variant = "master" soc = Master(identifier_str=args.identifier_str, **soc_sdram_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder for Kasli systems") builder_args(parser) parser.set_defaults(output_dir="artiq_sayma_rtm") args = parser.parse_args() soc = Satellite() builder = SatmanSoCBuilder(soc, **builder_argdict(args)) try: builder.build() except subprocess.CalledProcessError as e: raise SystemExit("Command {} failed".format(" ".join(e.cmd)))
def main(): parser = argparse.ArgumentParser( description="Sayma RTM gateware and firmware builder") builder_args(parser) soc_sayma_rtm_args(parser) parser.set_defaults(output_dir="artiq_sayma_rtm") args = parser.parse_args() soc = Satellite(**soc_sayma_rtm_argdict(args)) builder = SatmanSoCBuilder(soc, **builder_argdict(args)) try: builder.build() except subprocess.CalledProcessError as e: raise SystemExit("Command {} failed".format(" ".join(e.cmd)))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder / KC705 DRTIO master") builder_args(parser) soc_kc705_args(parser) parser.add_argument("-c", "--config", default="simple_gbe", help="configuration: simple_gbe/sawg_3g " "(default: %(default)s)") args = parser.parse_args() soc = Master(args.config, **soc_kc705_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="Sayma AMC gateware and firmware builder") builder_args(parser) soc_sdram_args(parser) parser.set_defaults(output_dir="artiq_sayma") parser.add_argument("-V", "--variant", default="standalone", help="variant: " "standalone/masterdac/master/satellite " "(default: %(default)s)") parser.add_argument( "--rtm-csr-csv", default=os.path.join("artiq_sayma", "rtm_gateware", "rtm_csr.csv"), help="CSV file listing remote CSRs on RTM (default: %(default)s)") parser.add_argument( "--without-sawg", default=False, action="store_true", help="Remove SAWG RTIO channels feeding the JESD links (speeds up " "compilation time). Replaces them with fixed pattern generators.") args = parser.parse_args() variant = args.variant.lower() if variant == "standalone": cls = Standalone elif variant == "masterdac": cls = MasterDAC elif variant == "master": cls = lambda with_sawg, **kwargs: Master(**kwargs) elif variant == "satellite": cls = Satellite else: raise SystemExit("Invalid variant (-V/--variant)") soc = cls(with_sawg=not args.without_sawg, **soc_sdram_argdict(args)) if variant != "master": remote_csr_regions = remote_csr.get_remote_csr_regions( soc.mem_map["serwb"] | soc.shadow_base, args.rtm_csr_csv) for name, origin, busword, csrs in remote_csr_regions: soc.add_csr_region(name, origin, busword, csrs) # Configuration for RTM peripherals. Keep in sync with sayma_rtm.py! soc.config["HAS_HMC830_7043"] = None soc.config["CONVERTER_SPI_HMC830_CS"] = 0 soc.config["CONVERTER_SPI_HMC7043_CS"] = 1 soc.config["CONVERTER_SPI_FIRST_AD9154_CS"] = 2 build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="Sayma AMC gateware and firmware builder") builder_args(parser) soc_sdram_args(parser) parser.set_defaults(output_dir="artiq_sayma") parser.add_argument("-V", "--variant", default="standalone", help="variant: " "standalone/master/satellite " "(default: %(default)s)") parser.add_argument("--rtm-csr-csv", default=os.path.join("artiq_sayma", "rtm_gateware", "rtm_csr.csv"), help="CSV file listing remote CSRs on RTM (default: %(default)s)") parser.add_argument("--without-sawg", default=False, action="store_true", help="Remove SAWG RTIO channels feeding the JESD links (speeds up " "compilation time). Replaces them with fixed sawtooth generators.") args = parser.parse_args() variant = args.variant.lower() if variant == "standalone": cls = Standalone elif variant == "master": cls = Master elif variant == "satellite": cls = Satellite else: raise SystemExit("Invalid variant (-V/--variant)") soc = cls(with_sawg=not args.without_sawg, **soc_sdram_argdict(args)) # DRTIO variants do not use the RTM yet. if variant not in {"master", "satellite"}: remote_csr_regions = remote_csr.get_remote_csr_regions( soc.mem_map["serwb"] | soc.shadow_base, args.rtm_csr_csv) for name, origin, busword, csrs in remote_csr_regions: soc.add_csr_region(name, origin, busword, csrs) # Configuration for RTM peripherals. Keep in sync with sayma_rtm.py! soc.config["HAS_HMC830_7043"] = None soc.config["CONVERTER_SPI_HMC830_CS"] = 0 soc.config["CONVERTER_SPI_HMC7043_CS"] = 1 soc.config["CONVERTER_SPI_FIRST_AD9154_CS"] = 2 build_artiq_soc(soc, builder_argdict(args))
def software_main(soc_cls): args = { "cpu_type": None, "csr_csv": None, "hw_rev": None, "integrated_rom_size": None, "no_compile_gateware": True, "no_compile_software": False, "output_dir": 'build/artiq_kasli' } args = FakeArgs(args) print(args) kasli_argdict = soc_kasli_argdict(args) print("kasli args", kasli_argdict) soc = soc_cls(**kasli_argdict) build_argdict = builder_argdict(args) print("builder args", build_argdict) build_artiq_soc(soc, build_argdict)
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder for Kasli systems") builder_args(parser) soc_kasli_args(parser) parser.set_defaults(output_dir="artiq_kasli") parser.add_argument("-V", "--variant", default="opticlock", help="variant: {} (default: %(default)s)".format( "/".join(sorted(VARIANTS.keys())))) args = parser.parse_args() variant = args.variant.lower() try: cls = VARIANTS[variant] except KeyError: raise SystemExit("Invalid variant (-V/--variant)") soc = cls(**soc_kasli_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="MCORD DAQ firmware builder for platform AFCK v1.1") builder_args(parser) soc_afck1v1_args(parser) xilinx_ila_args(parser) parser.add_argument("--with-fmc1", action="store_true", help="Add FMC TDC to FMC1") parser.add_argument("--with-fmc2", action="store_true", help="Add FMC TDC to FMC2") parser.set_defaults(output_dir="build") args = parser.parse_args() os.makedirs(args.output_dir, exist_ok=True) soc = AfckTdc(**mcord_argdict(args), output_dir=args.output_dir) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="KC705 gateware and firmware builder") builder_args(parser) soc_kc705_args(parser) parser.set_defaults(output_dir="artiq_kc705") parser.add_argument("-V", "--variant", default="nist_clock", help="variant: " "nist_clock/nist_qc2/sma_spi " "(default: %(default)s)") args = parser.parse_args() variant = args.variant.lower() try: cls = VARIANTS[variant] except KeyError: raise SystemExit("Invalid variant (-V/--variant)") soc = cls(**soc_kc705_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder / single-FPGA KC705-based " "systems with AD9 DDS (NIST Ions hardware)") builder_args(parser) soc_kc705_args(parser) parser.add_argument("-H", "--hw-adapter", default="nist_clock", help="hardware adapter type: " "nist_clock/nist_qc2 " "(default: %(default)s)") args = parser.parse_args() hw_adapter = args.hw_adapter.lower() if hw_adapter == "nist_clock": cls = NIST_CLOCK elif hw_adapter == "nist_qc2": cls = NIST_QC2 else: raise SystemExit("Invalid hardware adapter string (-H/--hw-adapter)") soc = cls(**soc_kc705_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ core device builder / KC705 " "+ Oxford hardware adapters") builder_args(parser) soc_kc705_args(parser) parser.add_argument("-H", "--hw-adapter", default="oxford_override", help="hardware adapter type: " "oxford / oxford_override " "(default: %(default)s)") args = parser.parse_args() hw_adapter = args.hw_adapter.lower() if hw_adapter == "oxford": cls = Oxford elif hw_adapter == "oxford_override": cls = OxfordOverride else: raise SystemExit("Invalid hardware adapter string (-H/--hw-adapter)") soc = cls(**soc_kc705_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ device binary builder for generic Kasli systems") builder_args(parser) soc_kasli_args(parser) parser.set_defaults(output_dir="artiq_kasli") parser.add_argument("description", metavar="DESCRIPTION", help="JSON system description file") parser.add_argument("--gateware-identifier-str", default=None, help="Override ROM identifier") args = parser.parse_args() description = jsondesc.load(args.description) min_artiq_version = description.get("min_artiq_version", "0") if LooseVersion(artiq_version) < LooseVersion(min_artiq_version): logger.warning("ARTIQ version mismatch: current %s < %s minimum", artiq_version, min_artiq_version) if description["target"] != "kasli": raise ValueError("Description is for a different target") if description["base"] == "standalone": cls = GenericStandalone elif description["base"] == "master": cls = GenericMaster elif description["base"] == "satellite": cls = GenericSatellite else: raise ValueError("Invalid base") soc = cls(description, gateware_identifier_str=args.gateware_identifier_str, **soc_kasli_argdict(args)) args.variant = description["variant"] build_artiq_soc(soc, builder_argdict(args))
def main(): parser = argparse.ArgumentParser( description="ARTIQ core device builder / KC705 " "+ NIST Ions QC1/CLOCK/QC2 hardware adapters") builder_args(parser) soc_kc705_args(parser) parser.add_argument("-H", "--hw-adapter", default="nist_clock", help="hardware adapter type: " "nist_qc1/nist_clock/nist_qc2 " "(default: %(default)s)") args = parser.parse_args() hw_adapter = args.hw_adapter.lower() if hw_adapter == "nist_qc1": cls = NIST_QC1 elif hw_adapter == "nist_clock": cls = NIST_CLOCK elif hw_adapter == "nist_qc2": cls = NIST_QC2 else: raise SystemExit("Invalid hardware adapter string (-H/--hw-adapter)") soc = cls(**soc_kc705_argdict(args)) build_artiq_soc(soc, builder_argdict(args))
if isinstance(self.platform.toolchain, XilinxISEToolchain): self.platform.toolchain.bitgen_opt += " -g compress" self.submodules.leds = gpio.GPIOOut(Cat( self.platform.request("user_led", 0), self.platform.request("user_led", 1))) i2c = self.platform.request("i2c") self.submodules.i2c = gpio.GPIOTristate([i2c.scl, i2c.sda]) self.csr_devices.append("i2c") si5324 = self.platform.request("si5324", 0) self.submodules.si5324_rst_n = gpio.GPIOOut(si5324.rst_n) self.csr_devices.append("si5324_rst_n") self.submodules.si5324_clock_routing = Si5324ClockRouting(self.platform) if __name__ == "__main__": root_dir = os.path.dirname(os.path.abspath(__file__)) parser = argparse.ArgumentParser( description="Si5324 test SoC") builder_args(parser) soc_kc705_args(parser) args = parser.parse_args() soc = Si5324Test(**soc_kc705_argdict(args)) builder = Builder(soc, **builder_argdict(args)) builder.add_software_package("runtime", os.path.join(root_dir, "runtime")) builder.build()