2020-05-03 07:45:54 +08:00
|
|
|
let
|
2020-09-09 16:51:03 +08:00
|
|
|
zynq-rs = import <zynq-rs>;
|
2020-09-09 15:23:20 +08:00
|
|
|
artiq-zynq = import <artiq-zynq>;
|
2020-09-09 16:51:03 +08:00
|
|
|
pkgs = import <nixpkgs> {};
|
2020-07-04 23:56:57 +08:00
|
|
|
artiq-fast = import <artiq-fast> { inherit pkgs; };
|
2020-05-03 07:45:54 +08:00
|
|
|
in
|
2020-05-03 09:46:28 +08:00
|
|
|
(
|
2020-09-09 16:51:03 +08:00
|
|
|
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) zynq-rs
|
2020-05-03 09:46:28 +08:00
|
|
|
) // (
|
|
|
|
builtins.mapAttrs (key: value: pkgs.lib.hydraJob value) artiq-zynq
|
2020-07-04 17:27:42 +08:00
|
|
|
) // {
|
2020-07-13 19:05:50 +08:00
|
|
|
gateware-sim = pkgs.lib.hydraJob (pkgs.stdenv.mkDerivation {
|
|
|
|
name = "gateware-sim";
|
|
|
|
buildInputs = [ artiq-fast.migen artiq-fast.migen-axi artiq-fast.artiq ];
|
|
|
|
|
|
|
|
phases = [ "buildPhase" ];
|
|
|
|
|
|
|
|
buildPhase =
|
|
|
|
''
|
|
|
|
python -m unittest discover ${<artiq-zynq>}/src/gateware -v
|
|
|
|
touch $out
|
|
|
|
'';
|
|
|
|
});
|
2020-07-04 17:27:42 +08:00
|
|
|
zc706-hitl-tests = pkgs.lib.hydraJob (pkgs.stdenv.mkDerivation {
|
|
|
|
name = "zc706-hitl-tests";
|
|
|
|
|
|
|
|
# requires patched Nix
|
|
|
|
__networked = true;
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-07-05 23:18:06 +08:00
|
|
|
pkgs.netcat pkgs.openssh pkgs.rsync artiq-fast.artiq
|
2020-07-04 17:27:42 +08:00
|
|
|
];
|
|
|
|
phases = [ "buildPhase" ];
|
|
|
|
|
|
|
|
buildPhase =
|
|
|
|
''
|
2020-07-06 12:44:32 +08:00
|
|
|
echo Power cycling board...
|
2020-09-09 16:33:28 +08:00
|
|
|
(echo b; sleep 5; echo B; sleep 5) | nc -N -w6 192.168.1.31 3131
|
2020-07-06 12:44:32 +08:00
|
|
|
echo Power cycle done.
|
2020-07-05 23:18:06 +08:00
|
|
|
|
2020-07-04 23:58:32 +08:00
|
|
|
export USER=hydra
|
2020-09-09 15:44:09 +08:00
|
|
|
export OPENOCD_ZYNQ=${<zynq-rs>}/openocd
|
2020-07-05 00:02:22 +08:00
|
|
|
pushd ${<artiq-zynq>}
|
2020-09-01 17:53:07 +08:00
|
|
|
bash ${<artiq-zynq>}/remote_run.sh -h rpi-4 -o "-F /dev/null -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -i /opt/hydra_id_rsa" -d ${artiq-zynq.zc706-nist_qc2-jtag}
|
2020-07-05 00:02:22 +08:00
|
|
|
popd
|
2020-07-04 17:27:42 +08:00
|
|
|
|
2020-07-06 12:44:32 +08:00
|
|
|
echo Waiting for the firmware to boot...
|
2020-07-04 23:56:57 +08:00
|
|
|
sleep 15
|
|
|
|
|
2020-07-06 12:44:32 +08:00
|
|
|
echo Running test kernel...
|
2020-07-05 00:02:22 +08:00
|
|
|
artiq_run --device-db ${<artiq-zynq>}/examples/device_db.py ${<artiq-zynq>}/examples/mandelbrot.py
|
2020-07-04 23:56:57 +08:00
|
|
|
|
2020-09-01 17:53:07 +08:00
|
|
|
echo Running ARTIQ unit tests...
|
2020-09-01 17:53:58 +08:00
|
|
|
ARTIQ_ROOT=${<artiq-zynq>}/examples python -m unittest discover artiq.test.coredevice -v
|
2020-09-01 17:53:07 +08:00
|
|
|
|
2020-07-04 17:27:42 +08:00
|
|
|
touch $out
|
2020-07-05 20:48:40 +08:00
|
|
|
|
|
|
|
echo Completed
|
2020-07-04 17:27:42 +08:00
|
|
|
'';
|
|
|
|
});
|
|
|
|
}
|