Skip to content
Tim Ansell edited this page Apr 26, 2019 · 17 revisions

All LiteX SoCs need some type of CPU to operate correctly. Most use an "Soft CPU" embedded in the gateware for this purpose, but in some cases a host computer is used instead (for example this can be true in the PCIe card case).

Supported Soft CPUs

Currently the supported Soft CPUs are:

Most of these CPUs have multiple configuration "variants" which customize the configuration to target a specific type of firmware and performance. All these CPUs can be used with your own bare metal firmware.

Binutils + Compiler

  • lm32 support was added to upstream GCC around ~2009, no clang support.
  • or1k support was added to upstream GCC in version 9.0.0, clang support was added upstream in version XXX
  • riscv support (VexRISCV, PicoRV32 and Minerva) was added to upstream GCC in version 7.1.0, clang support was added upstream in version 3.1

You can compile your own compiler, download a precompiled toolchain or use an environment like TimVideos LiteX BuildEnv which provides precompiled toolchain for all three architectures.

Note: RISC-V toolchains support or require various extensions. Generally rv32i is used on smaller FPGAs, and rv32im on larger FPGAs -- the rv32im adds hardware multiplication and division (see RISC V ISA base and extensions on Wikipedia for more detail).

CPU Variants

minimal

Aliases: min

Minimal is the smallest possible working configuration for a given CPU type. These features frequently disables a large number of useful such as illegal instruction exceptions and similar. It should only be used if the absolute smallest configuration is needed.

Supported CPUs

  • lm32
  • picorv32
  • vexriscv

minimal_debug

Same as the minimal configuration but includes support for debugging features like a JTAG control.

lite

Lite is the configuration which should work okay for bare metal firmware and RTOS like NuttX or Zephyr on small big FPGAs like the Lattice iCE40 parts. It can also be used for designs which are more resource constrained.

Recommended FPGAs

  • Lattice iCE40 Series - iCE40HX, iCE40LP, iCE40UP5K
  • Any resource constrained design.

Supported CPUs

  • lm32
  • vexriscv

lite_debug

Same as the lite configuration but includes support for JTAG debugging features.

standard

Aliases: std

Standard is the default configuration which should work well for bare metal firmware and RTOS like NuttX or Zephyr on modern big FPGAs.

Supported CPUs

  • lm32
  • minerva
  • picorv32
  • or1k
  • vexriscv

Recommended FPGAs

  • Xilinx Series 7 - Artix 7, Kintex 7, Spartan 7
  • Xilinx Spartan 6
  • Lattice ECP5

linux

This target enables CPU features such as MMU that are required to get Linux booting.

Supported CPUs

  • or1k
  • vexriscv

SoftCPU options

LatticeMico32 soft core, small and designed for an FPGA.

Tooling support

  • Upstream GCC
  • Upstream Binutils

OS Support

  • No upstream Linux, very old Linux port
  • Upstream NuttX
  • No Zephyr support

Community

  • No current new activity

An OpenRISC 1000 soft core (see also Open RISC on Wikipedia).

Tooling support

  • Upstream GCC
  • Upstream Binutils
  • Upstream clang

OS support

  • Bare metal
  • No Zephyr support (?)
  • No NuttX support (?)
  • Upstream Linux

Community

  • Reasonable amount of activity.

RISC-V - VexRiscv

A FPGA Friendly RISC V core by SpinalHDL, implementing the rv32im instruction set (hardware multiply optional).

Tooling support

  • Upstream GCC
  • Upstream Binutils
  • Upstream clang

OS support

  • Upstream Zephyr
  • Maybe NuttX support (?)
  • Upstream Linux

Community

  • Lots of current activity
  • Currently supported under both LiteX & MiSoC

RISC-V - picorv32

A small RISC V core by Clifford Wolf, implementing the rv32imc instruction set (or configured subsets).

Tooling support

  • Upstream GCC
  • Upstream Binutils
  • Upstream clang

OS support

  • Out of tree Zephyr
  • No NuttX support (?)
  • Too small for Linux

Community

  • Some activity
Clone this wiki locally