Make sim_system work
This commit is contained in:
parent
7bf87502aa
commit
c96ed77c4d
|
@ -1,4 +1,3 @@
|
||||||
.Xil/
|
|
||||||
firmware.bin
|
firmware.bin
|
||||||
firmware.elf
|
firmware.elf
|
||||||
firmware.hex
|
firmware.hex
|
||||||
|
@ -9,10 +8,4 @@ synth_*.bit
|
||||||
synth_system.v
|
synth_system.v
|
||||||
table.txt
|
table.txt
|
||||||
tab_*/
|
tab_*/
|
||||||
webtalk.jou
|
system_tb
|
||||||
webtalk.log
|
|
||||||
webtalk_*.jou
|
|
||||||
webtalk_*.log
|
|
||||||
xelab.*
|
|
||||||
xsim.*
|
|
||||||
xvlog.*
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
|
|
||||||
VIVADO_BASE = /opt/Xilinx/Vivado/2016.1
|
QUARTUS_ROOTDIR = /opt/altera_lite/16.0
|
||||||
VIVADO = $(VIVADO_BASE)/bin/vivado
|
QUARTUS_BIN = $(QUARTUS_ROOTDIR)/quartus/bin
|
||||||
XVLOG = $(VIVADO_BASE)/bin/xvlog
|
|
||||||
XELAB = $(VIVADO_BASE)/bin/xelab
|
VLOG = iverilog
|
||||||
GLBL = $(VIVADO_BASE)/data/verilog/src/glbl.v
|
TOOLCHAIN_PREFIX = /opt/riscv32i/bin/riscv32-unknown-elf-
|
||||||
TOOLCHAIN_PREFIX = riscv64-unknown-elf-
|
|
||||||
|
|
||||||
export VIVADO
|
export VIVADO
|
||||||
|
|
||||||
|
@ -32,10 +31,9 @@ synth_%:
|
||||||
|
|
||||||
synth_system: firmware.hex
|
synth_system: firmware.hex
|
||||||
|
|
||||||
sim_system:
|
sim_system: firmware.hex system_tb.v system.v ../../picorv32.v
|
||||||
$(XVLOG) system_tb.v synth_system.v
|
$(VLOG) -o system_tb system_tb.v system.v ../../picorv32.v
|
||||||
$(XVLOG) $(GLBL)
|
./system_tb
|
||||||
$(XELAB) -L unifast_ver -L unisims_ver -R system_tb glbl
|
|
||||||
|
|
||||||
firmware.hex: firmware.S firmware.c firmware.lds
|
firmware.hex: firmware.S firmware.c firmware.lds
|
||||||
$(TOOLCHAIN_PREFIX)gcc -Os -m32 -ffreestanding -nostdlib -o firmware.elf firmware.S firmware.c \
|
$(TOOLCHAIN_PREFIX)gcc -Os -m32 -ffreestanding -nostdlib -o firmware.elf firmware.S firmware.c \
|
||||||
|
@ -59,7 +57,6 @@ table.txt:
|
||||||
bash table.sh > table.txt
|
bash table.sh > table.txt
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf .Xil/ firmware.bin firmware.elf firmware.hex firmware.map synth_*.log
|
rm -rf firmware.bin firmware.elf firmware.hex firmware.map synth_*.log
|
||||||
rm -rf synth_*.mmi synth_*.bit synth_system.v table.txt tab_*/ webtalk.jou
|
rm -rf synth_*.mmi synth_*.bit synth_system.v table.txt tab_*/ webtalk.jou
|
||||||
rm -rf webtalk.log webtalk_*.jou webtalk_*.log xelab.* xsim[._]* xvlog.*
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue