projects
/
hwmod.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
postlayoutsim: alu gefixt und parser hinzugefuegt, inkl. screenshots
[hwmod.git]
/
src
/
Makefile
diff --git
a/src/Makefile
b/src/Makefile
index 19d3e3640a90dc797abfda087d86c195b5ef12dc..2dfd9f534c427803b7d49452f931f5a132fd7498 100644
(file)
--- a/
src/Makefile
+++ b/
src/Makefile
@@
-1,4
+1,5
@@
SHELL := bash
SHELL := bash
+VPATH := .:ps2:textmode_vga:textmode_vga/mjl_stratix
MPWD := $(shell pwd)
D_BEHSIM := $(MPWD)/../sim/beh
MPWD := $(shell pwd)
D_BEHSIM := $(MPWD)/../sim/beh
@@
-9,6
+10,15
@@
POST_SDO_INST := inst
QUARTUS := $(MPWD)/../quartus/calc
QUOPT := --read_settings_files=on --write_settings_files=off calc -c calc
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
HN := $(shell hostname)
TILABHOSTS := $(shell echo ti{1..9}) apps1
@@
-23,11
+33,15
@@
WORK := work
# o source files der module
# o reihenfolge ist wichtig
# o keine testbechnes hier angeben
# o source files der module
# o reihenfolge ist wichtig
# o keine testbechnes hier angeben
-SRCFILES := alu parser scanner
+SRCFILES := alu parser scanner
display sp_ram history uart_tx uart_rx
# o files der packages
# o keine testbechnes hier angeben
# o files der packages
# o keine testbechnes hier angeben
-PKGFILES := gen_pkg
+PKGFILES = math_pkg gen_pkg
+PKGFILES += textmode_vga/textmode_vga_platform_dependent_pkg
+PKGFILES += textmode_vga/textmode_vga_pkg
+PKGFILES += textmode_vga/font_pkg
+PKGFILES += textmode_vga/textmode_vga_component_pkg
BEH_IFILES = $(PKGFILES) $(SRCFILES)
BEH_IFILES := $(strip $(BEH_IFILES))
BEH_IFILES = $(PKGFILES) $(SRCFILES)
BEH_IFILES := $(strip $(BEH_IFILES))
@@
-39,10
+53,10
@@
POST_SRC = $(SRCFILES)
#virtuelle targets fuer behsim: weil wir sowas wie ein objectfile von vcom nicht bekommen. bessere ideen sind willkommen
#virtuelle targets fuer behsim: weil wir sowas wie ein objectfile von vcom nicht bekommen. bessere ideen sind willkommen
-BEH_VTARGETS := $(foreach n, $(
BEH_IFILES
), $(D_BEHSIM)/$(WORK)/$(n)/_primary.dat)
+BEH_VTARGETS := $(foreach n, $(
notdir $(BEH_IFILES)
), $(D_BEHSIM)/$(WORK)/$(n)/_primary.dat)
#virtuelle targets fuer packagefiles der postsim
#virtuelle targets fuer packagefiles der postsim
-POST_VTARGETS := $(foreach n, $(
POST_IFILES
), $(D_POSTSIM)/$(WORK)/$(n)/_primary.dat)
+POST_VTARGETS := $(foreach n, $(
notdir $(POST_IFILES)
), $(D_POSTSIM)/$(WORK)/$(n)/_primary.dat)
#virtuelle targets fuer sourcefiles der postsim
POST_SRC_VTARGETS := $(foreach n, $(POST_SRC), $(n).vhd)
#virtuelle targets fuer sourcefiles der postsim
POST_SRC_VTARGETS := $(foreach n, $(POST_SRC), $(n).vhd)
@@
-63,15
+77,15
@@
$(D_BEHSIM)/modelsim.ini:
$(D_BEHSIM)/$(WORK)/%/_primary.dat: %.vhd $(D_BEHSIM)/modelsim.ini
@echo " CC $<"
$(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); \
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
-postsim:
$(POST_VHO) $(POST_SDO)
+postsim:
post_alu
$(D_POSTSIM)/modelsim.ini:
@echo " INIT for post-layout simulation"
$(D_POSTSIM)/modelsim.ini:
@echo " INIT for post-layout simulation"
@@
-85,42
+99,34
@@
$(D_POSTSIM)/$(WORK)/%/_primary.dat: %.vhd
@cd $(D_POSTSIM); \
vcom -work $(WORK) $(MPWD)/$<
@cd $(D_POSTSIM); \
vcom -work $(WORK) $(MPWD)/$<
-post_%:
postsim $(D_POSTSIM)/$(WORK)/post_%_tb/_primary.dat post_%_tb.do
+post_%:
quartus_gen_% post_%_tb.do $(D_POSTSIM)/$(WORK)/post_%_tb/_primary.dat
cd $(D_POSTSIM); \
vsim "work.$@_tb(sim)" -sdftyp /$(POST_SDO_INST)=$(POST_SDO) -f /dev/null -do $(MPWD)/$@_tb.do
cd $(D_POSTSIM); \
vsim "work.$@_tb(sim)" -sdftyp /$(POST_SDO_INST)=$(POST_SDO) -f /dev/null -do $(MPWD)/$@_tb.do
-$(QUARTUS): $(D_POSTSIM)/modelsim.ini
+quartus_gen_%: ../quartus/project_%.tcl $(D_POSTSIM)/modelsim.ini $(POST_VTARGETS) $(POST_SRC_VTARGETS)
@echo -n " Quartus generate project"
ifeq ($(findstring $(HN), $(TILABHOSTS)),$(HN))
@echo -n " Quartus generate project"
ifeq ($(findstring $(HN), $(TILABHOSTS)),$(HN))
- @echo "(@tilab)"
- @cd ../quartus;
./linux_tilab.sh
+ @echo "(@tilab)
: $<
"
+ @cd ../quartus;
rm -Rf calc; ./linux_tilab.sh $<
else
else
- @echo "(not @ tilab)"
- @cd ../quartus;
./linux_web.sh
+ @echo "(not @ tilab)
: $<
"
+ @cd ../quartus;
rm -Rf calc; ./linux_web.sh $<
endif
endif
-
-#TODO: more targets plz...
-$(POST_VHO) $(POST_SDO): $(QUARTUS) $(POST_VTARGETS) $(POST_SRC_VTARGETS)
@echo " Quartus analysis & synthesis"
@echo " Quartus analysis & synthesis"
- @$(QUMACRO) quartus_map $(QUOPT)
| tee $(MPWD)/quartusmap.tmp
+ @$(QUMACRO) quartus_map $(QUOPT)
@echo " Quartus fitter"
@$(QUMACRO) quartus_fit $(QUOPT)
@echo " Quartus assembler"
@$(QUMACRO) quartus_asm $(QUOPT)
@echo " Quartus timing analyzer"
@echo " Quartus fitter"
@$(QUMACRO) quartus_fit $(QUOPT)
@echo " Quartus assembler"
@$(QUMACRO) quartus_asm $(QUOPT)
@echo " Quartus timing analyzer"
- @$(QUMACRO) quartus_tan $(QUOPT) --timing_analysis_only
| tee $(MPWD)/quartustan.tmp
+ @$(QUMACRO) quartus_tan $(QUOPT) --timing_analysis_only
@echo " Quartus EDA netlist writer"
@$(QUMACRO) quartus_eda $(QUOPT)
@echo " Quartus EDA netlist writer"
@$(QUMACRO) quartus_eda $(QUOPT)
- #not nice atm :/
@echo " CC $(POST_VHO)"
@cd $(D_POSTSIM); \
vcom -work $(WORK) $(POST_VHO)
@echo " CC $(POST_VHO)"
@cd $(D_POSTSIM); \
vcom -work $(WORK) $(POST_VHO)
- @echo -n " INFO logic cells: "
- @grep 'logic cells' quartusmap.tmp | awk ' { print $$3 } '
- @grep 'Fmax ' quartustan.tmp | sed -e 's/ / /g' -e 's/Info/INFO/g' -e 's/:/ /g'
- @rm quartus*.tmp
.PHONY: clean
clean:
.PHONY: clean
clean:
- rm -Rf $(D_BEHSIM) $(D_POSTSIM)
$(QUARTUS)
+ rm -Rf $(D_BEHSIM) $(D_POSTSIM)