You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

run.py 615B

123456789101112131415161718192021222324
  1. #!/usr/bin/env python
  2. import subprocess
  3. import argparse
  4. def build_experiment(exp, dev_db=None):
  5. output = "firmware/runtime/exp.a"
  6. if not dev_db:
  7. dev_db = "experiments/device_db.py"
  8. subprocess.run(["artiq_compile", "--target", "zynq", "--static", "-o", output, "--device-db", dev_db, exp])
  9. def build_firmware():
  10. subprocess.run(["python", "zedboard.py", "--no-compile-gateware"])
  11. def load():
  12. subprocess.run(["./load.py", "firmware", "run"])
  13. parser = argparse.ArgumentParser()
  14. parser.add_argument("path")
  15. args = parser.parse_args()
  16. build_experiment(args.path)
  17. build_firmware()
  18. load()