-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (22 loc) · 725 Bytes
/
Makefile
File metadata and controls
30 lines (22 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
TOP=tb/tb_simplerisc.v
RTL=rtl/simplerisc_top.v rtl/decode.vh rtl/immu.v rtl/alu.v rtl/regfile.v rtl/control_unit.v rtl/imem.v rtl/dmem.v
ALU=rtl/bk_adder32.v rtl/alu.v rtl/mul_tree32.v rtl/div_nonrestoring32_bk.v rtl/barrel_shifter.v rtl/slt.v rtl/bk_subtractor32.v
TB=tb/tb_simplerisc.v
VVP=sim.vvp
all: run
test_alu:
iverilog -g2012 -I rtl -o build/alu_tb.vvp tb/alu_tb.v $(ALU)
vvp build/alu_tb.vvp
test_simplerisc:
iverilog -g2012 -I rtl -o build/tb_simplerisc.vvp rtl/*.v $(TOP)
vvp build/tb_simplerisc.vvp
assemble:
python tools/asm.py program.asm program.hex
build:
iverilog -g2012 -o $(VVP) $(TB) $(RTL)
run: build
vvp $(VVP)
wave: run
@echo "Open wave.vcd in GTKWave"
clean:
rm -f $(VVP) wave.vcd