5 NEXTPNR ?
= nextpnr-ecp5
13 uart_files
= $(wildcard ..
/uart16550
/rtl
/verilog
/*.v
)
16 VERILATOR_ROOT
=$(shell verilator
-getenv VERILATOR_ROOT
2>/dev
/null
)
17 ifeq (, $(VERILATOR_ROOT
))
19 $(error
"Verilator is required to make this target !")
29 RAM_INIT_FILE
=hello_world
/hello_world.hex
34 #RAM_INIT_FILE=micropython/firmware.hex
37 #MEMORY_SIZE=536870912
38 #RAM_INIT_FILE=dtbImage.microwatt.hex
40 SIM_BRAM_CHAINBOOT
=6291456 # 0x600000
42 FPGA_TARGET ?
= VERILATOR
44 ifeq ($(FPGA_TARGET
), verilator
)
47 CLK_FREQUENCY
=50000000
48 clkgen
=fpga
/clk_gen_bypass.vhd
52 python3 src
/ls2.py sim
54 # Need to investigate why yosys is hitting verilator warnings,
55 # and eventually turn on -Wall
56 microwatt-verilator
: ls2.v \
57 verilator
/microwatt-verilator.
cpp \
58 verilator
/uart-verilator.c
59 verilator
-O3
-CFLAGS
"-DCLK_FREQUENCY=$(CLK_FREQUENCY) -I../verilator" \
63 --exe verilator
/microwatt-verilator.
cpp verilator
/uart-verilator.c \
64 -o
$@
-I..
/uart16550
/rtl
/verilog \
65 -Wno-fatal
-Wno-CASEOVERLAP
-Wno-UNOPTFLAT \
72 # --unroll-count 256 \
73 # --output-split 5000 \
74 # --output-split-cfuncs 500 \
75 # --output-split-ctrace 500 \
76 make
-C obj_dir
-f Vtop.mk
77 @cp
-f obj_dir
/microwatt-verilator microwatt-verilator
80 rm -fr obj_dir microwatt-verilator ls2.v