FPGALover 9acee30565 | ||
---|---|---|
.. | ||
inc | ||
output_files | ||
rtl | ||
test_bench | ||
tests | ||
.gitignore | ||
DE0_NANO.qsf | ||
LICENSE | ||
Memory.v_toplevel_memory_1_symbol0.bin | ||
Memory.v_toplevel_memory_1_symbol1.bin | ||
Memory.v_toplevel_memory_1_symbol2.bin | ||
Memory.v_toplevel_memory_1_symbol3.bin | ||
README.md | ||
assignment_defaults.qdf | ||
de0_nano_system.sdc | ||
guidelines.md | ||
package.json | ||
pll_sys.ppf | ||
pll_sys.qip | ||
pll_sys.v | ||
pll_sys_bb.v | ||
pll_sys_inst.v | ||
qar_info.json | ||
qram32.qip | ||
qram32.v | ||
qram32_bb.v | ||
qram32_inst.v | ||
testSerial.js | ||
verilog_guidelines.txt | ||
xoro.mft | ||
xoro.qpf | ||
xoro.qsf | ||
yosys.txt |
README.md
xoro
This is the picorv32 RISC-V processor in Verilog wrapped in some very simple memory and peripherals. Enough to get it working on a Terasic DE-0 Nano Cyclone IV FPGA board.
The name comes from the fact that this project grew out of a version of the xoroshiro128+ pseudo random number generator in Verilog.
picorv32 is by Clifford Wolf : https://github.com/cliffordwolf/picorv32
Building the firmware
The current firmware is very simple and only prints "Hello World!" repeatedly to the UART at 38400 baud. If you want to tinker with it it can be rebuild with:
$ make firmware/firmware.hex
Run on DE0 Nano board.
Just open the project file xoro.qpf in Quartus.
Hit the "Start compilation" button.
When it's done hit the "Programmer" button. Select the xoro.sof file from the out_put files directory and hit start.
To see the UART output I use a Parallax Prop Plug serial to USB adapter.See pin assignments to see where to plug it in to the header.
Run under Icarus simulator
Build the top level test bench with iverilog:
$ iverilog -o xoro_top_tb.vvp test_bench/xoro_top_tb.v rtl/xoro_top.v rtl/memory.v rtl/gpio.v rtl/prng.v \
rtl/uartTx.v rtl/xoroshiro128plus.v rtl/picorv32.v rtl/address_decoder.v rtl/timer.v
And run under the Icarus simulator:
$ vvp xoro_top_tb.vvp
This produces a ton of output so maybe you want:
$ vvp xoro_top_tb.vvp | less
Or redirect to a file:
$ vvp xoro_top_tb.vvp > test.txt
In order to understand the output you will need to know what firmware it is executing. A disassembled listing can be obtained with objdump:
$ riscv32-unknown-elf-objdump -d firmware/firmware.elf