mirror of
https://github.com/openhwgroup/cvw
synced 2025-01-24 05:24:49 +00:00
pmp coverage
This commit is contained in:
parent
7a5eac963e
commit
48ad4d6001
14
bin/wsim
14
bin/wsim
@ -29,8 +29,8 @@ print("Config=" + args.config + " tests=" + args.testsuite + " sim=" + args.sim
|
||||
|
||||
# Validate arguments
|
||||
if (args.gui):
|
||||
if (args.sim != "questa"):
|
||||
print("GUI option only supported for Questa")
|
||||
if args.sim not in ["questa", "vcs"]:
|
||||
print("GUI option only supported for Questa and VCS")
|
||||
exit(1)
|
||||
|
||||
if (args.coverage):
|
||||
@ -82,9 +82,9 @@ elif (args.sim == "vcs"):
|
||||
if (args.coverage):
|
||||
print("Coverage option not available for VCS")
|
||||
exit(1)
|
||||
if (args.gui):
|
||||
print("GUI option not available for VCS")
|
||||
exit(1)
|
||||
cmd = cd + "; ./run_vcs " + args.config + " " + "\""+args.testsuite+"\""
|
||||
if (args.gui):
|
||||
cmd = cd + "; ./run_vcs " + args.config + " " + args.testsuite + " " + args.tb + " " + "1"
|
||||
else:
|
||||
cmd = cd + "; ./run_vcs " + args.config + " " + "\""+args.testsuite+"\""
|
||||
print(cmd)
|
||||
os.system(cmd)
|
||||
os.system(cmd)
|
||||
|
@ -12,7 +12,26 @@ TB=${WALLY}/testbench
|
||||
CONFIG_VARIANT=${1}
|
||||
# Set TESTSUITE from the second script argument
|
||||
TESTSUITE=$2
|
||||
WKDIR=wkdir/${1}_${2}
|
||||
|
||||
if [ ! -d "$WKDIR" ]; then
|
||||
#echo "Directory $WKDIR does not exist. Creating it now..."
|
||||
mkdir -p "$WKDIR"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Directory $WKDIR created successfully."
|
||||
else
|
||||
echo "Failed to create directory $WKDIR."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Directory $WKDIR already exists."
|
||||
fi
|
||||
|
||||
if [[ -n "$4" ]]; then
|
||||
GUI="-gui"
|
||||
else
|
||||
GUI=""
|
||||
fi
|
||||
|
||||
INCLUDE_DIRS=$(find ${SRC} -type d | xargs -I {} echo -n "{} ")
|
||||
SOURCE_PATH="+incdir+${CFG}/${CONFIG_VARIANT} +incdir+${CFG}/deriv/${CONFIG_VARIANT} +incdir+${CFG}/shared +define+ +define+P.XLEN=64 +define+FPGA=0 +incdir+${TB} ${SRC}/cvw.sv +incdir+${SRC}"
|
||||
@ -21,14 +40,12 @@ SIMFILES="$INCLUDE_DIRS $(find ${SRC} -name "*.sv" ! -path "${SRC}/generic/clock
|
||||
OUTPUT="sim_out"
|
||||
|
||||
clean() {
|
||||
rm -rf obj_dir work transcript vsim.wlf $OUTPUT *.vcd csrc ucli.key vc_hdrs.h program.out
|
||||
rm -rf simv* *.daidir dve *.vpd *.dump DVEfiles/ verdi* novas* *fsdb* *.vg *.rep *.db *.chk *.log *.out profileReport* simprofile_dir*
|
||||
rm -rf ${WKDIR}/*
|
||||
}
|
||||
|
||||
# Clean and run simulation with VCS
|
||||
clean
|
||||
#vcs +lint=all,noGCWM -simprofile -sverilog +vc -Mupdate -line -full64 -kdb -lca -debug_access+all+reverse -v2k_generate ${SOURCE_PATH} +define+TEST=$TESTSUITE $SIMFILES -o $OUTPUT -error=NOODV
|
||||
# lint ignores Unused Inputs (UI), Unnamed Assertipons (SVA-UA), Dynamic Type Sensitivty [IDTS], Null Statement [NS], Unequal Length in Comparison Operation [ULCO]
|
||||
vcs +lint=all,noGCWM,noUI,noSVA-UA,noIDTS,noNS,noULCO,noCAWM-L,noWMIA-L,noSV-PIU -simprofile -sverilog +vc -Mupdate -line -full64 -kdb -lca -debug_access+all+reverse ${SOURCE_PATH} -pvalue+testbench.TEST=$TESTSUITE $SIMFILES -o $OUTPUT -error=NOODV
|
||||
./$OUTPUT | tee program.out
|
||||
|
||||
vcs +lint=all,noGCWM,noUI,noSVA-UA,noIDTS,noNS,noULCO,noCAWM-L,noWMIA-L,noSV-PIU -simprofile -suppress -sverilog +vc -Mupdate -line -full64 -kdb -lca -debug_access+all+reverse ${SOURCE_PATH} $SIMFILES -o ${WKDIR}/$OUTPUT -simdir ${WKDIR} -error=NOODV -work ${WKDIR} ${GUI}
|
||||
./${WKDIR}/$OUTPUT +TEST=${TESTSUITE} +fsdb+gate=off | tee ${WKDIR}/${WKDIR}.out
|
||||
|
Loading…
Reference in New Issue
Block a user