Ejemplo n.º 1
0
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))
Ejemplo n.º 2
0
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))
Ejemplo n.º 3
0
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="qc1",
                        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))
    builder = Builder(soc, **builder_argdict(args))
    builder.add_software_package("liblwip", os.path.join(artiq_dir, "runtime",
                                                         "liblwip"))
    builder.add_software_package("runtime", os.path.join(artiq_dir, "runtime"))
    builder.build()
Ejemplo n.º 4
0
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 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 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))
Ejemplo n.º 7
0
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))
Ejemplo n.º 8
0
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))
Ejemplo n.º 9
0
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))
Ejemplo n.º 10
0
def main():
    parser = argparse.ArgumentParser(
        description="ARTIQ device binary builder / KC705 DRTIO satellite")
    builder_args(parser)
    soc_kc705_args(parser)
    args = parser.parse_args()

    soc = Satellite(**soc_kc705_argdict(args))
    builder = Builder(soc, **builder_argdict(args))
    builder.add_software_package("satman", os.path.join(artiq_dir, "firmware", "satman"))
    builder.build()
Ejemplo n.º 11
0
def main():
    parser = argparse.ArgumentParser(
        description="ARTIQ device binary builder / KC705 DRTIO satellite")
    builder_args(parser)
    soc_kc705_args(parser)
    args = parser.parse_args()

    soc = Satellite(**soc_kc705_argdict(args))
    builder = Builder(soc, **builder_argdict(args))
    builder.add_software_package("satman", os.path.join(artiq_dir, "firmware", "satman"))
    builder.build()
Ejemplo n.º 12
0
def main():
    parser = argparse.ArgumentParser(
        description="ARTIQ device binary builder / KC705 DRTIO satellite")
    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 = Satellite(args.config, **soc_kc705_argdict(args))
    builder = Builder(soc, **builder_argdict(args))
    builder.add_software_package("satman", os.path.join(artiq_dir, "firmware", "satman"))
    builder.build()
Ejemplo n.º 13
0
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))
Ejemplo n.º 14
0
def main():
    parser = argparse.ArgumentParser(
        description="ARTIQ device binary builder / KC705 DRTIO satellite")
    builder_args(parser)
    soc_kc705_args(parser)
    parser.set_defaults(output_dir="artiq_kc705/satellite")
    parser.add_argument("--sma", default=False, action="store_true",
        help="use the SMA connectors (RX: J17, J18, TX: J19, J20) "
             "as DRTIO satellite channel instead of the SFP")
    args = parser.parse_args()

    argdict = dict()
    argdict["sma_as_sat"] = args.sma

    soc = Satellite(**soc_kc705_argdict(args), **argdict)
    build_artiq_soc(soc, builder_argdict(args))
Ejemplo n.º 15
0
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))
Ejemplo n.º 16
0
Archivo: kc705.py Proyecto: cjbe/artiq
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))
Ejemplo n.º 17
0
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))
Ejemplo n.º 18
0
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))
Ejemplo n.º 19
0
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))
Ejemplo n.º 20
0
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: "
                             "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))
Ejemplo n.º 21
0
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))
Ejemplo n.º 22
0
        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()