Пример #1
0
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))
Пример #2
0
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))
Пример #3
0
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))