summaryrefslogtreecommitdiff
path: root/Makefile
blob: 41fa7d9d5c28f1b27d7cac2c440e5bf583845cd5 (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 --exe --top-module top $(SOURCES)

clean:
	rm -rf build
.PHONY: clean