VexRiscv: a RISC-V core where the pipeline is a plugin list, and the numbers come with caveats
A FPGA friendly 32 bit RISC-V CPU implementation
At a glance
- What is it?
- A 32-bit RISC-V CPU written in SpinalHDL for FPGAs, pipelined from two to five or more stages, with almost nothing hardwired: the program counter manager, the register file and the hazard controller are all plugins, and an automatic pipelining mechanism moves data between them. The area and frequency table is published alongside four warnings about how it was measured, and the repository has no releases at all.
- Who is it for?
- VexRiscv fits an FPGA developer who wants a 32-bit RISC-V core with a documented bus set, optional caches, an MMU and a debug path, and who is comfortable in Scala and SpinalHDL rather than in Verilog.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 43 days ago.
- What is it written in?
- Mainly Assembly, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.
Star history
- SpinalHDL/VexRiscv3,312 ★ · +41
| Repository | 2026-09-24 | 2026-11-24 |
|---|---|---|
| SpinalHDL/VexRiscv | 3.3k | 3.3k |
41 Stars in the last 61 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
RV32I through RV32FDC, pipelined from two stages upward
The specification list is short enough to quote as a shopping list. The instruction set covers RV32I with optional M, A, F with D, and C extensions. The pipeline runs from two stages to five or more, named as Fetch with an optional stage, Decode, Execute, an optional Memory stage and an optional WriteBack stage, and the ability to delete those optional stages was added recently to reduce area in the small configurations. Performance is stated as 1.44 DMIPS/MHz with nearly every feature enabled and no inlining, rising to 1.57 DMIPS/MHz when the divider lookup table is enabled. The FPGA claim is specific: the design uses no vendor specific IP block or primitive. Buses are ready for AXI4, Avalon and wishbone, and the multiplier and divider are optional in their own right.
Almost nothing is fixed: the pipeline is assembled from plugins
The description of the hardware is explicit that very few things are fixed, and that nearly everything is plugin based. The program counter manager is a plugin, the register file is a plugin, the hazard controller is a plugin. Two mechanisms make that workable. The first is a tool that lets a plugin insert data into the pipeline at a chosen stage and lets other plugins read it at another stage, with the pipelining handled automatically. The second is a service system: a plugin can provide an exception service, and other plugins then emit exceptions through it without knowing who implemented it. The plugin list in the documentation index reads like a pipeline diagram, with IBusSimplePlugin and IBusCachedPlugin at the front, DecoderSimplePlugin, RegFilePlugin, HazardSimplePlugin, SrcPlugin, IntAluPlugin, the two shifters, BranchPlugin, the two data bus plugins, MulPlugin, DivPlugin and MulDivIterativePlugin in the middle, then CsrPlugin, MmuPlugin, PmpPlugin, DebugPlugin and FpuPlugin.
Four branch prediction modes and two shift implementations
The branch unit carries its own menu: Prediction NONE, Prediction STATIC, Prediction DYNAMIC and Prediction DYNAMIC_TARGET, the last of which pairs prediction with a direct mapped target buffer cache that the documentation says adds no penalty on a correct prediction. The shifter is the clearest example of the plugin approach paying off, because there are two implementations of the same instruction and you choose between them: a single cycle full barrel shifter, or a version that takes a number of cycles proportional to the shift amount. Hazard handling is per stage as well, and each stage can be given optional bypass logic or interlock logic instead. That is the difference between the two rows of the area table that differ only by an interrupt controller, and it is also why a configuration with a full barrel shifter and one without it are separate designs rather than a build option.
Caches, an MMU, PMP and a tightly coupled memory mode
The optional features are where the integration work actually lives. Instruction and data caches are optional, and so is the FPU, with a condition stated plainly: the floating point unit requires a data cache for now. There is an optional hardware refilled MMU and a StaticMemoryTranslatorPlugin for address translation, a PmpPlugin for physical memory protection with a NAPOT variant, a CsrPlugin for control and status registers and an MstatushPlugin for the machine status register. Privileged mode support is described as optional too, covering Machine, Supervisor and User modes as defined in version 1.10 of the RISC-V privileged specification, alongside interrupts and exception handling. Tightly coupled memory is available on both the instruction and data side, through two named configurations, GenFullWithTcm and GenFullWithTcmIntegrated, and the toolchain story includes Linux, Zephyr and a FreeRTOS port.
The performance table is published with four warnings attached
The area and frequency figures are given as plain text, one row per device:
VexRiscv small (RV32I, 0.52 DMIPS/MHz, no datapath bypass, no interrupt) ->
Artix 7 -> 243 MHz 504 LUT 505 FF
Cyclone V -> 174 MHz 352 ALMs
Cyclone IV -> 179 MHz 731 LUT 494 FF
iCE40 -> 92 MHz 1130 LCThe method behind those numbers is stated just as carefully. Synthesis ran as toplevel on the fastest speed grade of each device with no options chosen to save area or raise frequency, and the clock constraint was set to an unattainable value, which tends to increase the design area. The benchmark was dhrystone compiled with optimisation and inlining disabled. And every cached configuration suffers cache trashing during that benchmark except the one named full max perf, which reduces the measured performance; the documentation notes it is possible to build dhrystone binaries that fit in a 4KB instruction cache and a 4KB data cache, but that this is not currently the case. The configurations themselves live in a demo directory under the source tree.
Two build files, a JDK 8, and an Ubuntu 14 instruction
The root of the repository carries both an sbt build file and a Mill build file, which is the first sign that the toolchain has moved on from what the documentation assumes. The dependency section names a Java JDK 8 and gives its instructions for Ubuntu 14. Alongside those sit a tools shell script, a scripts directory, a project directory for build definitions, a doc directory, an assets directory, a Travis configuration and a gitmodules file, so parts of the wider setup live in other repositories. There is no homepage field and no documentation site in the repository metadata, and the documentation itself is organised as a long index in the README with sections for the SoC examples, for running Linux, for building the RISC-V GCC toolchain, and for a CPU parametrisation and instantiation example.
Debug runs through Eclipse, OpenOCD and JTAG, and there are no releases
An optional debug extension exists for Eclipse debugging over a chain the documentation writes as GDB, then OpenOCD, then JTAG, and there is a separate recipe for interactively debugging the simulated CPU through the same three tools with Verilator in the middle. Regression testing has its own section, and the README index also covers two extension points that use the plugin system directly: adding a custom instruction to the core, and adding a new control and status register. Support runs through a Gitter channel, commercial support goes to an email address in the README, and the author points readers who want a different design at another project in the same organisation, VexiiRiscv. The repository publishes no releases, so there is no version to pin and every user builds from a commit.
Editorial conclusion
VexRiscv fits an FPGA developer who wants a 32-bit RISC-V core with a documented bus set, optional caches, an MMU and a debug path, and who is comfortable in Scala and SpinalHDL rather than in Verilog. It fits badly if you need a versioned release to pin, since the repository publishes no releases and the documented toolchain is a Java JDK 8 on Ubuntu 14, or if you need a single headline performance number, because the published figure depends on whether the divider lookup table is enabled and on which pipeline configuration you synthesise. Three things to verify before you commit a design to it: the configuration named in the area table, since the same core measures 0.52 and 0.82 DMIPS/MHz in neighbouring rows; whether your operating system needs anything the core lists as optional, since the FPU currently requires a data cache; and whether the plugin set covers the custom instruction or CSR you intend to add, because the extension path goes through that same plugin mechanism.
Frequently asked questions
vexriscv vs neorv32
The VexRiscv README does not compare itself with neoRV32. What it does point to is VexiiRiscv, another project in the SpinalHDL organisation, as a design that may interest readers who want something different from this core.
Which instruction sets and pipeline depths does VexRiscv implement?
RV32I with optional M, A, F with D, and C extensions, pipelined from two stages to five or more, named Fetch, Decode, Execute, Memory and WriteBack with the last three removable. Performance is given as 1.44 DMIPS/MHz with nearly all features enabled and no inlining, or 1.57 DMIPS/MHz with the divider lookup table enabled, and the design uses no vendor specific IP block or primitive.
How does the VexRiscv plugin system work?
Nearly everything is a plugin, including the program counter manager, the register file and the hazard controller. One mechanism lets a plugin insert data at a chosen pipeline stage and other plugins read it at another stage with the pipelining handled automatically, and a service system lets one plugin provide an exception service that other plugins use. Custom instructions and new control and status registers are added through the same mechanism.
Which caches, memory protection and buses does VexRiscv support?
Optional instruction and data caches, an optional FPU that currently requires a data cache, an optional hardware refilled MMU with a static memory translator plugin, a physical memory protection plugin with a NAPOT variant, and tightly coupled memory on both caches through GenFullWithTcm and GenFullWithTcmIntegrated. The buses are AXI4, Avalon and wishbone, and there is an embedded RISC-V JTAG plugin.
How were the VexRiscv area and frequency numbers measured?
The core was synthesised as toplevel on the fastest speed grade of each device with neutral options, and the clock constraint was set to an unattainable value, which tends to increase area. The benchmark was dhrystone compiled with optimisation and inlining disabled. Every cached configuration suffers cache trashing during that benchmark except the configuration named full max perf, and the configurations used are in the demo directory of the source tree.
How do you build and debug VexRiscv?
The dependency section names a Java JDK 8 with instructions for Ubuntu 14, and the repository root carries both an sbt build file and a Mill build file. For debugging there is an optional debug extension for Eclipse over a GDB, OpenOCD and JTAG chain, plus an interactive recipe for the simulated CPU using GDB, OpenOCD and Verilator. The repository publishes no releases, so there is no tagged version to install.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/spinalhdl-vexriscv)Star history chart for your README
[](https://hysenlabs.com/projects/spinalhdl-vexriscv)Was this useful?