Makefile 2.06 KB
#!smake -k -J 5
##########################################################
#
#  Run Qsim test(s) on Edge Walker module
#  Tests are run with a slow 32nsec clock because
#  of two-cycle paths in the EW.
#
##########################################################

PRDEPTH = ../../../..
include $(PRDEPTH)/PRdefs
include $(PRDEPTH)/PRrules

OUTDATA = ../OutData/ew_all
QTV = $(ROOT)/PR/hw/chip/rcp/ew/qtv

LDIRT = *.tab *.sim* *.trc* *.simlog*

#
#  Build all tests
#
default: 	test000.trc.Z \
		test001.trc.Z \
		test002.trc.Z \
		test003.trc.Z \
		test004.trc.Z \
		test005.trc.Z \
		test006.trc.Z \
		test007.trc.Z

#
#  Individula test targets
#

test000.tab: $(OUTDATA)/test000.tab.base.Z
test000.sim: test000.tab
test000.trc.Z: test000.sim do_sim


test001.tab: $(OUTDATA)/test001.tab.base.Z
test001.sim: test001.tab
test001.trc.Z: test001.sim do_sim $(QTV)/ew.nls


test002.tab: $(OUTDATA)/test002.tab.base.Z
test002.sim: test002.tab
test002.trc.Z: test002.sim do_sim $(QTV)/ew.nls


test003.tab: $(OUTDATA)/test003.tab.base.Z
test003.sim: test003.tab
test003.trc.Z: test003.sim do_sim $(QTV)/ew.nls


test004.tab: $(OUTDATA)/test004.tab.base.Z
test004.sim: test004.tab
test004.trc.Z: test004.sim do_sim $(QTV)/ew.nls


test005.tab: $(OUTDATA)/test005.tab.base.Z
test005.sim: test005.tab
test005.trc.Z: test005.sim do_sim $(QTV)/ew.nls


test006.tab: $(OUTDATA)/test006.tab.base.Z
test006.sim: test006.tab
test006.trc.Z: test006.sim do_sim $(QTV)/ew.nls


test007.tab: $(OUTDATA)/test007.tab.base.Z
test007.sim: test007.tab
test007.trc.Z: test007.sim do_sim $(QTV)/ew.nls

###########################################################
#
#  Suffix rules for building tab file, sim file, and
#  running Qsim.
#
###########################################################

.SUFFIXES: .trc.Z .sim .tab .tab.base.Z

.tab.base.Z.tab:
	/usr/bin/rm -f $@
	zcat $(>) > $@
	sed -f slowclk.sed $@ > $@.tmp
	mv $(@).tmp $@

.tab.sim:
	$(PRDEPTH)/rdpsim/tools/tab2sim -o $@ -c $>

.sim.trc.Z:
	./do_sim $(@:R:R) | tee $(@:R:R).simlog
	compress -f $(@:R:R).simlog $(@:R:R).trc
	/usr/bin/rm -f $(@:R:R).tab $(@:R:R).sim