All Projects → ultraembedded → Biriscv

ultraembedded / Biriscv

Licence: apache-2.0
32-bit Superscalar RISC-V CPU

Projects that are alternatives of or similar to Biriscv

Riscv
RISC-V CPU Core (RV32IM)
Stars: ✭ 272 (+30.77%)
Mutual labels:  verilog, fpga, cpu, risc-v, asic
Ustc Rvsoc
FPGA-based RISC-V CPU+SoC.
Stars: ✭ 77 (-62.98%)
Mutual labels:  verilog, fpga, cpu, risc-v
Darkriscv
opensouce RISC-V cpu core implemented in Verilog from scratch in one night!
Stars: ✭ 1,062 (+410.58%)
Mutual labels:  verilog, fpga, cpu, risc-v
Open Register Design Tool
Tool to generate register RTL, models, and docs using SystemRDL or JSpec input
Stars: ✭ 126 (-39.42%)
Mutual labels:  verilog, fpga, asic
Tang e203 mini
LicheeTang 蜂鸟E203 Core
Stars: ✭ 135 (-35.1%)
Mutual labels:  verilog, fpga, risc-v
Hrm Cpu
Human Resource Machine - CPU Design #HRM
Stars: ✭ 43 (-79.33%)
Mutual labels:  verilog, fpga, cpu
Zipcpu
A small, light weight, RISC CPU soft core
Stars: ✭ 640 (+207.69%)
Mutual labels:  verilog, fpga, cpu
Logic
CMake, SystemVerilog and SystemC utilities for creating, building and testing RTL projects for FPGAs and ASICs.
Stars: ✭ 149 (-28.37%)
Mutual labels:  verilog, fpga, asic
Vexriscv
A FPGA friendly 32 bit RISC-V CPU implementation
Stars: ✭ 1,041 (+400.48%)
Mutual labels:  verilog, fpga, cpu
Rggen
Code generation tool for configuration and status registers
Stars: ✭ 54 (-74.04%)
Mutual labels:  verilog, fpga, asic
Cva6
The CORE-V CVA6 is an Application class 6-stage RISC-V CPU capable of booting Linux
Stars: ✭ 1,144 (+450%)
Mutual labels:  fpga, cpu, asic
Icestation 32
Compact FPGA game console
Stars: ✭ 93 (-55.29%)
Mutual labels:  verilog, fpga, risc-v
Aes
Verilog implementation of the symmetric block cipher AES (Advanced Encryption Standard) as specified in NIST FIPS 197. This implementation supports 128 and 256 bit keys.
Stars: ✭ 131 (-37.02%)
Mutual labels:  verilog, fpga, asic
Mips Cpu
A MIPS CPU implemented in Verilog
Stars: ✭ 38 (-81.73%)
Mutual labels:  verilog, fpga, cpu
E200 opensource
This repository hosts the project for open-source hummingbird E203 RISC processor Core.
Stars: ✭ 1,909 (+817.79%)
Mutual labels:  verilog, cpu, risc-v
Clash Compiler
Haskell to VHDL/Verilog/SystemVerilog compiler
Stars: ✭ 958 (+360.58%)
Mutual labels:  verilog, fpga, asic
Neorv32
A small and customizable full-scale 32-bit RISC-V soft-core CPU and SoC written in platform-independent VHDL.
Stars: ✭ 106 (-49.04%)
Mutual labels:  fpga, cpu, risc-v
Riscv Cores List
RISC-V Cores, SoC platforms and SoCs
Stars: ✭ 471 (+126.44%)
Mutual labels:  fpga, risc-v, asic
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 (+2562.98%)
Mutual labels:  verilog, fpga, risc-v
J1sc
A reimplementation of a tiny stack CPU
Stars: ✭ 64 (-69.23%)
Mutual labels:  verilog, fpga, cpu

biRISC-V - 32-bit dual issue RISC-V CPU

Github: http://github.com/ultraembedded/biriscv

biRISC-V

Features

  • 32-bit RISC-V ISA CPU core.
  • Superscalar (dual-issue) in-order 6 or 7 stage pipeline.
  • Support RISC-V’s integer (I), multiplication and division (M), and CSR instructions (Z) extensions (RV32IMZicsr).
  • Branch prediction (bimodel/gshare) with configurable depth branch target buffer (BTB) and return address stack (RAS).
  • 64-bit instruction fetch, 32-bit data access.
  • 2 x integer ALU (arithmetic, shifters and branch units).
  • 1 x load store unit, 1 x out-of-pipeline divider.
  • Issue and complete up to 2 independent instructions per cycle.
  • Supports user, supervisor and machine mode privilege levels.
  • Basic MMU support - capable of booting Linux with atomics (RV-A) SW emulation.
  • Implements base ISA spec v2.1 and privileged ISA spec v1.11.
  • Verified using Google's RISCV-DV random instruction sequences using cosimulation against C++ ISA model.
  • Support for instruction / data cache, AXI bus interfaces or tightly coupled memories.
  • Configurable number of pipeline stages, result forwarding options, and branch prediction resources.
  • Synthesizable Verilog 2001, Verilator and FPGA friendly.
  • Coremark: 4.1 CoreMark/MHz
  • Dhrystone: 1.9 DMIPS/MHz ('legal compile options' / 337 instructions per iteration)

A sequence showing execution of 2 instructions per cycle; Dual-Issue

Documentation

Similar Cores

  • SiFive E76
    • RV32IMAFC
    • Dual issue in-order 8 stage pipeline
    • 4 ALU units (2 early, 2 late)
    • ✖️ Commercial closed source core/$$
  • WD SweRV RISC-V Core EH1
    • RV32IMC
    • Dual issue in-order 9 stage pipeline
    • 4 ALU units (2 early, 2 late)
    • ✖️ System Verilog + auto signal hookup
    • ✖️ No data cache option
    • ✖️ Not able to boot Linux

Project Aims

  • Boot Linux all the way to a functional userspace environment. ✔️
  • Achieve competitive performance for this class of in-order machine (i.e. aim for 80% of WD SweRV CoreMark score). ✔️
  • Reasonable PPA / FPGA resource friendly. ✔️
  • Fit easily onto cheap hobbyist FPGAs (e.g. Xilinx Artix 7) without using all LUT resources and synthesize > 50MHz. ✔️
  • Support various cache and TCM options. ✔️
  • Be constructed using readable, maintainable and documented IEEE 1364-2001 Verilog. ✔️
  • Simulate in open-source tools such as Verilator and Icarus Verilog. ✔️
  • In later releases, add support for atomic extensions.

Booting the stock Linux 5.0.0-rc8 kernel built for RV32IMA to userspace on a Digilent Arty Artix 7 with biRISC-V (with atomic instructions emulated in the bootloader); Linux-Boot

Prior Work

Based on my previous work;

Getting Started

Cloning

To clone this project and its dependencies;

git clone --recursive https://github.com/ultraembedded/biriscv.git

Running Helloworld

To run a simple test image on the core RTL using Icarus Verilog;

# Install Icarus Verilog (Debian / Ubuntu / Linux Mint)
sudo apt-get install iverilog

# [or] Install Icarus Verilog (Redhat / Centos)
#sudo yum install iverilog

# Run a simple test image (test.elf)
cd tb/tb_core_icarus
make

The expected output is;

Starting bench
VCD info: dumpfile waveform.vcd opened for output.

Test:
1. Initialised data
2. Multiply
3. Divide
4. Shift left
5. Shift right
6. Shift right arithmetic
7. Signed comparision
8. Word access
9. Byte access
10. Comparision

Configuration

Param Name Valid Range Description
SUPPORT_SUPER 1/0 Enable supervisor / user privilege levels.
SUPPORT_MMU 1/0 Enable basic memory management unit.
SUPPORT_MULDIV 1/0 Enable HW multiply / divide (RV-M).
SUPPORT_DUAL_ISSUE 1/0 Support superscalar operation.
SUPPORT_LOAD_BYPASS 1/0 Support load result bypass paths.
SUPPORT_MUL_BYPASS 1/0 Support multiply result bypass paths.
SUPPORT_REGFILE_XILINX 1/0 Support Xilinx optimised register file.
SUPPORT_BRANCH_PREDICTION 1/0 Enable branch prediction structures.
NUM_BTB_ENTRIES 2 - Number of branch target buffer entries.
NUM_BTB_ENTRIES_W 1 - Set to log2(NUM_BTB_ENTRIES).
NUM_BHT_ENTRIES 2 - Number of branch history table entries.
NUM_BHT_ENTRIES_W 1 - Set to log2(NUM_BHT_ENTRIES_W).
BHT_ENABLE 1/0 Enable branch history table based prediction.
GSHARE_ENABLE 1/0 Enable GSHARE branch prediction algorithm.
RAS_ENABLE 1/0 Enable return address stack prediction.
NUM_RAS_ENTRIES 2 - Number of return stack addresses supported.
NUM_RAS_ENTRIES_W 1 - Set to log2(NUM_RAS_ENTRIES_W).
EXTRA_DECODE_STAGE 1/0 Extra decode pipe stage for improved timing.
MEM_CACHE_ADDR_MIN 32'h0 - 32'hffffffff Lowest cacheable memory address.
MEM_CACHE_ADDR_MAX 32'h0 - 32'hffffffff Highest cacheable memory address.
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].