summaryrefslogtreecommitdiff
path: root/tb/Makefile
blob: a76747ff2516decfc065fe82f640fc5db779811e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
all: rv2insn sched

.PHONY: sched
sched: sched_tb.sv ../src/sched.sv ../src/common.svh
	verilator --Mdir sched_objdir --assert --trace --binary -I../src sched_tb.sv
	./sched_objdir/Vsched_tb

.PHONY: rv2insn
rv2insn: rv2insn_tb.sv ../src/rv2insn.sv ../src/common.svh
	riscv32-unknown-elf-gcc -ffreestanding -nostdlib -march=rv32i -mabi=ilp32 \
		-Wl,-Ttext=0 data/rv2insn.S -o rv2insn
	riscv32-unknown-elf-objcopy -O verilog rv2insn rv2insn.hex
	verilator --Mdir rv2insn_objdir --assert --trace --binary -I../src rv2insn_tb.sv
	./rv2insn_objdir/Vrv2insn_tb