5 Tiny RISCV SoC for RFU
Markus Koch edited this page 2023-11-29 21:11:35 +01:00

SERV

Build a "servant". Maybe from fusesoc if I can figure out how, or just manually from source. Should be easy. Has everything I need to get started, so I might not even have to worry about getting my VHDL into the Verilog top level.

Then run zephyr OS on it. ttps://github.com/olofk/serv has the instructions on the bottom of the readme on how to build a zephyr project. maybe we can also just ref the hellow world.

ZephyrOS seems to also include some RSA implementations, so that's useful.

Commands

  • Build SERVANT for CMOD A7: fusesoc run --tool=vivado --target=cmod_a7_35t servant
  • For faster RISCV-IM add multiply divide from fusesoc library add mdu https://github.com/zeeshanrafique23/mdu

Building ZephyrOS

SERVs demo drivers and stuff are old. Really old. ZephyrOS 2.4.0 old, which also requires an old compiler (old binutils). sdk-ng v0.14.2 works well: https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.14.2

More QuickNotes on this

To init get new fusesoc workspace using fusesoc init. Then set manifest to SERV. Then fusesoc update. Then you can build. Play with code in fusesoc_libraries/serv/.

Build this from here:

/home/markus/zeph_orig/zephyr/samples/hello_world
[markus@737d440cb9bd hello_world]$ west build -b service

convert to "hex":

python3 $SERV/sw/makehex.py /home/markus/zeph_orig/zephyr/samples/hello_world/build/zephyr/zephyr.bin 16384 > test.hex

and run using (in the fusesoc root):

fusesoc run --target=verilator_tb servant --uart_baudrate=57600 --firmware=test.hex

Interesting Reads

PicoRV32

Might be an interesting alternative.