axi_dmac/tb: Add support for xsim
Add support for Vivado's simulator. By default the run script is using the Icarus simulator. If the user want to switch to another simulator, it can be explicitly specify the required simulator tool in the SIMULATOR variable. Currently, beside Icarus, Modelsim (SIMULATOR="modelsim") and Vivado's xsim (SIMULATOR="xsim") is supported.main
parent
d72fac4b1e
commit
46f16f0e99
|
@ -1,21 +1,24 @@
|
||||||
NAME=`basename $0`
|
NAME=`basename $0`
|
||||||
|
|
||||||
if [[ ${SIMULATOR} != "modelsim" ]]; then
|
case "$SIMULATOR" in
|
||||||
|
modelsim)
|
||||||
#Icarus flow
|
# ModelSim flow
|
||||||
|
vlib work
|
||||||
|
vlog ${SOURCE} || exit 1
|
||||||
|
vsim "dmac_"${NAME} -do "add log /* -r; run -a" -gui || exit 1
|
||||||
|
;;
|
||||||
|
xsim)
|
||||||
|
# xsim flow
|
||||||
|
xvlog -log ${NAME}_xvlog.log --sourcelibdir . ${SOURCE}
|
||||||
|
xelab -log ${NAME}_xelab.log -debug all dmac_${NAME}
|
||||||
|
xsim work.dmac_${NAME} -R
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
#Icarus flow is the default
|
||||||
mkdir -p run
|
mkdir -p run
|
||||||
mkdir -p vcd
|
mkdir -p vcd
|
||||||
iverilog -o run/run_${NAME} -I.. ${SOURCE} $1 || exit 1
|
iverilog -o run/run_${NAME} -I.. ${SOURCE} $1 || exit 1
|
||||||
|
|
||||||
cd vcd
|
cd vcd
|
||||||
../run/run_${NAME}
|
../run/run_${NAME}
|
||||||
|
;;
|
||||||
else
|
esac
|
||||||
|
|
||||||
# ModelSim flow
|
|
||||||
vlib work
|
|
||||||
|
|
||||||
vlog ${SOURCE} || exit 1
|
|
||||||
vsim "dmac_"${NAME} -do "add log /* -r; run -a" -gui || exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in New Issue