Skip to content

Commit df7489f

Browse files
committedAug 20, 2015
travis/conda: add automated builds for kc705 nist_qc2 subtarget
1 parent c6bba4d commit df7489f

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed
 

Diff for: ‎artiq/frontend/artiq_flash.sh

+18-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ ARTIQ_PREFIX=$(python3 -c "import artiq; print(artiq.__path__[0])")
99

1010
# Default is kc705
1111
BOARD=kc705
12+
# Default carrier board is nist_qc1
13+
CARRIER_BOARD=nist_qc1
1214

1315
while getopts "bBrht:d:f:" opt
1416
do
@@ -53,17 +55,29 @@ do
5355
exit 1
5456
fi
5557
;;
58+
c)
59+
if [ "$OPTARG" == "nist_qc1" ]
60+
then
61+
CARRIER_BOARD=nist_qc1
62+
elif [ "$OPTARG" == "nist_qc2" ]
63+
then
64+
CARRIER_BOARD=nist_qc2
65+
else
66+
echo "KC705 carrier board is either nist_qc1 or nist_qc2"
67+
exit 1
68+
fi
5669
*)
5770
echo "ARTIQ flashing tool"
5871
echo ""
5972
echo "To flash everything, do not use any of the -b|-B|-r option."
6073
echo ""
61-
echo "usage: $0 [-b] [-B] [-r] [-h] [-t kc705|pipistrello] [-d path]"
74+
echo "usage: $0 [-b] [-B] [-r] [-h] [-c nist_qc1|nist_qc2] [-t kc705|pipistrello] [-d path] [-f path]"
6275
echo "-b Flash bitstream"
6376
echo "-B Flash BIOS"
6477
echo "-r Flash ARTIQ runtime"
6578
echo "-h Show this help message"
6679
echo "-t Target (kc705, pipistrello, default is: kc705)"
80+
echo "-c Carrier board (nist_qc1, nist_qc2, default is: nist_qc1)"
6781
echo "-f Flash storage image generated with artiq_mkfs"
6882
echo "-d Directory containing the binaries to be flashed"
6983
exit 1
@@ -103,11 +117,12 @@ fi
103117
if [ "$BOARD" == "kc705" ]
104118
then
105119
UDEV_RULES=99-kc705.rules
106-
BITSTREAM=artiq_kc705-nist_qc1-kc705.bit
120+
BITSTREAM=artiq_kc705-${CARRIER_BOARD}-kc705.bit
107121
CABLE=jtaghs1_fast
108122
PROXY=bscan_spi_kc705.bit
109123
BIOS_ADDR=0xaf0000
110124
RUNTIME_ADDR=0xb00000
125+
RUNTIME_FILENAME=runtime_${CARRIER_BOARD}.fbi
111126
FS_ADDR=0xb40000
112127
if [ -z "$BIN_PREFIX" ]; then BIN_PREFIX=$ARTIQ_PREFIX/binaries/kc705; fi
113128
search_for_proxy $PROXY
@@ -119,6 +134,7 @@ then
119134
PROXY=bscan_spi_lx45_csg324.bit
120135
BIOS_ADDR=0x170000
121136
RUNTIME_ADDR=0x180000
137+
RUNTIME_FILENAME=runtime.fbi
122138
FS_ADDR=0x1c0000
123139
if [ -z "$BIN_PREFIX" ]; then BIN_PREFIX=$ARTIQ_PREFIX/binaries/pipistrello; fi
124140
search_for_proxy $PROXY

Diff for: ‎conda/artiq/build.sh

+14-3
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ BIN_PREFIX=$ARTIQ_PREFIX/binaries/
1616
mkdir -p $ARTIQ_PREFIX/misc
1717
mkdir -p $BIN_PREFIX/kc705 $BIN_PREFIX/pipistrello
1818

19-
# build for KC705
19+
# build for KC705 NIST_QC1
2020

2121
cd $SRC_DIR/misoc; $PYTHON make.py -X ../soc -t artiq_kc705 build-headers build-bios; cd -
2222
make -C soc/runtime clean runtime.fbi
2323
cd $SRC_DIR/misoc; $PYTHON make.py -X ../soc -t artiq_kc705 $MISOC_EXTRA_VIVADO_CMDLINE build-bitstream; cd -
2424

25-
# install KC705 binaries
25+
# install KC705 NIST_QC1 binaries
2626

27-
cp soc/runtime/runtime.fbi $BIN_PREFIX/kc705/
27+
cp soc/runtime/runtime.fbi $BIN_PREFIX/kc705/runtime_nist_qc1.fbi
2828
cp $SRC_DIR/misoc/software/bios/bios.bin $BIN_PREFIX/kc705/
2929
cp $SRC_DIR/misoc/build/artiq_kc705-nist_qc1-kc705.bit $BIN_PREFIX/kc705/
3030
wget http://sionneau.net/artiq/binaries/kc705/flash_proxy/bscan_spi_kc705.bit
@@ -44,6 +44,17 @@ cp $SRC_DIR/misoc/build/artiq_pipistrello-nist_qc1-pipistrello.bit $BIN_PREFIX/p
4444
wget http://www.phys.ethz.ch/~robertjo/bscan_spi_lx45_csg324.bit
4545
mv bscan_spi_lx45_csg324.bit $BIN_PREFIX/pipistrello/
4646

47+
# build for KC705 NIST_QC2
48+
49+
cd $SRC_DIR/misoc; $PYTHON make.py -X ../soc -t artiq_kc705 -s NIST_QC2 build-headers; cd -
50+
make -C soc/runtime clean runtime.fbi
51+
cd $SRC_DIR/misoc; $PYTHON make.py -X ../soc -t artiq_kc705 -s NIST_QC2 $MISOC_EXTRA_VIVADO_CMDLINE build-bitstream; cd -
52+
53+
# install KC705 NIST_QC2 binaries
54+
55+
cp soc/runtime/runtime.fbi $BIN_PREFIX/kc705/runtime_nist_qc2.fbi
56+
cp $SRC_DIR/misoc/build/artiq_kc705-nist_qc2-kc705.bit $BIN_PREFIX/kc705/
57+
4758
cp artiq/frontend/artiq_flash.sh $PREFIX/bin
4859

4960
# misc

0 commit comments

Comments
 (0)
Please sign in to comment.