mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-18 16:06:30 +08:00
kasli_generic: warn if min_artiq_version is not met
This commit is contained in:
parent
4b2ed67dd7
commit
461199b903
@ -49,7 +49,8 @@ Highlights:
|
||||
with reproducible builds.
|
||||
* Python 3.7 support in Conda packages.
|
||||
* `kasli_generic` JSON descriptions are now validated against a
|
||||
schema. Description defaults have moved from Python to the schema.
|
||||
schema. Description defaults have moved from Python to the
|
||||
schema. Warns if ARTIQ version is too old.
|
||||
|
||||
Breaking changes:
|
||||
|
||||
|
@ -1,16 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
from misoc.integration.builder import builder_args, builder_argdict
|
||||
from misoc.targets.kasli import soc_kasli_args, soc_kasli_argdict
|
||||
|
||||
from artiq import __version__ as artiq_version
|
||||
from artiq.coredevice import jsondesc
|
||||
from artiq.gateware import rtio, eem_7series
|
||||
from artiq.gateware.rtio.phy import ttl_simple
|
||||
from artiq.gateware.targets.kasli import StandaloneBase, MasterBase, SatelliteBase
|
||||
from artiq.build_soc import *
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class GenericStandalone(StandaloneBase):
|
||||
def __init__(self, description, hw_rev=None,**kwargs):
|
||||
@ -139,6 +143,11 @@ def main():
|
||||
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")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user