Makefile 1.47 KB
#!smake -J 3
#
#
PRDEPTH = ../../../../..
include $(PRDEPTH)/PRdefs

LVCSOPTS     =	-y .                                                  \
		-y $(PRDEPTH)/hw/chip/rcp/st/src                      \
		-y $(PRDEPTH)/hw/chip/rcp/rdp/src                     \
		-y $(PRDEPTH)/hw/chip/lib/verilog/sc                  \
		-y $(PRDEPTH)/hw/chip/lib/verilog/ram                 \
		-v $(PRDEPTH)/hw/chip/lib/verilog/udp/compass_udps.v  \
		+libext+.v+.vzd                                       \
		+incdir+$(PRDEPTH)/hw/chip/rcp/inc

LDIRT = driver*.v *.mem *.out vcs.log *.dump st_all??? *.tab simv*

TESTS = st_comp003
FAST  = fast003

ERROR = \
	@if  grep "ERROR IN SIMULATION" FILE ;	\
	then	echo "";    \
	else					\
		echo "NO ERRORS IN SIMULATION";	\
	fi 

default: $(TESTS)

include $(PRDEPTH)/PRrules

.mem.out: 

$(TESTS): simv003

st_comp003.tab:
	(cd ../..; make test003)

driver003.v: st_comp003.tab $(TAB2VMEM)
	$(TAB2VMEM) -o /dev/null -s 100 st_comp003.tab > driver003.v

simv003: top_level.v driver003.v st_comp003.mem $(_FORCE)
	$(VCS) $(VCSOPTS) -o simv003 -Mdir="st_comp003" top_level.v driver003.v 
	@ if [ "$(DUMP)" ]; \
	then (echo "simv003 +mem=st_comp003.mem > st_comp003.out"; simv003 -vcd verilog003.dump +mem=st_comp003.mem > st_comp003.out;) \
	else \
	(echo "simv003 +mem=st_comp003.mem > st_comp003.out"; simv003 +mem=st_comp003.mem +vcs+dumpvarsoff > st_comp003.out;) \
	fi 
	$(ERROR:FILE=st_comp003.out)

fast: $(FAST)	

fast003: st_comp003.mem
	simv003 +mem=$? | tee $*.out