added sbst programs
This commit is contained in:
1 parent
c0947a8634
commit
f047f55561
5 files changed
+138
-2
No files matched your search
@@ -1,4 +1,10 @@
|
||||
|
||||
#
|
||||
# picorv32 / sbst config
|
||||
#
|
||||
|
||||
SBST_SRCS := $(wildcard sbst_programs/*.c)
|
||||
|
||||
#
|
||||
# jpeg_core config
|
||||
#
|
||||
@@ -21,7 +27,7 @@ JPEG_CORE_TB := jpeg_core_tb.v
|
||||
all: $(JPEG_CORE_VVP)
|
||||
|
||||
clean:
|
||||
rm -f $(JPEG_CORE_VVP) $(JPEG_CORE_OUTFILE) *.vcd
|
||||
rm -f $(JPEG_CORE_VVP) $(JPEG_CORE_OUTFILE) *.vcd $(SBST_SRCS:.c=.bin) $(SBST_SRCS:.c=.hex)
|
||||
|
||||
#
|
||||
# jpeg_core targets
|
||||
@@ -45,4 +51,15 @@ test_ez_vcd:
|
||||
make -C picorv32 test_ez_vcd
|
||||
|
||||
testbench.npy:
|
||||
./picorv32_vcd_import.py picorv32/testbench.vcd testbench.npy
|
||||
./picorv32_vcd_import.py picorv32/testbench.vcd testbench.npy
|
||||
|
||||
sbst_programs: $(SBST_SRCS:.c=.bin) $(SBST_SRCS:.c=.hex)
|
||||
|
||||
sbst_programs/%.elf: sbst_programs/%.c sbst_programs/start.S
|
||||
riscv64-unknown-elf-gcc -march=rv32ima_zicsr -mabi=ilp32 -ffreestanding -O0 -nostdlib -o $@ $^ -T picorv32/firmware/riscv.ld
|
||||
|
||||
sbst_programs/%.bin: sbst_programs/%.elf
|
||||
riscv64-unknown-elf-objcopy -O binary $^ $@
|
||||
|
||||
sbst_programs/%.hex: sbst_programs/%.bin
|
||||
python3 -c "import os; d=open('$^','rb').read(); [print('{:02x}{:02x}{:02x}{:02x}'.format(d[i+3],d[i+2],d[i+1],d[i])) for i in range(0,len(d),4)]" > $@
|
||||
Reference in new issue
Block a user