aboutsummaryrefslogtreecommitdiff
path: root/counter_v/Makefile
blob: 9f096cdc9b7d9a078b2dfb06b5f5deb580741208 (plain) (blame)
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
# SPDX-FileCopyrightText: 2023 Brian Woods
# SPDX-License-Identifier: GPL-2.0-or-later

# this is for ghdl-gcc, I've not tested it on ghdl-llvm but it will not
# work with ghdl-mcode

SRC=simulation.v top.v counter.v
# top module, we also use this for the object name
TOP=sim_test
# this needs to match what's in top sim file
WAVE_DUMP=simulation.vcd
WAVE_CONF=$(TOP).gtkw
FLAGS=

.PHONY: all clean sim

all: $(TOP)

$(TOP): $(SRC)
	iverilog -o $@ $(FLAGS) -s $@ $^

$(WAVE_DUMP): $(TOP)
	vvp $<

sim: $(WAVE_DUMP)
	gtkwave --save $(WAVE_CONF) --saveonexit $<

clean:
	rm -f $(TOP) $(WAVE_DUMP) $(WAVE_CONF)