RepositoryScala
MaxXSoft

MaxXSoft/Fuxi

Fuxi (伏羲) is a 32-bit pipelined RISC-V processor written in Chisel. Synthesizable and Linux capable.

186stars
25forks
0issues
1views

Featured achievements

The project's latest awards

3
TINIX TRENDING·Topic: chisel

#3 Repository of the week

3
TINIX TRENDING·Topic: riscv

#3 Repository of the week

4
TINIX TRENDING·Topic: fpga

#4 Repository of the week

Fuxi

Test

Fuxi (伏羲) is a 32-bit pipelined RISC-V processor written in Chisel3.

datapath

Implemented ISAs

  • RV32I 2.1
  • Zifencei extension 2.0
  • Zicsr extension 2.0
  • M extension 2.0
  • A extension 2.0
  • Machine-level ISA 1.11
  • Supervisor-level ISA 1.11

Unimplemented Details

Fuxi processor is designed for running GeeOS, or other simple operating systems or bare-metal software. Considering the complexity, the following functions has not yet been implemented:

  • Memory privilege in mstatus register: MPRV bit and MXR bit are hardwired to 0.
  • Virtualization support in mstatus register: TVM bit, TW bit and TSR bit are hardwired to 0.
  • Physical Memory Protection: all PMP registers are hardwired to 0.

Performance

With default configuration:

  • Dhrystone 2.1: 0.60 DMIPS/MHz.
  • CoreMark: 2.15 CoreMark/MHz.

Getting Started

By issuing the following command lines, you can get generated verilog file in directory verilog/build:

$ git clone https://github.com/MaxXSoft/Fuxi
$ cd Fuxi
$ make

Running Tests

Running Unit Tests

All unit tests are available in directory src/test/scala. For example, unit test for decode stage is available in core/DecoderTest.scala, you can run this test by executing the following command lines:

$ sbt
> test:runMain core.DecoderTest

Running CoreTest

CoreTest is a special unit test provided in this repository, it can run simple RISC-V programs using the Fuxi core. We also provided some programs in directory src/test/resources. For example, you can run one of it:

$ sbt
> test:runMain core.CoreTest -if src/test/resources/fib.txt

Trace information during running program fib.txt will be printed to the console.

CoreTest supports the following command line arguments:

OptionAbbreviationArgumentDescription
--init-file-ifpath to program fileSpecify the initialization file of ROM.
--trace-file-tfpath to trace fileSpecify the trace file, default to empty.
--gen-trace-gt0 or other valuesSet to 0 for trace comparison, otherwise use Fuxi core to generate trace file. Default to 0.

So you can test the core using a trace file generated by other processor or emulator:

> test:runMain core.CoreTest -if src/test/resources/fib.txt -tf src/test/resources/fib_trace.txt

For other details, please read the source file of CoreTest.scala.

All provided programs:

NameDescription
fib.txtGenerate the first 10 terms of the Fibonacci sequence.
mdu.txtPerform some multiplications and divisions.
mecall.txtTest machine mode environment call.
secall.txtTest supervisor mode environment call.

Running Other Test Benches

This part is under construction.

As we see in the top level module, the complete Fuxi processor consists of Core and CoreBus, the latter provides MMU, cache system and AXI4 interface for the Core part.

All of the unit test cases currently contained in this repository can only test modules in the Core part, we are still preparing the test bench the entire processor system. For now, you can build a tiny SoC by yourself based on some AXI4 IP cores to run other test benches you want.

Copyright (C) 2010-2020 MaxXing. License GPLv3.

Special thanks to @Yukiteru Lee.

Similar Projects

Discover other similar projects and AI models.

RepositoryScala
chipsalliance/rocket-chip

Rocket Chip Generator

3.9k
Nov 24, 2026
RepositoryAssembly
SpinalHDL/VexRiscv

A FPGA friendly 32 bit RISC-V CPU implementation

3.3k
Oct 13, 2026
RepositoryScala
chipsalliance/chisel

Chisel: A Modern Hardware Design Language

4.8k
Nov 25, 2026
RepositoryScala
ucb-bar/chipyard

An Agile RISC-V SoC Design Framework with in-order cores, out-of-order cores, accelerators, and more

2.5k
Nov 10, 2026
RepositoryScala
riscv-boom/riscv-boom

SonicBOOM: The Berkeley Out-of-Order Machine

2.3k
Nov 24, 2026
RepositoryAssembly
openhwfoundation/cva6

The CORE-V CVA6 is a highly configurable, 6-stage RISC-V core for both application and embedded applications. Application class configurations are capable of booting Linux.

3.2k
Nov 30, 2026
RepositoryVerilog
darklife/darkriscv

opensouce RISC-V cpu core implemented in Verilog from scratch in one night!

2.6k
Nov 23, 2026
RepositoryVHDL
stnolting/neorv32

🖥️ A small, customizable and extensible MCU-class 32-bit RISC-V soft-core CPU and microcontroller-like SoC written in platform-independent VHDL.

2.3k
Nov 29, 2026
RepositoryVerilog
splinedrive/kianRiscV

RISC-V XV6/Linux SoC, marchID: 0x2b, 0x34

1.1k
Nov 24, 2026