Skip to content

Commit

Permalink
Add VCS to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
thommythomaso committed Jul 25, 2023
1 parent afe0772 commit 6cb038e
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 2 deletions.
104 changes: 104 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ before_script:
- export PATH=~/.cargo/bin:$PATH
- mkdir -p build

stages:
- build
- test

vsim:
stage: build
script:
Expand Down Expand Up @@ -179,3 +183,103 @@ axi_xbar:
<<: *run_vsim
variables:
TEST_MODULE: axi_xbar

vcs_axi_addr_test:
stage: test
script:
- make sim_vcs-axi_addr_test.log

vcs_axi_atop_filter:
stage: test
script:
- make sim_vcs-axi_atop_filter.log

vcs_axi_cdc:
stage: test
script:
- make sim_vcs-axi_cdc.log

vcs_axi_delayer:
stage: test
script:
- make sim_vcs-axi_delayer.log

vcs_axi_dw_downsizer:
stage: test
script:
- make sim_vcs-axi_dw_downsizer.log

vcs_axi_dw_upsizer:
stage: test
script:
- make sim_vcs-axi_dw_upsizer.log

vcs_axi_fifo:
stage: test
script:
- make sim_vcs-axi_fifo.log

vcs_axi_isolate:
stage: test
script:
- make sim_vcs-axi_isolate.log

vcs_axi_iw_converter:
stage: test
script:
- make sim_vcs-axi_iw_converter.log

vcs_axi_lite_regs:
stage: test
script:
- make sim_vcs-axi_lite_regs.log

vcs_axi_lite_to_apb:
stage: test
script:
- make sim_vcs-axi_lite_to_apb.log

vcs_axi_lite_to_axi:
stage: test
script:
- make sim_vcs-axi_lite_to_axi.log

vcs_axi_lite_mailbox:
stage: test
script:
- make sim_vcs-axi_lite_mailbox.log

vcs_axi_lite_xbar:
stage: test
script:
- make sim_vcs-axi_lite_xbar.log

vcs_axi_modify_address:
stage: test
script:
- make sim_vcs-axi_modify_address.log

vcs_axi_serializer:
stage: test
script:
- make sim_vcs-axi_serializer.log

vcs_axi_sim_mem:
stage: test
script:
- make sim_vcs-axi_sim_mem.log

vcs_axi_to_axi_lite:
stage: test
script:
- make sim_vcs-axi_to_axi_lite.log

vcs_axi_to_mem_banked:
stage: test
script:
- make sim_vcs-axi_to_mem_banked.log

vcs_axi_xbar:
stage: test
script:
- make sim_vcs-axi_xbar.log
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ else
VCS ?= vcs
endif

# VCS_DEBUG ?= -debug_access+r
VCS_DEBUG ?= -debug_access+nomemcbk
VCS_XPROP ?= -xprop=xmerge
VCS_OPT ?= $(VCS_XPROP) $(VCS_DEBUG) -full64 -CFLAGS \"-O4\" -O4 -j9

TBS ?= axi_addr_test \
axi_atop_filter \
axi_bus_compare \
Expand Down Expand Up @@ -103,7 +108,7 @@ compile_vcs.log: Bender.yml | build


sim_vcs-%.log: compile_vcs.log
export VCS="$(VCS)"; cd build && ../scripts/run_vcs.sh --random-seed $* | tee ../$@
export VCS="$(VCS)"; export VCS_OPT="$(VCS_OPT)"; cd build && ../scripts/run_vcs.sh --random-seed $* | tee ../$@
(! grep -n "Error" $@)
(! grep -n "Fatal" $@)

Expand Down
3 changes: 2 additions & 1 deletion scripts/run_vcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
SEEDS=(0)

call_vcs() {
$VCS -Mlib=work-"${@: -1}" -Mdir=work-"${@: -1}" -debug_access+r -CFLAGS "-Os" -full64 -xprop=xmerge "$@"
$VCS -Mlib=work-"${@: -1}" -Mdir=work-"${@: -1}" $VCS_OPT "$@"
for seed in ${SEEDS[@]}; do
echo
echo "----"
echo "Running with seed: $seed"
echo "VCS options: $VCS_OPT"
./"${@: -1}" +ntb_random_seed=$seed -exitstatus | tee "${@: -1}"_$seed.log 2>&1
(! grep -n "Error" "${@: -1}"_$seed.log)
(! grep -n "Fatal" "${@: -1}"_$seed.log)
Expand Down

0 comments on commit 6cb038e

Please sign in to comment.