summaryrefslogtreecommitdiff
path: root/Makefile
blob: f4a0da8b5576528c812d384f5f8a4b4da315b78b (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 -Wno-UNUSED -O3 -Ihdl $(OPTS) --Mdir build --trace --cc --build -j --exe --top-module top $(SOURCES)

clean:
	rm -rf build
.PHONY: clean