From 649069980a6ce716663237927424c0a4eb82eb9e Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 4 Nov 2015 15:59:08 +0800 Subject: [PATCH] conda,travis: use new SoC build system --- .travis.yml | 1 - .travis/get-misoc.sh | 4 ---- .travis/get-xilinx.sh | 6 +++--- conda/artiq-kc705-nist_qc1/build.sh | 25 ++++++---------------- conda/artiq-kc705-nist_qc1/meta.yaml | 1 + conda/artiq-kc705-nist_qc2/build.sh | 25 ++++++---------------- conda/artiq-kc705-nist_qc2/meta.yaml | 1 + conda/artiq-pipistrello-nist_qc1/build.sh | 23 ++++++-------------- conda/artiq-pipistrello-nist_qc1/meta.yaml | 1 + 9 files changed, 26 insertions(+), 61 deletions(-) delete mode 100755 .travis/get-misoc.sh diff --git a/.travis.yml b/.travis.yml index e05589de2..881694a54 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,6 @@ install: - if [ $TRAVIS_PULL_REQUEST != false ]; then BUILD_SOC=none; fi - if [ $BUILD_SOC != none ]; then ./.travis/get-xilinx.sh; fi - if [ $BUILD_SOC != none ]; then ./.travis/get-toolchain.sh; fi - - if [ $BUILD_SOC != none ]; then ./.travis/get-misoc.sh; fi - . ./.travis/get-anaconda.sh - source $HOME/miniconda/bin/activate py35 - conda install -q pip coverage anaconda-client cython diff --git a/.travis/get-misoc.sh b/.travis/get-misoc.sh deleted file mode 100755 index 355e8ffa5..000000000 --- a/.travis/get-misoc.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -git clone --recursive https://github.com/m-labs/misoc $HOME/misoc -echo "export MSCDIR=$HOME/misoc" >> $HOME/.m-labs/build_settings.sh diff --git a/.travis/get-xilinx.sh b/.travis/get-xilinx.sh index 3d49fd693..61eaf091a 100755 --- a/.travis/get-xilinx.sh +++ b/.travis/get-xilinx.sh @@ -26,13 +26,13 @@ echo "$secret" | gpg --passphrase-fd 0 Xilinx.lic.gpg mkdir -p ~/.Xilinx mv Xilinx.lic ~/.Xilinx/Xilinx.lic -git clone https://github.com/fallen/impersonate_macaddress +git clone https://github.com/m-labs/impersonate_macaddress make -C impersonate_macaddress # Tell mibuild where Xilinx toolchains are installed # and feed it the mac address corresponding to the license cat >> $HOME/.m-labs/build_settings.sh << EOF -MISOC_EXTRA_VIVADO_CMDLINE="-Ob vivado_path $HOME/Xilinx/Vivado" -MISOC_EXTRA_ISE_CMDLINE="-Ob ise_path $HOME/opt/Xilinx/" +MISOC_EXTRA_ISE_CMDLINE="--gateware-toolchain-path $HOME/opt/Xilinx/" +MISOC_EXTRA_VIVADO_CMDLINE="--gateware-toolchain-path $HOME/Xilinx/Vivado" export MACADDR=$macaddress export LD_PRELOAD=$PWD/impersonate_macaddress/impersonate_macaddress.so EOF diff --git a/conda/artiq-kc705-nist_qc1/build.sh b/conda/artiq-kc705-nist_qc1/build.sh index 495a0e74c..03bcadd9a 100644 --- a/conda/artiq-kc705-nist_qc1/build.sh +++ b/conda/artiq-kc705-nist_qc1/build.sh @@ -3,24 +3,13 @@ BUILD_SETTINGS_FILE=$HOME/.m-labs/build_settings.sh [ -f $BUILD_SETTINGS_FILE ] && . $BUILD_SETTINGS_FILE -SOC_PREFIX=$PREFIX/lib/python3.5/site-packages/artiq/binaries/kc705 -mkdir -p $SOC_PREFIX/nist_qc1 +SOC_PREFIX=$PREFIX/lib/python3.5/site-packages/artiq/binaries/kc705-qc1 +mkdir -p $SOC_PREFIX -SOC_ROOT=$PWD/soc +$PYTHON -m artiq.gateware.targets.kc705 -H qc1 $MISOC_EXTRA_ISE_CMDLINE +cp misoc_nist_qc1_kc705/gateware/top.bit $SOC_PREFIX +cp misoc_nist_qc1_kc705/software/bios/bios.bin $SOC_PREFIX +cp misoc_nist_qc1_kc705/software/runtime/runtime.fbi $SOC_PREFIX -# build bitstream - -(cd $MSCDIR; $PYTHON make.py -X $SOC_ROOT -t artiq_kc705 $MISOC_EXTRA_VIVADO_CMDLINE build-bitstream) -cp $MSCDIR/build/artiq_kc705-nist_qc1-kc705.bit $SOC_PREFIX/ wget http://sionneau.net/artiq/binaries/kc705/flash_proxy/bscan_spi_kc705.bit -mv bscan_spi_kc705.bit $SOC_PREFIX/ - -# build BIOS - -(cd $MSCDIR; $PYTHON make.py -X $SOC_ROOT -t artiq_kc705 build-headers build-bios) -cp $MSCDIR/software/bios/bios.bin $SOC_PREFIX/ - -# build runtime - -make -C soc/runtime clean runtime.fbi -cp soc/runtime/runtime.fbi $SOC_PREFIX/nist_qc1/ +mv bscan_spi_kc705.bit $SOC_PREFIX diff --git a/conda/artiq-kc705-nist_qc1/meta.yaml b/conda/artiq-kc705-nist_qc1/meta.yaml index 765cb2c96..7a18496af 100644 --- a/conda/artiq-kc705-nist_qc1/meta.yaml +++ b/conda/artiq-kc705-nist_qc1/meta.yaml @@ -16,6 +16,7 @@ requirements: # We don't get meaningful GIT_DESCRIBE_* values until before conda installs build dependencies. - artiq 0.0 - migen 0.0 + - misoc 0.0 - llvm-or1k - binutils-or1k-linux run: diff --git a/conda/artiq-kc705-nist_qc2/build.sh b/conda/artiq-kc705-nist_qc2/build.sh index a65294b85..38cac5ab7 100644 --- a/conda/artiq-kc705-nist_qc2/build.sh +++ b/conda/artiq-kc705-nist_qc2/build.sh @@ -3,24 +3,13 @@ BUILD_SETTINGS_FILE=$HOME/.m-labs/build_settings.sh [ -f $BUILD_SETTINGS_FILE ] && . $BUILD_SETTINGS_FILE -SOC_PREFIX=$PREFIX/lib/python3.5/site-packages/artiq/binaries/kc705 -mkdir -p $SOC_PREFIX/nist_qc2 +SOC_PREFIX=$PREFIX/lib/python3.5/site-packages/artiq/binaries/kc705-qc2 +mkdir -p $SOC_PREFIX -SOC_ROOT=$PWD/soc +$PYTHON -m artiq.gateware.targets.kc705 -H qc2 $MISOC_EXTRA_ISE_CMDLINE +cp misoc_nist_qc2_kc705/gateware/top.bit $SOC_PREFIX +cp misoc_nist_qc2_kc705/software/bios/bios.bin $SOC_PREFIX +cp misoc_nist_qc2_kc705/software/runtime/runtime.fbi $SOC_PREFIX -# build bitstream - -(cd $MSCDIR; $PYTHON make.py -X $SOC_ROOT -t artiq_kc705 -s NIST_QC2 $MISOC_EXTRA_VIVADO_CMDLINE build-bitstream) -cp $MSCDIR/build/artiq_kc705-nist_qc2-kc705.bit $SOC_PREFIX/ wget http://sionneau.net/artiq/binaries/kc705/flash_proxy/bscan_spi_kc705.bit -mv bscan_spi_kc705.bit $SOC_PREFIX/ - -# build BIOS - -(cd $MSCDIR; $PYTHON make.py -X $SOC_ROOT -t artiq_kc705 -s NIST_QC2 build-headers build-bios) -cp $MSCDIR/software/bios/bios.bin $SOC_PREFIX/ - -# build runtime - -make -C soc/runtime clean runtime.fbi -cp soc/runtime/runtime.fbi $SOC_PREFIX/nist_qc2/ +mv bscan_spi_kc705.bit $SOC_PREFIX diff --git a/conda/artiq-kc705-nist_qc2/meta.yaml b/conda/artiq-kc705-nist_qc2/meta.yaml index 166163a1c..9be8b6c69 100644 --- a/conda/artiq-kc705-nist_qc2/meta.yaml +++ b/conda/artiq-kc705-nist_qc2/meta.yaml @@ -16,6 +16,7 @@ requirements: # We don't get meaningful GIT_DESCRIBE_* values until before conda installs build dependencies. - artiq 0.0 - migen 0.0 + - misoc 0.0 - llvm-or1k - binutils-or1k-linux run: diff --git a/conda/artiq-pipistrello-nist_qc1/build.sh b/conda/artiq-pipistrello-nist_qc1/build.sh index f35b22a39..d7f5690c2 100644 --- a/conda/artiq-pipistrello-nist_qc1/build.sh +++ b/conda/artiq-pipistrello-nist_qc1/build.sh @@ -3,24 +3,13 @@ BUILD_SETTINGS_FILE=$HOME/.m-labs/build_settings.sh [ -f $BUILD_SETTINGS_FILE ] && . $BUILD_SETTINGS_FILE -SOC_PREFIX=$PREFIX/lib/python3.5/site-packages/artiq/binaries/pipistrello +SOC_PREFIX=$PREFIX/lib/python3.5/site-packages/artiq/binaries/pipistrello-qc1 mkdir -p $SOC_PREFIX -SOC_ROOT=$PWD/soc +$PYTHON -m artiq.gateware.targets.pipistrello $MISOC_EXTRA_ISE_CMDLINE +cp misoc_nist_qc1_pipistrello/gateware/top.bit $SOC_PREFIX +cp misoc_nist_qc1_pipistrello/software/bios/bios.bin $SOC_PREFIX +cp misoc_nist_qc1_pipistrello/software/runtime/runtime.fbi $SOC_PREFIX -# build bitstream - -(cd $MSCDIR; $PYTHON make.py -X $SOC_ROOT -t artiq_pipistrello $MISOC_EXTRA_ISE_CMDLINE build-bitstream) -cp $MSCDIR/build/artiq_pipistrello-nist_qc1-pipistrello.bit $SOC_PREFIX/ wget https://people.phys.ethz.ch/~robertjo/bscan_spi_lx45_csg324.bit -mv bscan_spi_lx45_csg324.bit $SOC_PREFIX/ - -# build BIOS - -(cd $MSCDIR; $PYTHON make.py -X $SOC_ROOT -t artiq_pipistrello build-headers build-bios) -cp $MSCDIR/software/bios/bios.bin $SOC_PREFIX/ - -# build runtime - -make -C soc/runtime clean runtime.fbi -cp soc/runtime/runtime.fbi $SOC_PREFIX/ +mv bscan_spi_lx45_csg324.bit $SOC_PREFIX diff --git a/conda/artiq-pipistrello-nist_qc1/meta.yaml b/conda/artiq-pipistrello-nist_qc1/meta.yaml index 11a62058a..a62e942fa 100644 --- a/conda/artiq-pipistrello-nist_qc1/meta.yaml +++ b/conda/artiq-pipistrello-nist_qc1/meta.yaml @@ -16,6 +16,7 @@ requirements: # We don't get meaningful GIT_DESCRIBE_* values until before conda installs build dependencies. - artiq 0.0 - migen 0.0 + - misoc 0.0 - llvm-or1k - binutils-or1k-linux run: