Skip to content

Commit

Permalink
ci: Add vcs to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilKoe committed Oct 29, 2024
1 parent 2046412 commit b5aa77d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ target/sim/vsim/transcript
target/sim/vsim/vsim.wlf
target/sim/vsim/work/

# VCS generated files
target/sim/vcs/compile.*.sh
target/sim/vcs/*.log
target/sim/vcs/AN.DB
target/sim/vcs/simv*
target/sim/vcs/csrc
target/sim/vcs/ucli.key
target/sim/vcs/work*
target/sim/vcs/vc_hdrs.h


# Xilinx generated files
target/xilinx/build
target/xilinx/out
Expand Down
5 changes: 3 additions & 2 deletions cheshire.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ VLOGAN_BIN ?= vlogan
CXX_PATH := $(shell which $(CXX))

VLOG_ARGS ?= -suppress 2583 -suppress 13314 -timescale 1ns/1ps
VLOGAN_ARGS ?= -kdb -assert svaext +v2k -timescale=1ns/1ps
VLOGAN_ARGS ?= -kdb -nc -assert svaext +v2k -timescale=1ns/1ps

# Define used paths (prefixed to avoid name conflicts)
CHS_ROOT ?= $(shell $(BENDER) path cheshire)
Expand Down Expand Up @@ -61,7 +61,7 @@ chs-clean-deps:
######################

CHS_NONFREE_REMOTE ?= [email protected]:pulp-restricted/cheshire-nonfree.git
CHS_NONFREE_COMMIT ?= f731b17
CHS_NONFREE_COMMIT ?= d446ed8

CHS_PHONY += chs-nonfree-init
chs-nonfree-init:
Expand Down Expand Up @@ -167,6 +167,7 @@ $(CHS_ROOT)/target/sim/models/24FC1025.v: $(CHS_ROOT)/Bender.yml | $(CHS_ROOT)/t
CHS_SIM_ALL += $(CHS_ROOT)/target/sim/models/s25fs512s.v
CHS_SIM_ALL += $(CHS_ROOT)/target/sim/models/24FC1025.v
CHS_SIM_ALL += $(CHS_ROOT)/target/sim/vsim/compile.cheshire_soc.tcl
CHS_SIM_ALL += $(CHS_ROOT)/target/sim/vcs/compile.cheshire_soc.sh

###########
# DRAMSys #
Expand Down
4 changes: 2 additions & 2 deletions target/sim/src/vip_cheshire_soc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ module vip_cheshire_soc import cheshire_pkg::*; #(
assign jtag.tdo = jtag_tdo;

initial begin
wait_for_reset();
wait (!rst_n);
jtag_dbg.reset_master();
end

Expand Down Expand Up @@ -790,7 +790,7 @@ module vip_cheshire_soc import cheshire_pkg::*; #(
slink_axi_driver_t slink_axi_driver = new (slink_mst_vip_dv);

initial begin
wait_for_reset();
wait (!rst_n);
slink_axi_driver.reset_master();
end

Expand Down
9 changes: 4 additions & 5 deletions target/sim/vcs/start.cheshire_soc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ fi
[[ -z "${VERDI_VERSION}" ]] && VERDI_VERSION=""
[[ -z "${VCS_VERSION}" ]] && VCS_VERSION=""
[[ -z "${VCS_BIN}" ]] && VCS_BIN="${VCS_VERSION} vcs"
[[ -z "${VERDI_HOME}" ]] && echo "Please set \$VERDI_HOME" && exit 1
[[ -z "${VCS_HOME}" ]] && echo "Please set \$VCS_HOME" && exit 1

flags="-full64 -kdb "
# Set default to fast simulation flags.
if [ -z "${VCSARGS}" ]; then
flags+="-O2 -debug_access+all "
# Use -debug_access+all for waveform debugging
flags+="-O2 -debug_access=r -debug_region=1,${TESTBENCH} "
fi

# flags+="-cpp ${CXX_PATH} "
Expand All @@ -48,7 +47,7 @@ if [ -n "${USE_DRAMSYS}" ]; then
fi
fi

${VERDI_VERSION} ${VCS_BIN} ${flags} ../src/elfloader.cpp ${TESTBENCH} | tee elaborate.log
${VCS_BIN} ${flags} ../src/elfloader.cpp ${TESTBENCH} | tee elaborate.log

echo "${VCS_VERSION} ${VERDI_VERSION} ./simv ${pargs}"
${VCS_VERSION} ${VERDI_VERSION} ./simv ${pargs}
${VCS_VERSION} ${VERDI_VERSION} ./simv ${pargs} | tee simulate.log

0 comments on commit b5aa77d

Please sign in to comment.