RISCV_picorv32_fpga/rtl/DE0-NANO
FPGALover 9acee30565 missing files 2023-09-17 15:32:13 -07:00
..
inc adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
output_files missing files 2023-09-17 15:32:13 -07:00
rtl adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
test_bench adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
tests adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
.gitignore Update rtl/DE0-NANO/.gitignore 2023-09-17 07:52:19 +00:00
DE0_NANO.qsf adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
LICENSE adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
Memory.v_toplevel_memory_1_symbol0.bin missing files 2023-09-17 15:32:13 -07:00
Memory.v_toplevel_memory_1_symbol1.bin missing files 2023-09-17 15:32:13 -07:00
Memory.v_toplevel_memory_1_symbol2.bin missing files 2023-09-17 15:32:13 -07:00
Memory.v_toplevel_memory_1_symbol3.bin missing files 2023-09-17 15:32:13 -07:00
README.md adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
assignment_defaults.qdf adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
de0_nano_system.sdc adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
guidelines.md adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
package.json adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
pll_sys.ppf adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
pll_sys.qip adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
pll_sys.v adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
pll_sys_bb.v adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
pll_sys_inst.v adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
qar_info.json adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
qram32.qip adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
qram32.v adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
qram32_bb.v adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
qram32_inst.v adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
testSerial.js adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
verilog_guidelines.txt adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
xoro.mft adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
xoro.qpf adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
xoro.qsf adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00
yosys.txt adding picorv32 RISCV windows and linux crosscompilation tool and makefile compatible 2023-09-17 00:23:03 -07:00

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