diff --git a/boards/sim/firmware/cfg/sim_eth_infra.dep b/boards/sim/firmware/cfg/sim_eth_infra.dep index d16afc88..d428953d 100644 --- a/boards/sim/firmware/cfg/sim_eth_infra.dep +++ b/boards/sim/firmware/cfg/sim_eth_infra.dep @@ -23,6 +23,11 @@ # #------------------------------------------------------------------------------- +# Dummy device information +# (Not used in practice for this specific simulation, but required for setting up sim project) +@device_name = "xcvu9p" +@device_package = "-flga2104" +@device_speed = "-2L-e" src sim_eth_infra.vhd src -c components/ipbus_util ../sim_hdl/clock_sim.vhd diff --git a/boards/sim/firmware/cfg/sim_udp_infra.dep b/boards/sim/firmware/cfg/sim_udp_infra.dep index 120b17a6..a78e4a35 100644 --- a/boards/sim/firmware/cfg/sim_udp_infra.dep +++ b/boards/sim/firmware/cfg/sim_udp_infra.dep @@ -23,6 +23,12 @@ # #------------------------------------------------------------------------------- +# Dummy device information +# (Not used in practice for this specific simulation, but required for setting up sim project) +@device_name = "xcvu9p" +@device_package = "-flga2104" +@device_speed = "-2L-e" + src sim_udp_infra.vhd src -c components/ipbus_util ../sim_hdl/clock_sim.vhd diff --git a/ci/sim.yml b/ci/sim.yml index e3329141..100fe20b 100644 --- a/ci/sim.yml +++ b/ci/sim.yml @@ -1,7 +1,7 @@ run_sim_udp:vivado2018.3:modelsim10.6c: extends: .template_base - image: ${IPBUS_DOCKER_REGISTRY}/ipbus-fw-dev-cc7:2020-03-15__ipbb0.5.2_uhal2.7.2 + image: ${IPBUS_DOCKER_REGISTRY}/ipbus-fw-dev-centos7:2021-04-26__ipbbdev-2021f_uhal2.8.0 tags: - docker - docker-cap-net-admin @@ -24,7 +24,7 @@ run_sim_udp:vivado2018.3:modelsim10.6c: run_sim:vivado2018.3:modelsim10.6c: extends: .template_base - image: ${IPBUS_DOCKER_REGISTRY}/ipbus-fw-dev-cc7:2020-03-15__ipbb0.5.2_uhal2.7.2 + image: ${IPBUS_DOCKER_REGISTRY}/ipbus-fw-dev-centos7:2021-04-26__ipbbdev-2021f_uhal2.8.0 tags: - docker - docker-cap-net-admin @@ -48,7 +48,7 @@ run_sim:vivado2018.3:modelsim10.6c: run_ram_slaves_testbench_sim:vivado2018.3:modelsim10.6c: extends: .template_base - image: ${IPBUS_DOCKER_REGISTRY}/ipbus-fw-dev-cc7:2020-03-15__ipbb0.5.2_uhal2.7.2 + image: ${IPBUS_DOCKER_REGISTRY}/ipbus-fw-dev-centos7:2021-04-26__ipbbdev-2021f_uhal2.8.0 tags: - docker - docker-cap-net-admin @@ -66,18 +66,18 @@ run_ram_slaves_testbench_sim:vivado2018.3:modelsim10.6c: - ipbb init work_area - cd work_area - ln -s ${CI_PROJECT_DIR} src/ipbus-firmware - - ipbb proj create sim ram_slvs_tb ipbus-firmware:tests/ram_slaves -t top_sim.dep + - ipbb proj create sim ram_slvs_tb ipbus-firmware:tests/ram_slaves top_sim.dep - cd proj/ram_slvs_tb - ipbb sim setup-simlib - ipbb sim ipcores - - ipbb sim fli - - ipbb sim make-project - - ./vsim -c work.top -gIP_ADDR='X"c0a8c902"' -do 'run 1ms' -do 'quit' + - ipbb sim fli-udp + - ipbb sim generate-project + - ./run_sim -c work.top -do 'run 1ms' -do 'quit' run_ctr_slaves_testbench_sim:vivado2018.3:modelsim10.6c: extends: .template_base - image: ${IPBUS_DOCKER_REGISTRY}/ipbus-fw-dev-cc7:2020-03-15__ipbb0.5.2_uhal2.7.2 + image: ${IPBUS_DOCKER_REGISTRY}/ipbus-fw-dev-centos7:2021-04-26__ipbbdev-2021f_uhal2.8.0 tags: - docker - xilinx-tools diff --git a/ci/templates.yml b/ci/templates.yml index f21af1da..1c014184 100644 --- a/ci/templates.yml +++ b/ci/templates.yml @@ -1,6 +1,6 @@ .template_base: - image: ${IPBUS_DOCKER_REGISTRY}/ipbus-fw-dev-cc7:2020-03-15__ipbb0.5.2_uhal2.7.2 + image: ${IPBUS_DOCKER_REGISTRY}/ipbus-fw-dev-centos7:2021-04-26__ipbbdev-2021f_uhal2.8.0 before_script: - source /software/Xilinx/Vivado/${VIVADO_VERSION}/settings64.sh @@ -15,9 +15,9 @@ - ipbb init work_area - cd work_area - ln -s ${CI_PROJECT_DIR} src/ipbus-firmware - - ipbb proj create vivado -t top_${PROJ}.dep ${CI_JOB_NAME#quick_check:} ipbus-firmware:projects/example + - ipbb proj create vivado ${CI_JOB_NAME#quick_check:} ipbus-firmware:projects/example top_${PROJ}.dep - cd proj/${CI_JOB_NAME#quick_check:} - - ipbb vivado make-project + - ipbb vivado generate-project - ipbb vivado check-syntax artifacts: when: on_success diff --git a/components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdmaBypass_us.dep b/components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdmaBypass_us.dep index e8389970..30d3c9e5 100644 --- a/components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdmaBypass_us.dep +++ b/components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdmaBypass_us.dep @@ -24,8 +24,8 @@ #------------------------------------------------------------------------------- src pcie_xdma_bypass_axi_us_if.vhd -?toolset=="Vivado"? src ../cgn/pcie_xdmaBypass_us/xdma_0.xci -?toolset=="Vivado"? src ../cgn/axi_bram_ctrl_1.xci +? toolset.lower() == "vivado" ? src ../cgn/pcie_xdmaBypass_us/xdma_0.xci +? toolset.lower() == "vivado" ? src ../cgn/axi_bram_ctrl_1.xci src pcie_int_gen_msix.vhd src -c components/ipbus_transport_axi ipbus_axi_decl.vhd diff --git a/components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdma_us.dep b/components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdma_us.dep index 781b9bb8..e3e18fa7 100644 --- a/components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdma_us.dep +++ b/components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdma_us.dep @@ -24,7 +24,7 @@ #------------------------------------------------------------------------------- src pcie_xdma_axi_us_if.vhd -?toolset=="Vivado"? src ../cgn/pcie_xdma_us/xdma_0.xci +? toolset.lower() == "vivado" ? src ../cgn/pcie_xdma_us/xdma_0.xci src pcie_int_gen_msix.vhd src -c components/ipbus_transport_axi ipbus_axi_decl.vhd diff --git a/components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdma_usp.dep b/components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdma_usp.dep index f4bd3615..e2912cc6 100644 --- a/components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdma_usp.dep +++ b/components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdma_usp.dep @@ -24,7 +24,7 @@ #------------------------------------------------------------------------------- src pcie_xdma_axi_usp_if.vhd -?toolset=="Vivado"? src ../cgn/pcie_xdma_usp/xdma_0.xci +? toolset == "vivado" ? src ../cgn/pcie_xdma_usp/xdma_0.xci src pcie_int_gen_msix.vhd src -c components/ipbus_transport_axi ipbus_axi_decl.vhd diff --git a/components/ipbus_transport_axi/firmware/cfg/ipbus_transport_axi.dep b/components/ipbus_transport_axi/firmware/cfg/ipbus_transport_axi.dep index 61a74e7a..9d3a3567 100644 --- a/components/ipbus_transport_axi/firmware/cfg/ipbus_transport_axi.dep +++ b/components/ipbus_transport_axi/firmware/cfg/ipbus_transport_axi.dep @@ -33,6 +33,6 @@ src ipbus_transport_multibuffer_rx_dpram.vhd ipbus_transport_multibuffer_tx_dpra src ipbus_axi_decl.vhd -?toolset=="Vivado"? src ../cgn/axi_bram_ctrl_0.xci +? toolset.lower() == "vivado" ? src ../cgn/axi_bram_ctrl_0.xci include -c components/ipbus_core diff --git a/tests/ci/check-dep-files.sh b/tests/ci/check-dep-files.sh index c4d0e857..7428230d 100755 --- a/tests/ci/check-dep-files.sh +++ b/tests/ci/check-dep-files.sh @@ -40,7 +40,7 @@ do TOOLSET=$([[ "${componentDir}/firmware/cfg/${depFile}" =~ "sim" ]] && echo "sim" || echo "vivado") echo "Checking ${componentDir} - ${depFile} [tool: ${TOOLSET}]" - ipbb toolbox check-dep -t ${TOOLSET} ipbus-firmware:${componentDir} $(basename ${depFile}) + ipbb toolbox check-dep ${TOOLSET} ipbus-firmware:${componentDir} $(basename ${depFile}) if [ $? -ne 0 ]; then ((N_ERRORS++)) diff --git a/tests/ci/test-run-sim-slave-counters.sh b/tests/ci/test-run-sim-slave-counters.sh index 42243dbe..da1ceab9 100755 --- a/tests/ci/test-run-sim-slave-counters.sh +++ b/tests/ci/test-run-sim-slave-counters.sh @@ -26,8 +26,8 @@ SH_SOURCE=${BASH_SOURCE} -IPBUS_PATH=$(cd $(dirname ${SH_SOURCE})/../.. && pwd) -WORK_ROOT=$(cd ${IPBUS_PATH}/../.. && pwd) +IPBUS_PATH=$(readlink -f $(cd $(dirname ${SH_SOURCE})/../.. && pwd)) +WORK_ROOT=$(cd $(dirname ${SH_SOURCE})/../../../.. && pwd) PROJ=sim_ctr_slaves # Stop on the first error @@ -37,17 +37,17 @@ set -e cd ${WORK_ROOT} rm -rf proj/${PROJ} -ipbb proj create sim -t top_sim.dep ${PROJ} ipbus-firmware:tests/ctr_slaves +ipbb proj create sim ${PROJ} ipbus-firmware:tests/ctr_slaves top_sim.dep cd proj/sim_ctr_slaves ipbb sim setup-simlib ipbb sim ipcores ipbb sim fli-udp -ipbb sim make-project +ipbb sim generate-project ipbb sim addrtab set -x -./vsim -c work.top -do 'run 60sec' -do 'quit' > /dev/null 2>&1 & +./run_sim -c work.top -do 'run 60sec' -do 'quit' > /dev/null 2>&1 & VSIM_PID=$! VSIM_PGRP=$(ps -p ${VSIM_PID} -o pgrp=) diff --git a/tests/ci/test-run-sim-udp.sh b/tests/ci/test-run-sim-udp.sh index 10685030..9f75110b 100755 --- a/tests/ci/test-run-sim-udp.sh +++ b/tests/ci/test-run-sim-udp.sh @@ -57,14 +57,14 @@ echo "#------------------------------------------------" echo "Building Project ${PROJ}" echo "#------------------------------------------------" if [[ "$PROJ" == "sim" ]]; then - ipbb proj create sim -t top_sim_udp.dep sim_udp ipbus-firmware:projects/example + ipbb proj create sim sim_udp ipbus-firmware:projects/example top_sim_udp.dep cd proj/sim_udp ipbb sim setup-simlib ipbb sim ipcores ipbb sim fli-udp - ipbb sim make-project + ipbb sim generate-project set -x - ./vsim -c work.top -do 'run 60sec' -do 'quit' > /dev/null 2>&1 & + ./run_sim -c work.top -do 'run 60sec' -do 'quit' > /dev/null 2>&1 & VSIM_PID=$! VSIM_PGRP=$(ps -p ${VSIM_PID} -o pgrp=) # Wait for the simulation to start diff --git a/tests/ci/test-run-sim.sh b/tests/ci/test-run-sim.sh index 641a8216..79197fe2 100755 --- a/tests/ci/test-run-sim.sh +++ b/tests/ci/test-run-sim.sh @@ -25,14 +25,24 @@ #------------------------------------------------------------------------------- +function print_log_on_error { + set +x + echo " ----------------------------------------------------" + echo " ----------------------------------------------------" + echo "ERROR occurred. Printing simulation output before bailing" + cat ${SIM_LOGFILE} +} SH_SOURCE=${BASH_SOURCE} IPBUS_PATH=$(cd $(dirname ${SH_SOURCE})/../.. && pwd) WORK_ROOT=$(cd ${IPBUS_PATH}/../.. && pwd) +SIM_LOGFILE=sim_output.txt PROJECTS=(sim) + + if (( $# != 1 )); then echo "No project specified." echo "Available projects:" $(printf "'%s' " "${PROJECTS[@]}") @@ -57,14 +67,15 @@ echo "#------------------------------------------------" echo "Building Project ${PROJ}" echo "#------------------------------------------------" if [[ "$PROJ" == "sim" ]]; then - ipbb proj create sim -t top_sim_eth.dep sim ipbus-firmware:projects/example - ipbb sim -p ${PROJ} setup-simlib - ipbb sim -p ${PROJ} ipcores - ipbb sim -p ${PROJ} fli - ipbb sim -p ${PROJ} make-project - cd proj/sim + ipbb proj create sim ${PROJ} ipbus-firmware:projects/example top_sim_eth.dep + cd proj/${PROJ} + ipbb sim setup-simlib + ipbb sim ipcores + ipbb sim fli-eth + ipbb sim generate-project set -x - ./vsim -c work.top -gIP_ADDR='X"c0a8c902"' -do 'run 60sec' -do 'quit' > /dev/null 2>&1 & + ./run_sim -c work.top -gIP_ADDR='X"c0a8c902"' -do 'run 60sec' -do 'quit' > ${SIM_LOGFILE} 2>&1 & + trap print_log_on_error EXIT VSIM_PID=$! VSIM_PGRP=$(ps -p ${VSIM_PID} -o pgrp=) # ait for the simulation to start diff --git a/tests/ci/test-vivado-syntax.sh b/tests/ci/test-vivado-syntax.sh index df7c7625..7867ea28 100755 --- a/tests/ci/test-vivado-syntax.sh +++ b/tests/ci/test-vivado-syntax.sh @@ -56,9 +56,10 @@ rm -rf proj/${PROJ} echo "#------------------------------------------------" echo "Building Project ${PROJ}" echo "#------------------------------------------------" -ipbb proj create vivado -t top_${PROJ}.dep ${PROJ} ipbus-firmware:projects/example -ipbb vivado -p ${PROJ} make-project -ipbb vivado -p ${PROJ} check-syntax +ipbb proj create vivado ${PROJ} ipbus-firmware:projects/example top_${PROJ}.dep +cd proj/${PROJ} +ipbb vivado generate-project +ipbb vivado check-syntax diff --git a/tests/ci/test_build.sh b/tests/ci/test_build.sh index cc8bd2b0..068a1321 100755 --- a/tests/ci/test_build.sh +++ b/tests/ci/test_build.sh @@ -57,14 +57,15 @@ echo "#------------------------------------------------" echo "Building Project ${PROJ}" echo "#------------------------------------------------" if [[ "$PROJ" == "sim" ]]; then - ipbb proj create sim -t top_sim.dep sim ipbus-firmware:projects/example - ipbb sim -p ${PROJ} setup-simlib - ipbb sim -p ${PROJ} ipcores - ipbb sim -p ${PROJ} fli - ipbb sim -p ${PROJ} make-project + ipbb proj create sim ${PROJ} ipbus-firmware:projects/example top_sim.dep + cd proj/${PROJ} + ipbb sim setup-simlib + ipbb sim ipcores + ipbb sim fli + ipbb sim generate-project cd proj/sim set -x - ./vsim -c work.top -gIP_ADDR='X"c0a8c902"' -do 'run 60sec' -do 'quit' > /dev/null 2>&1 & + ./run_sim -c work.top -gIP_ADDR='X"c0a8c902"' -do 'run 60sec' -do 'quit' > /dev/null 2>&1 & VSIM_PID=$! VSIM_PGRP=$(ps -p ${VSIM_PID} -o pgrp=) # ait for the simulation to start @@ -75,11 +76,13 @@ if [[ "$PROJ" == "sim" ]]; then pkill -SIGINT -g ${VSIM_PGRP} vsimk set +x else - ipbb proj create vivado -t top_${PROJ}.dep ${PROJ} ipbus-firmware:projects/example - ipbb vivado -p ${PROJ} make-project - ipbb vivado -p ${PROJ} synth -j4 - ipbb vivado -p ${PROJ} impl - ipbb vivado -p ${PROJ} bitfile + ipbb proj create vivado ${PROJ} ipbus-firmware:projects/example top_${PROJ}.dep + cd proj/${PROJ} + ipbb vivado generate-project + ipbb vivado synth -j4 + ipbb vivado impl + ipbb vivado bitfile + cd - fi exit 0 diff --git a/tests/ram_slaves/firmware/cfg/top_sim.dep b/tests/ram_slaves/firmware/cfg/top_sim.dep index e32b9eec..37b506df 100644 --- a/tests/ram_slaves/firmware/cfg/top_sim.dep +++ b/tests/ram_slaves/firmware/cfg/top_sim.dep @@ -23,6 +23,6 @@ # #------------------------------------------------------------------------------- -include -c boards/sim sim_eth.dep +include -c boards/sim sim_udp.dep include ram_slaves_tester.dep src -c components/ipbus_core ipbus_package.vhd