Skip to content

danodus/onramp-fpga

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

143 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Onramp-FPGA

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.

Requirements

Tested with Onramp 3502f10944ffc0ec87d5e57ff30587e85e6459c8.

Getting Started

Simulator

source /path/to/oss-cad-suite/environment
cd sim
make run ONRAMP_BIN=/path/to/onramp/output/posix/bin

FPGA Board

The 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.

ULX3S

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.

Icepi Zero

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.

Build Steps

Hello World

To edit, do the following at the prompt:

ed main.c

Note: If the serial port is used, the terminal must provide at least 80x60 characters.

To build and run, do the following:

sh build.sh
main

Toolchain

The 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.sh

Note: The build process currently takes 14344 seconds (about 4 hours) on the FPGA board.

About

FPGA-based system-on-chip with a 32-bit Onramp processor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors