All Projects → seldridge → Rocket Rocc Examples

seldridge / Rocket Rocc Examples

Licence: other
Tests for example Rocket Custom Coprocessors

Programming Languages

c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to Rocket Rocc Examples

Rvemu
RISC-V emulator for CLI and Web written in Rust with WebAssembly. It supports xv6 and Linux (ongoing).
Stars: ✭ 289 (+455.77%)
Mutual labels:  riscv
Rars
RARS -- RISC-V Assembler and Runtime Simulator
Stars: ✭ 413 (+694.23%)
Mutual labels:  riscv
Capstone
Capstone disassembly/disassembler framework: Core (Arm, Arm64, BPF, EVM, M68K, M680X, MOS65xx, Mips, PPC, RISCV, Sparc, SystemZ, TMS320C64x, Web Assembly, X86, X86_64, XCore) + bindings.
Stars: ✭ 5,374 (+10234.62%)
Mutual labels:  riscv
Jupiter
RISC-V Assembler and Runtime Simulator
Stars: ✭ 326 (+526.92%)
Mutual labels:  riscv
Scr1
SCR1 is a high-quality open-source RISC-V MCU core in Verilog
Stars: ✭ 393 (+655.77%)
Mutual labels:  riscv
Probe Rs
A debugging toolset and library for debugging embedded ARM and RISC-V targets on a separate host
Stars: ✭ 435 (+736.54%)
Mutual labels:  riscv
Maxine Vm
Maxine VM: A meta-circular research VM
Stars: ✭ 274 (+426.92%)
Mutual labels:  riscv
Vexriscv
A FPGA friendly 32 bit RISC-V CPU implementation
Stars: ✭ 1,041 (+1901.92%)
Mutual labels:  riscv
Cores Swerv
SweRV EH1 core
Stars: ✭ 406 (+680.77%)
Mutual labels:  riscv
Rv8
RISC-V simulator for x86-64
Stars: ✭ 476 (+815.38%)
Mutual labels:  riscv
F32c
A 32-bit RISC-V / MIPS ISA retargetable CPU core & SoC, 1.63 DMIPS/MHz
Stars: ✭ 338 (+550%)
Mutual labels:  riscv
Pulp Dronet
A deep learning-powered visual navigation engine to enables autonomous navigation of pocket-size quadrotor - running on PULP
Stars: ✭ 374 (+619.23%)
Mutual labels:  riscv
Unicorn
Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, X86)
Stars: ✭ 4,934 (+9388.46%)
Mutual labels:  riscv
Lbforth
Self-hosting metacompiled Forth, bootstrapping from a few lines of C; targets Linux, Windows, ARM, RISC-V, 68000, PDP-11, asm.js.
Stars: ✭ 293 (+463.46%)
Mutual labels:  riscv
Riscv Boom
SonicBOOM: The Berkeley Out-of-Order Machine
Stars: ✭ 852 (+1538.46%)
Mutual labels:  riscv
Shecc
A self-hosting and educational C compiler
Stars: ✭ 286 (+450%)
Mutual labels:  riscv
Chipyard
An Agile RISC-V SoC Design Framework with in-order cores, out-of-order cores, accelerators, and more
Stars: ✭ 436 (+738.46%)
Mutual labels:  riscv
Darkriscv
opensouce RISC-V cpu core implemented in Verilog from scratch in one night!
Stars: ✭ 1,062 (+1942.31%)
Mutual labels:  riscv
K210 Hal
Rust's hardware abstract layer (HAL) for K210 chip, a dual RV64GC SoC with hardware accelerated AI peripherals. Contributions welcomed!
Stars: ✭ 37 (-28.85%)
Mutual labels:  riscv
Cv32e40p
CV32E40P is an in-order 4-stage RISC-V RV32IMFCXpulp CPU based on RI5CY from PULP-Platform
Stars: ✭ 458 (+780.77%)
Mutual labels:  riscv

Collection of example libraries and test programs for the existing Rocket Custom Coprocessor (RoCC) accelerators for Rocket Chip.

Usage

Install the RISC-V toolchain and make sure that it's on your path. You need to pass the path to riscv-tools in as an argument to configure --with-riscvtools=$PATH_TO_RISCV_TOOLS.

autoconf
mkdir build && cd build
../configure --with-riscvtools=$PATH_TO_RISCV_TOOLS
make

This creates two classes of tests:

Bare Metal tests can be run directly on the emulator (for instructions on how to build this see the following section), e.g.:

emulator-freechips.rocketchip.system-RoccExampleConfig bareMetal/examples-bareMetal-p-accumulator

Proxy Kernel tests are ELFs and need the Proxy Kernel (or Linux). You must first patch the Proxy Kernel so that the XS bits allow access to the "extension" (the RoCC). You can change this manually or use the provided patch (patches/riscv-pk.patch):

cd $RISCV_PK_DIR
git apply $THIS_REPO_DIR/patches/riscv-pk.patch

mkdir build
cd build
../configure --prefix=$RISCV/riscv64-unknown-elf --host=riscv64-unknown-elf
make
make install

Following that, you can run Proxy Kernel tests, e.g., :

emulator-freechips.rocketchip.system-RoccExampleConfig pk pk/examples-pk-accumulator

Building a Rocket Chip Emulator

Build a rocket-chip emulator with the RoCC examples baked in and run the provided test program:

cd $ROCKETCHIP_DIR/emulator
make CONFIG=RoccExampleConfig

Expected Run Time

The included test should run for ~5 million cycles over a wall clock time of ~5 minutes.

> time $ROCKETCHIP_DIR/emulator-freechips.rocketchip.system-RoccExampleConfig -c pk pk/examples-pk-accumulator
[INFO] Write R[1] = 0xdead
[INFO] Read R[1]
[INFO]   Received 0xdead (expected 0xdead)
[INFO] Accum R[1] with 0xffffffffffffe042
[INFO] Read R[1]
[INFO]   Received 0xbeef (expected 0xbeef)
[INFO] Load 0xbad (virt: 0x0xfee9ac0, phys: 0x0x8ffffac0) via L1 virtual address
[INFO] Read R[1]
[INFO]   Received 0xbad (expected 0xbad)
Completed after 3278954 cycles

real	5m2.738s
user	5m0.262s
sys	0m1.179s
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].