makefile: coverage aktivieren wenn @ tilab
[hwmod.git] / src / Makefile
index 461f4a8142750703d9920c9deafa1497e17f3021..f8694b97bb678c31ad57d9ecfdb42d7f4f5d11b7 100644 (file)
@@ -10,6 +10,15 @@ POST_SDO_INST := inst
 QUARTUS := $(MPWD)/../quartus/calc
 QUOPT := --read_settings_files=on --write_settings_files=off calc -c calc
 
+ifeq ($(findstring $(HN), $(TILABHOSTS)),$(HN))
+# die option 's' geht nicht... :(
+COVERVCOM := -cover bcet
+COVERVSIM := -coverage
+else
+COVERVCOM :=
+COVERVSIM :=
+endif
+
 HN := $(shell hostname)
 TILABHOSTS := $(shell echo ti{1..9}) apps1
 
@@ -24,7 +33,7 @@ WORK := work
 # o source files der module
 # o reihenfolge ist wichtig
 # o keine testbechnes hier angeben
-SRCFILES := alu parser scanner display sp_ram history uart_tx
+SRCFILES := alu parser scanner display sp_ram history uart_tx uart_rx
 
 # o files der packages
 # o keine testbechnes hier angeben
@@ -68,12 +77,12 @@ $(D_BEHSIM)/modelsim.ini:
 
 $(D_BEHSIM)/$(WORK)/%/_primary.dat: %.vhd $(D_BEHSIM)/modelsim.ini
        @echo " CC    $<"
-       @cd $(D_BEHSIM); \
-       vcom -work $(WORK) $(MPWD)/$<
+       cd $(D_BEHSIM); \
+       vcom $(COVERVCOM) -work $(WORK) $(MPWD)/$<
 
 beh_%: $(D_BEHSIM)/$(WORK)/beh_%_tb/_primary.dat beh_%_tb.do behsim
        cd $(D_BEHSIM); \
-       vsim "work.$@_tb(sim)" -f /dev/null -do $(MPWD)/$@_tb.do
+       vsim $(COVERVSIM) "work.$@_tb(sim)" -f /dev/null -do $(MPWD)/$@_tb.do
 
 #postsim
 postsim: $(POST_VHO) $(POST_SDO)