Home

Awesome

NutShell (果壳)

NutShell is a processor developed by the OSCPU (Open Source Chip Project by University) team.

Currently it supports riscv64/32.

See here for the documents.

See the History and Naming section for naming issue.

Demo: Running Debian on FPGA

Compile chisel code

Run programs by simulation

You can either use our ready-to-run image for simulation or build image yourself.

To use ready-to run image (recommended) :

To build image yourself:

cd nexus-am/apps/microbench
make ARCH=riscv64-nutshell mainargs=test run

Run on FPGA

Sub-directories Overview

fpga
├── board              # supported FPGA boards and files to build a Vivado project
├── boot               # PS boot flow of zynq and zynqmp
├── lib                # HDL sources shared by different boards
├── Makefile
├── Makefile.check
└── NutShell.tcl       # wrapper of NutShell core in the Vivado project

Build a Vivado project

cd fpga
make PRJ=myproject BOARD=pynq STANDALONE=true

Change pynq to the target board you want. Supported boards are listed under board/. The project will be created under board/pynq/build/myproject-pynq. Please note that STANDALONE mode is only used in pynq board.

Prepare SD card

Refer to the instructions of fpga/boot/README.md.

NOTE: Remember to put the bitstream into BOOT.BIN, since the guide is going to boot everything from SD card.

Set your board to SD boot mode

Please refer to the user guide of your board.

Boot linux in PS

Just insert the SD card into the board, open a serial terminal and powerup the board.

Boot NutShell (the RISC-V subsystem)

To boot the RISC-V subsystem

gcc -O2 -o ddr-loader ddr-loader.c
minicom -D /dev/ttyUL1
./ddr-loader $(YOUR_BOARD) bin-file

<a name="history"></a> History and Naming

Is NutShell developed from scratch?

No. NutShell is originally based on the NOOP project, an educational RV32 SoC designed by Nanjing University (NJU). At 2019/08/27, the OSCPU team decided to start a new project based on a fork of NOOP.

Why was there only one contributor in this repo before 2019/08/27?

NOOP was maintained by sashimi-yzh on behalf of NJU before 2019/08/27.

What is the different between NutShell and NOOP?

Undergraduate students in the OSCPU team planned to enhance the educational SoC to a fully functional RV64 SoC, on behalf of University of Chinese Academy of Sciences (UCAS, 中国科学院大学). The goal was to boot Linux + Debian and tapeout the chip. Students have put a lot of effort into achieving such a goal.

Where can I find the original NOOP repo?

NOOP is designed as a programming assignment for educational purpose. It is still unstable and may be redesigned every year. Therefore there is no official release for NOOP yet.

But here are some reference implementations:

Why can I still find the name NOOP in the code as well as the commit logs after 2019/08/27?

During the development, the OSCPU team has not yet thought of a good name for the SoC. Before this repo is available to the public, they finally decide to name the SoC NutShell. In Chinese, NutShell (果壳) and the nickname of UCAS (国科大) are similar in pronunciation. The name NutShell is welcomed by every student in UCAS.

I found a name Argo in the code as well as the commit logs. What is it?

Argo is the name of a dual-issued OoO core designed by AugustusWillisWang. AugustusWillisWang is one of the students who develop NutShell. Argo is designed based on NutShell, and they share the same SoC architecture.

I found a name COOSCA in the commit logs. What is it?

COOSCA is an internal name of the SoC. Students in the team want a better name, so there comes NutShell. The name COOSCA should be rarely presented in the repo.