Merge pull request #30 from danielmlynek/make_for_riviera
Make for riviera
This commit is contained in:
commit
0dbee1c24c
|
@ -29,6 +29,7 @@ IRUN = irun
|
|||
VCS = vcs
|
||||
VERILATOR = verilator
|
||||
VLOG = qverilog
|
||||
RIVIERA = riviera
|
||||
GCC_PREFIX = riscv64-unknown-elf
|
||||
BUILD_DIR = snapshots/${snapshot}
|
||||
TBDIR = ${RV_ROOT}/testbench
|
||||
|
@ -45,6 +46,7 @@ ifdef debug
|
|||
IRUN_DEBUG = -access +rc
|
||||
IRUN_DEBUG_RUN = -input ${RV_ROOT}/testbench/input.tcl
|
||||
VCS_DEBUG = -debug_access
|
||||
RIVIERA_DEBUG = +access +r
|
||||
endif
|
||||
|
||||
# provide specific link file
|
||||
|
@ -71,7 +73,8 @@ all: clean verilator
|
|||
|
||||
clean:
|
||||
rm -rf *.log *.s *.hex *.dis *.tbl irun* vcs* simv* snapshots swerv* \
|
||||
verilator* *.exe obj* *.o ucli.key vc_hdrs.h csrc *.csv
|
||||
verilator* *.exe obj* *.o ucli.key vc_hdrs.h csrc *.csv \
|
||||
work dataset.asdb library.cfg
|
||||
|
||||
# If define files do not exist, then run swerv.config.
|
||||
${BUILD_DIR}/defines.h :
|
||||
|
@ -107,6 +110,17 @@ irun-build: ${TBFILES} ${BUILD_DIR}/defines.h
|
|||
-elaborate -snapshot $(snapshot)
|
||||
touch irun-build
|
||||
|
||||
riviera-build: ${TBFILES} ${BUILD_DIR}/defines.h
|
||||
vlib work
|
||||
vlog -work work \
|
||||
-l riviera_compile.log -err VCP2694 W1 \
|
||||
+incdir+${RV_ROOT}/design/lib \
|
||||
+incdir+${RV_ROOT}/design/include \
|
||||
+incdir+${BUILD_DIR} +libext+.v $(defines) \
|
||||
-f ${RV_ROOT}/testbench/flist \
|
||||
${TBFILES}
|
||||
touch riviera-build
|
||||
|
||||
verilator: program.hex verilator-build
|
||||
./obj_dir/Vtb_top ${DEBUG_PLUS}
|
||||
|
||||
|
@ -121,6 +135,9 @@ vlog: program.hex ${TBFILES} ${BUILD_DIR}/defines.h
|
|||
$(VLOG) -l vlog.log -sv -mfcu +incdir+${BUILD_DIR}+${RV_ROOT}/design/include+${RV_ROOT}/design/lib\
|
||||
$(defines) -f ${RV_ROOT}/testbench/flist ${TBFILES} -R ${DEBUG_PLUS}
|
||||
|
||||
riviera: program.hex riviera-build
|
||||
vsim -c -lib work ${DEBUG_PLUS} ${RIVIERA_DEBUG} tb_top -do "run -all; exit" -l riviera.log
|
||||
|
||||
ifeq ($(shell which $(GCC_PREFIX)-gcc 2> /dev/null),)
|
||||
program.hex: ${BUILD_DIR}/defines.h
|
||||
@echo " !!! No $(GCC_PREFIX)-gcc in path, using canned hex files !!"
|
||||
|
@ -154,6 +171,6 @@ endif
|
|||
|
||||
help:
|
||||
@echo Make sure the environment variable RV_ROOT is set.
|
||||
@echo Possible targets: verilator vcs irun vlog help clean all verilator-build irun-build vcs-build program.hex
|
||||
@echo Possible targets: verilator vcs irun vlog riviera help clean all verilator-build irun-build vcs-build riviera-build program.hex
|
||||
|
||||
.PHONY: help clean verilator vcs irun vlog
|
||||
.PHONY: help clean verilator vcs irun vlog riviera
|
Loading…
Reference in New Issue