Rocket Chip
Awesome RISC-V

Rocket Chip

RISC-V ecosystem

Rocket Chip generates in-order RISC-V cores and complete systems on chip from Chisel source code. SiFive based its first commercial cores on it, and Chipyard uses it as the base for its designs.

Overview

SpecificationValue
ISA supportRV64GC, with RV32 configurations available from the same generator
MicroarchitectureFive-stage in-order, single-issue pipeline with virtual memory and coherent caches
Performance density2.32 CoreMark/MHz
Resource footprintNo fixed LUT count; area depends on the generated configuration
Clock domain25–100 MHz on Xilinx Zynq-7000 FPGAs, depending on configuration (2016 report)

Rocket Chip is a configurable generator for RISC-V systems on chip (SoCs), integrating processor cores with caches, memory controllers and interconnects within a single hardware design. With it, developers can generate systems with different architectures and resource requirements.

Its main core, Rocket, is in-order, which means it executes instructions in the order the program lists them. Rocket has a five-stage pipeline, an arrangement where each instruction passes through five steps and several instructions are in progress at the same time. It implements the 64-bit RISC-V instruction set with a memory management unit, being able to boot operating systems. The design is written in Chisel, a hardware construction language built on the Scala programming language.

Microarchitecture

A Rocket Chip system on chip containing the core, its caches and the TileLink interconnect.
A Rocket Chip system on chip containing the core, its caches and the TileLink interconnect. Chipyard documentation (BSD-3-Clause)

Rocket uses a five-stage pipeline capable of dispatching one instruction per cycle. The generator exposes configurable parameters for cache sizes, hart count, floating-point support and memory management. The specifications below correspond to a specific Rocket configuration.

PartRocket
PipelineFive stages, in program order
IssueOne instruction per cycle
L1 cachesSeparate instruction and data caches, sized by configuration
Virtual memoryMMU with page-table walks when enabled
InterconnectTileLink
Floating pointOptional FPU, part of the G extension

Memory and register map

The SoC generator assigns physical address ranges to main memory and memory-mapped peripherals during system integration. The generated device tree records these ranges, along with peripheral addresses and interrupt connections. Firmware and operating systems use this information to identify and initialize the available hardware.

Reading the map
# on the running system
dtc -I fs -O dts /proc/device-tree | grep -n -E "memory@|serial@|clint@|plic@"

# on a firmware image that carries its device tree
dtc -I dtb -O dts -o soc.dts soc.dtb
grep -n "reg = <" soc.dts
ℹ

Chipyard's default configuration defines a reference memory map. Generated systems may use different addresses, which are recorded in the device tree.

RegionOwner
Boot ROMSystem integration, first instructions after reset
CLINT and PLICInterrupt controllers of the system
UART and other peripheralsSystem peripherals
DRAMBoard memory

Physical implementation

Rocket is implemented in hardware through FPGA mapping or ASIC synthesis. Its RTL can be configured and synthesized for different target platforms. A 2016 technical report demonstrated FPGA implementations on Xilinx Zynq-7000 boards, operating at 25-100 MHz depending on the configuration.

TargetReported figure
FPGA25 to 100 MHz on Zynq-7000, depending on configuration (2016 report)
ASICNo fixed area or frequency, the flow and node decide
Area on FPGANo published LUT count for the core alone
Process nodeChosen by whoever builds the chip

Identifying the part

Rocket cores are not necessarily identified by the Rocket name in the system. Check the SoC documentation for references to Rocket Chip or Rocket Core, and inspect the hardware configuration and source files for Rocket-specific identifiers. The device tree and hardware identification registers can provide additional information about the processor's implementation.

Where it appearsHow to confirm
Chipyard-built systemsDevice tree compatible strings and the memory map
Early SiFive coresSiFive documentation for the specific part
Research chipsPapers and the project's release notes

Disassembly and debugging

Use readelf -A to inspect the firmware's .riscv.attributes section and identify its target instruction set. Use objdump -d to disassemble the binary and inspect the instructions being executed. Compare these instructions against the extensions supported by the processor, available through its identification registers or SoC documentation.

Tools
riscv64-unknown-elf-readelf -A firmware.elf
riscv64-unknown-elf-objdump -d -M no-aliases firmware.elf

# LLVM toolchains
llvm-readelf --arch-specific firmware.elf
llvm-objdump -d --mattr=+m,+a,+f,+d,+c firmware.elf

The identification registers report the same values from the running system. A binary can target a larger instruction set than the core implements.

ItemValue
ISARV64GC in the default configuration, RV32 is also generated
Compiler flags-march=rv64gc -mabi=lp64d
Debug transportRISC-V Debug 0.13 over JTAG, when the system includes a debug module
Reset addressSet by the system integration, not by the core
misa (0x301)ISA and enabled extensions
mvendorid (0xF11)JEDEC vendor ID, read-only
marchid (0xF12)microarchitecture ID, read-only
mimpid (0xF13)implementation version, read-only
mhartid (0xF14)hart that runs the code, read-only

History

Rocket Chip comes from UC Berkeley, from the group that designed the RISC-V instruction set. Krste Asanovic and colleagues described it in the 2016 technical report "The Rocket Chip Generator", and Berkeley built many research chips with it.

SiFive, a company founded by creators of RISC-V, based its first commercial cores on Rocket. CHIPS Alliance, an open hardware group of the Linux Foundation, now hosts the project.

Where it is used

Most users reach Rocket through Chipyard, a framework that combines Rocket, BOOM and other blocks into complete chips. Chipyard runs those chips in software simulation, on FPGAs or through manufacturing tools. An FPGA is a chip that can be reconfigured to behave like a different circuit, and researchers use it to test a design at real speed before manufacturing.

Sources

  1. rocket-chip README
  2. The Rocket Chip Generator, UCB/EECS-2016-17
  3. Chipyard documentation
  4. RISC-V Debug Specification