Onramp-FPGA is a FPGA-based system-on-chip with a 32-bit Onramp processor.
The goal of this project is to build and run the Onramp toolchain directly on a FPGA board.
Refer to my notes for more details.
- Onramp installation (https://github.com/ludocode/onramp)
- OSS CAD Suite (https://github.com/YosysHQ/oss-cad-suite-build)
Tested with Onramp 3502f10944ffc0ec87d5e57ff30587e85e6459c8.
source /path/to/oss-cad-suite/environment
cd sim
make run ONRAMP_BIN=/path/to/onramp/output/posix/binThe FPGA implementation provides two I/O interfaces: serial and video output + keyboard. Both interfaces can be used simultaneously.
Generate a SD card image:
export ONRAMP_BIN=/path/to/onramp/output/posix/bin
cd scripts
./mkimg.sh
cd ..Flash the SD card image sd.img and insert it into the FPGA board.
source /path/to/oss-cad-suite/environment
cd boards/ulx3s
make prog
picocom -b 115200 --imap lfcrlf <serial device>For the keyboard, you need a Digilent PS/2 PMOD connected to the top-left corner of the board.
source /path/to/oss-cad-suite/environment
cd boards/icepi-zero
make prog
picocom -b 115200 --imap lfcrlf <serial device>The PS/2 keyboard must be connected to USB1.
To edit, do the following at the prompt:
ed main.cNote: If the serial port is used, the terminal must provide at least 80x60 characters.
To build and run, do the following:
sh build.sh
mainThe pre-built toolchain is already present on the image. It is however possible to build it from scratch on the board directly with the following steps:
rmall output/
rm sh.oe
hex core/sh/sh.oe.ohx -o sh.oe
cp hex.oe output/configure/hex-0-onramp/hex.oe
cp sh.oe output/configure/sh/sh.oe
time sh core/build.shNote: The build process currently takes 14344 seconds (about 4 hours) on the FPGA board.