LiteX VexiiRiscv
Warning
This board is not a fixed piece of hardware, it is a soft SoC that is generated by the LiteX SoC Builder and may change at any time. The memory map, the set of peripherals, their base addresses and their configuration are all determined when the bitstream is generated, so a SoC built from a different LiteX revision or with a different configuration will most likely not match the devicetree shipped with this board.
The in-tree board definition is therefore only a snapshot of one specific
configuration. Whenever your SoC does not match it exactly, generate a
devicetree and Kconfig overlay for your build with
litex_json2dts_zephyr.py (see Bitstream generation) instead of relying
on the in-tree files, and expect the in-tree files to change without any
backwards compatibility guarantees.
LiteX VexiiRiscv is an example of a system on a chip (SoC) that consists of a VexiiRiscv processor and additional peripherals. This setup can be generated using the LiteX SoC Builder and can be used on various FPGA chips. The bitstream (FPGA configuration file) can be obtained using both vendor-specific and open-source tools.
The litex_vexiiriscv board configuration in Zephyr is meant for the
LiteX VexiiRiscv SoC implementation generated for the
Efinix Titanium Ti375 C529 Development Kit.
LiteX is based on Migen/MiSoC SoC builder and provides ready-made system components such as buses, streams, interconnects, common cores, and CPU wrappers to create SoCs easily. The tool contains mechanisms for integrating, simulating, and building various designs that target multiple chips of different vendors. More information about the LiteX project can be found on LiteX’s website.
VexiiRiscv is a implementation of the RISC-V CPU architecture written in the SpinalHDL. The implementation is optimized for FPGA chips. More information about the project can be found on VexiiRiscv’s website.
To run the ZephyrOS on the VexiiRiscv CPU, it is necessary to prepare the bitstream for the FPGA on a Efinix Titanium Ti375 C529 Development Kit.
Supported Features
The litex_vexiiriscv board supports the hardware features listed below.
- on-chip / on-board
- Feature integrated in the SoC / present on the board.
- 2 / 2
-
Number of instances that are enabled / disabled.
Click on the label to see the first instance of this feature in the board/SoC DTS files. -
vnd,foo -
Compatible string for the Devicetree binding matching the feature.
Click on the link to view the binding documentation.
litex_vexiiriscv/litex_vexiiriscv target
On-target memory for this board target: 1 GiB of RAM, N/A of Flash.
Type |
Location |
Description |
Compatible |
|---|---|---|---|
CPU |
on-board |
VexiiRiscv core with the standard configuration as used by LiteX1 |
|
Ethernet |
on-board |
LiteX LiteEth MDIO bitbang driver1 |
|
on-board |
Generic MII PHY1 |
||
on-board |
LiteX Ethernet1 |
||
Interrupt controller |
on-board |
RISC-V CPU interrupt controller1 |
|
on-board |
SiFive RISCV-V platform-local interrupt controller1 |
||
MTD |
on-board |
Properties supporting Zephyr spi-nor flash driver (over the Zephyr SPI API) control of serial flash memories using the standard M25P80-based command set1 |
|
RISC-V architecture |
on-board |
LiteX SoC Controller driver1 |
|
SDHC |
on-board |
LiteX LiteSDCard SDHC2 |
|
Serial controller |
on-board |
LiteX UART1 |
|
SPI |
on-board |
LiteX SPI LiteSPI Controller1 |
|
SRAM |
on-board |
Generic on-chip SRAM1 |
|
Timer |
on-board |
RISC-V Machine Timer1 |
|
Watchdog |
on-board |
LiteX watchdog1 |
Bitstream generation
The bitstream is generated using the official LiteX repository. Because the generated SoC does not necessarily match the devicetree shipped with this board, you should always generate a devicetree and Kconfig overlay along with it.
Create a virtual environment and activate it:
python3 -m venv .venv source .venv/bin/activate
Install Migen/LiteX and the LiteX’s cores:
wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py chmod +x litex_setup.py ./litex_setup.py --init --install --user (--user to install to user directory) --config=(minimal, standard, full)
Install the RISC-V toolchain:
pip3 install meson ninja ./litex_setup.py --gcc=riscv
Build the target:
./litex-boards/litex_boards/targets/efinix_ti375_c529_dev_kit.py --cpu-type=vexiiriscv --build
Generate the dts and config overlay:
./litex/litex/tools/litex_json2dts_zephyr.py --dts overlay.dts --config overlay.config csr.json
Programming and booting
Building
Applications for the litex_vexiiriscv board configuration can be built as usual
(see Building an Application), by setting the BOARD variable to
litex_vexiiriscv and passing the overlays generated for your SoC:
west build -b litex_vexiiriscv path/to/app -DDTC_OVERLAY_FILE=path/to/overlay.dts
Booting
To upload the bitstream to the FPGA you can either use the
--load option or the --flash option to program the SPI flash.
You can boot from a serial port using litex_term (replace ttyUSBX with your device) , e.g.:
litex_term /dev/ttyUSBX --speed 115200 --kernel zephyr.bin