Skip to content

Commit

Permalink
Merge pull request #191 from ipbus/task/ipbb-2021f
Browse files Browse the repository at this point in the history
Updates for compatibility with dev/2021f tag of IPBB
  • Loading branch information
tswilliams authored Apr 30, 2021
2 parents fd32f2a + 755bd19 commit c1df025
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 47 deletions.
5 changes: 5 additions & 0 deletions boards/sim/firmware/cfg/sim_eth_infra.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions boards/sim/firmware/cfg/sim_udp_infra.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions ci/sim.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ci/templates.yml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdma_us.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion components/ipbus_pcie/firmware/cfg/ipbus_pcie_xdma_usp.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tests/ci/check-dep-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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++))
Expand Down
10 changes: 5 additions & 5 deletions tests/ci/test-run-sim-slave-counters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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=)

Expand Down
6 changes: 3 additions & 3 deletions tests/ci/test-run-sim-udp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 18 additions & 7 deletions tests/ci/test-run-sim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}")
Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions tests/ci/test-vivado-syntax.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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



Expand Down
25 changes: 14 additions & 11 deletions tests/ci/test_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion tests/ram_slaves/firmware/cfg/top_sim.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c1df025

Please sign in to comment.