2021-01-28 03:06:05 +08:00
|
|
|
{ pkgs
|
|
|
|
, artiqVersion
|
|
|
|
, sinaraSystemsSrc
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
jsons =
|
|
|
|
map (jsonFile: builtins.fromJSON (
|
|
|
|
builtins.readFile (sinaraSystemsSrc + "/${jsonFile}")
|
|
|
|
)) (
|
|
|
|
builtins.attrNames (
|
|
|
|
pkgs.lib.filterAttrs (name: type:
|
|
|
|
type != "directory" &&
|
|
|
|
builtins.match ".+\\.json" name != null
|
|
|
|
) (builtins.readDir sinaraSystemsSrc)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
kasli = builtins.listToAttrs (
|
|
|
|
builtins.map ({ variant, base, ... }: {
|
|
|
|
name = "artiq-board-kasli-${variant}";
|
|
|
|
value = {
|
|
|
|
target = "kasli";
|
|
|
|
inherit variant;
|
|
|
|
src = sinaraSystemsSrc + "/${variant}.json";
|
|
|
|
buildCommand = "python -m artiq.gateware.targets.kasli_generic $src";
|
|
|
|
standalone = base == "standalone";
|
|
|
|
};
|
|
|
|
}) (
|
|
|
|
builtins.filter (json:
|
|
|
|
pkgs.lib.strings.versionAtLeast artiqVersion (
|
|
|
|
if json ? min_artiq_version
|
|
|
|
then json.min_artiq_version
|
|
|
|
else "0"
|
|
|
|
)
|
|
|
|
) jsons
|
|
|
|
)
|
|
|
|
);
|
|
|
|
in
|
|
|
|
kasli // {
|
|
|
|
artiq-board-metlino-master = {
|
|
|
|
target = "metlino";
|
|
|
|
variant = "master";
|
|
|
|
buildCommand = "python -m artiq.gateware.targets.metlino";
|
|
|
|
};
|
|
|
|
artiq-board-kc705-nist_qc2 = {
|
|
|
|
target = "kc705";
|
|
|
|
variant = "nist_qc2";
|
|
|
|
};
|
2022-03-20 21:26:06 +08:00
|
|
|
} // (pkgs.lib.optionalAttrs (pkgs.lib.strings.versionAtLeast artiqVersion "7.0") {
|
2021-08-06 16:15:45 +08:00
|
|
|
artiq-board-kc705-nist_clock_master = {
|
|
|
|
target = "kc705";
|
|
|
|
variant = "nist_clock_master";
|
|
|
|
};
|
|
|
|
artiq-board-kc705-nist_qc2_master = {
|
|
|
|
target = "kc705";
|
|
|
|
variant = "nist_qc2_master";
|
|
|
|
};
|
|
|
|
artiq-board-kc705-nist_clock_satellite = {
|
|
|
|
target = "kc705";
|
|
|
|
variant = "nist_clock_satellite";
|
|
|
|
};
|
|
|
|
artiq-board-kc705-nist_qc2_satellite = {
|
|
|
|
target = "kc705";
|
|
|
|
variant = "nist_qc2_satellite";
|
|
|
|
};
|
2021-01-28 03:06:05 +08:00
|
|
|
})
|