All Projects → tommythorn → yarvi

tommythorn / yarvi

Licence: ISC license
Yet Another RISC-V Implementation

Programming Languages

Roff
2310 projects
Verilog
626 projects
c
50402 projects - #5 most used programming language
Makefile
30231 projects
C++
36643 projects - #6 most used programming language
Bluespec
12 projects

Projects that are alternatives of or similar to yarvi

Darkriscv
opensouce RISC-V cpu core implemented in Verilog from scratch in one night!
Stars: ✭ 1,062 (+1700%)
Mutual labels:  fpga, riscv, verilog, risc-v
Ustc Rvsoc
FPGA-based RISC-V CPU+SoC.
Stars: ✭ 77 (+30.51%)
Mutual labels:  fpga, riscv, verilog, risc-v
Vexriscv
A FPGA friendly 32 bit RISC-V CPU implementation
Stars: ✭ 1,041 (+1664.41%)
Mutual labels:  fpga, riscv, verilog
Fpga101 Workshop
FPGA 101 - Workshop materials
Stars: ✭ 54 (-8.47%)
Mutual labels:  fpga, riscv, verilog
Cores Swerv El2
SweRV EL2 Core
Stars: ✭ 79 (+33.9%)
Mutual labels:  fpga, riscv, risc-v
spu32
Small Processing Unit 32: A compact RV32I CPU written in Verilog
Stars: ✭ 51 (-13.56%)
Mutual labels:  fpga, verilog, risc-v
Cores Swerv
SweRV EH1 core
Stars: ✭ 406 (+588.14%)
Mutual labels:  fpga, riscv, risc-v
KyogenRV
The Simple 5-staged pipeline RISC-V written in chisel3 for intel FPGA.
Stars: ✭ 37 (-37.29%)
Mutual labels:  fpga, riscv, risc-v
Neorv32
A small and customizable full-scale 32-bit RISC-V soft-core CPU and SoC written in platform-independent VHDL.
Stars: ✭ 106 (+79.66%)
Mutual labels:  fpga, riscv, risc-v
Tang e203 mini
LicheeTang 蜂鸟E203 Core
Stars: ✭ 135 (+128.81%)
Mutual labels:  fpga, verilog, risc-v
Biriscv
32-bit Superscalar RISC-V CPU
Stars: ✭ 208 (+252.54%)
Mutual labels:  fpga, verilog, risc-v
Riscv
RISC-V CPU Core (RV32IM)
Stars: ✭ 272 (+361.02%)
Mutual labels:  fpga, verilog, risc-v
super-miyamoto-sprint
Homebrew game for homebrew FPGA game console
Stars: ✭ 48 (-18.64%)
Mutual labels:  fpga, verilog, risc-v
Platformio Core
PlatformIO is a professional collaborative platform for embedded development 👽 A place where Developers and Teams have true Freedom! No more vendor lock-in!
Stars: ✭ 5,539 (+9288.14%)
Mutual labels:  fpga, verilog, risc-v
getting-started
List of ideas for getting started with TimVideos projects
Stars: ✭ 50 (-15.25%)
Mutual labels:  fpga, verilog, risc-v
Zelda.RISCV.Emulator
A System Level RISCV32 Emulator Over x86_64: capable of booting RISCV Linux
Stars: ✭ 18 (-69.49%)
Mutual labels:  riscv, risc-v, riscv32
hero-sdk
⛔ DEPRECATED ⛔ HERO Software Development Kit
Stars: ✭ 21 (-64.41%)
Mutual labels:  riscv, risc-v, riscv32
Scr1
SCR1 is a high-quality open-source RISC-V MCU core in Verilog
Stars: ✭ 393 (+566.1%)
Mutual labels:  riscv, verilog, risc-v
Icestation 32
Compact FPGA game console
Stars: ✭ 93 (+57.63%)
Mutual labels:  fpga, verilog, risc-v
kianRiscV
KianRISC-V! No RISC-V, no fun! RISC-V CPU with strong design rules and unittested! CPU you can trust! kianv rv32im risc-v a hdmi soc with harris computer architecture in verilog: multicycle, singlecycle and 5-stage pipelining Processor. Multicycle Soc with firmware that runs raytracer, mandelbrot, 3d hdmi gfx, dma controller, etc.....
Stars: ✭ 167 (+183.05%)
Mutual labels:  fpga, riscv, verilog

YARVI2

YARVI2 is an FPGA-focused in-order scalar RISC-V softcore with branch prediction. The original, YARVI, was the first non-Berkely freely available RISC-V softcore implementation. YARVI2 is a complete rewrite for better performance.

YARVI2 is free and open hardware licensed under the ISC license (a license that is similar in terms to the MIT license or the 2-clause BSD license).

Status

  • RV32I implemented and tested (regress with make comply test)

  • Eight stage pipeline

  • YAGS branch predictor, jump, call, and return address predictor

  • Current performance

    • 98.1 Dhrystones MIPS
    • 0.904 instructions/cycle (on Dhrystones)

    On a Lattice Semi ECP5 85F, speed grade 6 (as per make fmax ipc):

    • 56.6 MHz (128/128 KiB configuration)

    On an Altera Cyclone-V A9 C8

    • 100+ MHz (128/128 KiB configuration)
  • loads have a two cycle latency and use will stall as needed (known as a load-use hazard)

  • loads that execute before a prior store to the same address has completed will be restarted (known as a load-hit-store hazard, has a 7 cycle penalty, needs two instruction separation to avoid)

Pipeline details

We have eight stages:


                          result forwarding
                        v---+----+----+----+

 s0   s1    s2    s3   s4   s5   s6   s7   s8
 PC | IF1 | IF2 | RF | DE | EX | CM | WB | -

  ^--- stall -----/
  ^----- pipeline restarts ------/

Showing the data loop and the two control loops. There is a 7 cycle mispredict penalty, same for load-hit-store. Load has a 2 cycle latency and can incur up to 2 stall cycles.

  • PC: PC generation/branch prediction
  • IF1: start instruction fetch
  • IF2: register fetched instruction
  • RF: read registers (and pre-decode)
  • DE: decode instruction and forward registers from later stages
  • EX: execute ALU instruction, compute branch conditions, load/store address
  • CM: Commit to the instruction or restart, start memory load
  • WB: write rf, store to memory, load way selection and data alignment/sign-extension

S8 isn't really a stage, but as we read registers in s3 any writes happening in s7 wouldn't be visible yet so we'll have to forward from s8.

Currently the pipeline can be restarted (and flushed) only from s6 and causes the clear of all valid bits.

The pipeline might be invalidated or restarted for several reasons:

  • fetch mispredicted a branch and fed us the wrong instructions.
  • we need a value that is still being loaded from memory
  • instruction traps, like misaligned loads/stores
  • interrupts (which are taken in CM)

Coming soon

Expect more performance, more features

High priority:

  • continuous timing improvement (Fmax)
  • converting data memories to caches + external memory interface (features)

Planned:

  • multiplier and atomics (RVAM)

Considering:

  • virtual memory
  • 64-bit (RV64)
  • compressed instructions (RVC)
  • floating point (RVFD)

and more

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