Skip to content

Tutorials Resources

enjoy-digital edited this page May 21, 2024 · 18 revisions

LiteX Tutorials

Lessons/Labs given to students to discover FPGAs and learn Migen/LiteX through a hands-on approach. These tutorials are covering the Migen's basics (syntax/simulations) through common SoC cores: Clock generation, 7-Segments displays, etc... and then the LiteX's basics through the integration of these cores in a SoC. It demonstrates and explains how to control these cores from an Host PC through a bridge (UART) and then directly from a RISC-V Soft-CPU implemented in the FPGA.

These tutorials should help users understand the possibilities of Migen/LiteX and give the basics to create their own Migen cores/LiteX SoCs.

Note: The labs are based on the Nexys4DDR (now named NexysA7) but can be easily adapted to others boards. Since these tutorials have been written, new less expensive open-source FPGA boards, also compatible with open-source FPGA toolchains, are widely available. The tutorials will probably be adapted to support such boards in the future.

TODO: Add description.

Fomu FPGA board

The Fomu is a tiny FPGA board that fits in your USB port. The SoC of the FPGA is built with LiteX and the workshop provides a hands-on approach to control the peripherals from a Host PC through the USB bridge from the ValentyUSB core and then demonstrates how to create a RISC-V SoC with a VexRiscv CPU and load/execute/debug C/Rust core with it and control the peripherals of the board.

LiteX based FPGA SoC for the Siglent SDS1104X-E Scope.

LiteX based FPGA SoC for the ThunderScope Scope.

The Colorlight 5A-75B is an inexpensive (15$) led control board equipped with a Lattice ECP5 FPGA, 2 x 1Gbps Ethernet and lots of IOs. ColorLite project explains how to create a cheap remote control/monitoring system with it can be useful to discover LiteX/LiteEth through a practical example.

enter image description here

The iCEBreaker is the first open source iCE40 FPGA development board designed for teachers and students. The iCEBreaker target integrated in LiteX-Boards provides a minimal LiteX SoC for the iCEBreaker with a CPU, its ROM (in SPI Flash), its SRAM, close to the others LiteX targets. A more complete example of LiteX SoC for the iCEBreaker with more features, examples to run C/Rust code on the RISC-V CPU and documentation can be found in the iCEBreaker LiteX examples tutorial.

Useful resources

Blogpost/Wiki by @bunnie from 2018 with his understanding of LiteX and tips for engineers with a hardware background.

Wiki of LiteX Buildenv project with information complementary to LiteX's Wiki.

Blogpost by gojimmypi testing LiteX on the ULX3S board and experimenting with the Soft CPU.

Tiny collection of tips for the Colorlight i5 FPGA board.

Use of the SQRL Acorn with LitePCIe in a Thunderbolt/nVME enclosure.

Discovery/Use of LiteX with FemtoRV CPU by @BrunoLevy.

Discovery of LiteX as a SoC Builder by @controlpaths

Clone this wiki locally