summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2017-01-08 15:48:28 -0600
committerBobby Bingham <koorogi@koorogi.info>2017-01-08 22:02:28 -0600
commit56be2a468017508a30d5fe85bf577a6ff526f5e1 (patch)
treef7fd23c99716f457b18031baf57f7c24e80863c9
parent62a63f69a89fae13c9a0455b5d9e7cddbc06456f (diff)
Move icarus simluations to sims/ directory
-rw-r--r--.gitignore1
-rw-r--r--Makefile9
2 files changed, 5 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 0166bb2..536c561 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@ greybox_tmp/
# ignores for the makefile build system
waves/
+sims/
diff --git a/Makefile b/Makefile
index d97f6a0..dca5e74 100644
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,9 @@ IV := iverilog
IVFLAGS := -g2005-sv
SIM_SRCS := $(wildcard *_tb.v)
-SIMS := $(SIM_SRCS:.v=.sim)
+SIMS := $(addprefix sims/,$(SIM_SRCS:.v=.sim))
WAVES := $(addprefix waves/,$(SIM_SRCS:.v=.vcd))
-DIRS := waves
+DIRS := sims waves
DEPS = $(sort $(1) $(foreach d,$(1),$(DEPS-$(d))))
DEPS-alu := $(call DEPS,shifter)
@@ -18,18 +18,17 @@ all: simulate
simulate: $(WAVES)
clean:
- rm -f $(SIMS)
rm -rf $(DIRS)
$(DIRS):
mkdir -p $@
-waves/%.vcd: %.sim | waves
+waves/%.vcd: sims/%.sim | waves
vvp $<
.SECONDEXPANSION:
pc := %
-%_tb.sim: %_tb.v %.v testbench.vh $$(patsubst $$(pc),$$(pc).v,$$(DEPS-$$*))
+sims/%_tb.sim: %_tb.v %.v testbench.vh $$(patsubst $$(pc),$$(pc).v,$$(DEPS-$$*)) | sims
$(IV) $(IVFLAGS) -o $@ $(filter-out %.vh,$^)
.PHONY: all simulate clean