summaryrefslogtreecommitdiff
path: root/testsuite/gna/sr2676/Makefile
blob: 620744c2d74b3e45f706388cf4542f0fdc4cc79c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# project name
PROJECT=reset
# vhdl files
FILES = reset.vhdl reset_types.vhdl reset-rtl.vhdl
# testbench
SIMTOP = reset_testbench
SIMFILES = reset-test.vhdl
# Simu break condition
GHDL_SIM_OPT    = --assert-level=error --ieee-asserts=disable
#GHDL_SIM_OPT    = --stop-time=1ms
SIMDIR = sim

GHDL_CMD        = ghdl
GHDL_FLAGS      = --warn-no-vital-generic 
VIEW_CMD        = /usr/bin/gtkwave

ghdl-compile:
	mkdir -p $(SIMDIR)
	$(GHDL_CMD) -i $(GHDL_FLAGS) --workdir=$(SIMDIR) --work=work $(SIMFILES) $(FILES)
	$(GHDL_CMD) -m $(GHDL_FLAGS) --workdir=$(SIMDIR) --work=work $(SIMTOP)
	@mv $(SIMTOP) $(SIMDIR)/$(SIMTOP)

ghdl-run: ghdl-compile
	@$(SIMDIR)/$(SIMTOP) $(GHDL_SIM_OPT) --vcdgz=$(SIMDIR)/$(SIMTOP).vcdgz

ghdl-view: 
	gunzip --stdout $(SIMDIR)/$(SIMTOP).vcdgz | $(VIEW_CMD) --vcd &

ghdl-clean :