Hazard3/test/sim/tb_cxxrtl/Makefile

21 lines
498 B
Makefile
Raw Normal View History

TOP := tb
DOTF := tb.f
CONFIG := default
.PHONY: clean all
2021-05-21 09:34:16 +08:00
all: tb
SYNTH_CMD += read_verilog -I ../../../hdl -DCONFIG_HEADER="config_$(CONFIG).vh" $(shell listfiles $(DOTF));
SYNTH_CMD += hierarchy -top $(TOP);
2021-05-21 09:34:16 +08:00
SYNTH_CMD += write_cxxrtl dut.cpp
2021-12-17 08:41:23 +08:00
dut.cpp: $(shell listfiles $(DOTF))
yosys -p '$(SYNTH_CMD)' 2>&1 > cxxrtl.log
2021-05-21 09:34:16 +08:00
clean::
rm -f dut.cpp cxxrtl.log tb
tb: dut.cpp tb.cpp
2021-05-21 09:34:16 +08:00
clang++ -O3 -std=c++14 $(addprefix -D,$(CDEFINES)) -I $(shell yosys-config --datdir)/include tb.cpp -o tb