summaryrefslogtreecommitdiff
path: root/tb/Makefile
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-02-16 20:55:24 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2025-02-16 20:55:24 +0200
commit82dec45fd786831f791b17b84aedb4d99b5ca25d (patch)
tree5b98b452edc749b938a67368c9020244ca40595e /tb/Makefile
parent0141d830f3326594f159c627dbbc284fdef27674 (diff)
downloadttarv32-82dec45fd786831f791b17b84aedb4d99b5ca25d.tar.gz
ttarv32-82dec45fd786831f791b17b84aedb4d99b5ca25d.zip
add initial risc-v -> tta translation block
Diffstat (limited to 'tb/Makefile')
-rw-r--r--tb/Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/tb/Makefile b/tb/Makefile
new file mode 100644
index 0000000..a76747f
--- /dev/null
+++ b/tb/Makefile
@@ -0,0 +1,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