summaryrefslogtreecommitdiff
path: root/Makefile
blob: fa00bb4c3eae66f9e05aefb365a2c3b45c7e98a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
SOURCES := $(shell find -name \*.sv -o -name \*.cpp)
COLLATERAL := $(shell find -name \*.hex -o -name \*.svh)

OPTS ?=

sim: build/Vtop
	$<
.PHONY: sim

build/Vtop: $(SOURCES) $(COLLATERAL)
	@mkdir -p build
	verilator +1800-2017ext+sv -Wall -Wno-BLKSEQ -O3 -Ihdl $(OPTS) --Mdir build --trace --cc --build -j --exe --top-module top $(SOURCES)

clean:
	rm -rf build
.PHONY: clean