From 62a63f69a89fae13c9a0455b5d9e7cddbc06456f Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sun, 8 Jan 2017 15:19:37 -0600 Subject: Move waves into new subdirectory --- .gitignore | 3 +++ Makefile | 11 ++++++++--- testbench.vh | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 310a92b..0166bb2 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ greybox_tmp/ *.done *.bak *.qws + +# ignores for the makefile build system +waves/ diff --git a/Makefile b/Makefile index 55be36b..d97f6a0 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,8 @@ IVFLAGS := -g2005-sv SIM_SRCS := $(wildcard *_tb.v) SIMS := $(SIM_SRCS:.v=.sim) -WAVES := $(SIM_SRCS:.v=.vcd) +WAVES := $(addprefix waves/,$(SIM_SRCS:.v=.vcd)) +DIRS := waves DEPS = $(sort $(1) $(foreach d,$(1),$(DEPS-$(d)))) DEPS-alu := $(call DEPS,shifter) @@ -17,9 +18,13 @@ all: simulate simulate: $(WAVES) clean: - rm -f $(SIMS) $(WAVES) + rm -f $(SIMS) + rm -rf $(DIRS) -%.vcd: %.sim +$(DIRS): + mkdir -p $@ + +waves/%.vcd: %.sim | waves vvp $< .SECONDEXPANSION: diff --git a/testbench.vh b/testbench.vh index c60f66d..565daaa 100644 --- a/testbench.vh +++ b/testbench.vh @@ -7,7 +7,7 @@ `define STRINGIFY(x) `"x`" `define DUMPWAVE(m) \ - $dumpfile({`STRINGIFY(m), ".vcd"}); \ + $dumpfile({"waves/", `STRINGIFY(m), ".vcd"}); \ $dumpvars(0, m); task skip_comments(input integer file); -- cgit v1.2.3