GNUmakefile 1.81 KB
#  Make file for RSP simulator
#     
#  all    --- vall 
#  clean  --- clean both rsptest directories


##### 
TOP_PATH = $(shell echo `pwd`)
RSP_PATH = ${TOP_PATH}/rsptest
BIN_PATH = ${TOP_PATH}/bin

default:
	@echo "run: make [all|su|vu|pin|dma|...] to start the test"

#
#  Build Verilog test 
#
all: su su_single vu vu_single pin pin_single dma

# verilog su test 
su: rsp
	rm -rf ${RSP_PATH}/SUTest/regression.log
	mkdir -p ${RSP_PATH}/SUTest
	cd ${RSP_PATH}/SUTest; \
	${BIN_PATH}/rsp_regression +ctrace -SU

su_single: rsp
	rm -rf ${RSP_PATH}/SUTestSingle/regression.log
	mkdir -p ${RSP_PATH}/SUTestSingle
	cd ${RSP_PATH}/SUTestSingle; \
	${BIN_PATH}/rsp_regression +ctrace +single_step -SU 

# verilog vu test
vu: rsp d2asm
	rm -rf ${RSP_PATH}/VUTes/regression.log
	mkdir -p ${RSP_PATH}/VUTest
	cd ${RSP_PATH}/VUTest; \
	${BIN_PATH}/rsp_regression +ctrace -VU

vu_single: rsp d2asm
	rm -rf ${RSP_PATH}/VUTestSingle/regression.log
	mkdir -p ${RSP_PATH}/VUTestSingle
	cd ${RSP_PATH}/VUTestSingle; \
	${BIN_PATH}/rsp_regression +ctrace +single_step -VU

# verilog pinRSP test
pin: rsp reorder
	rm -rf ${RSP_PATH}/pinTest/regression.log
	mkdir -p ${RSP_PATH}/pinTest
	cd ${RSP_PATH}/pinTest; \
	${BIN_PATH}/reality_rsp_regression +ctrace -test_src=small_testsuite
	
pin_single: rsp reorder
	rm -rf ${RSP_PATH}/pinTestSingle/regression.log
	mkdir -p ${RSP_PATH}/pinTestSingle
	cd ${RSP_PATH}/pinTestSingle; \
	${BIN_PATH}/reality_rsp_regression +ctrace +single_step -test_src=small_testsuite


# verilog dma test
dma: rsp reorder
	rm -rf ${RSP_PATH}/dmatest/regression.log
	mkdir -p ${RSP_PATH}/dmatest
	cd ${RSP_PATH}/dmatest; \
	${BIN_PATH}/reality_rsp_regression -DMA

#  Clean the RSP test 
#
clean: 
	@rm -rf ${RSP_PATH}
reorder:
	@(cd bin; make)

rsp:
	@echo "check if ROOT is defined"
	test "" != "${ROOT}" 
	@(cd ..; make)

d2asm:
	cd csrc; make