Discovering LiteX: Building SoCs Like LEGO

If you’ve ever tried to build a microprocessor from scratch, you know it’s a battlefield full of hazards, memory control, and instruction handling. A true digital mess. In the middle of that chaos, I came across a tool that completely changed the way I see FPGA development: LiteX. What is LiteX? LiteX is a framework for designing SoCs (System on Chip) on FPGA, transforming the process into something like assembling LEGO blocks: you pick a processor, add controllers, memory, peripherals, and done!...

May 20, 2025 · 4 min · Fabian Alvarez

Design of a RISC-V Microprocessor with GPIO Integration

Introduction to RISC-V and the 32I Instruction Set RISC-V is an open and free instruction set architecture (ISA) that has gained significant popularity in microprocessor design due to its flexibility and efficiency. Unlike proprietary architectures, RISC-V allows developers and researchers to create custom processors without licensing restrictions. What is RISC-V? RISC-V is an architecture based on the Reduced Instruction Set Computing (RISC) principle, meaning it uses a simplified instruction set to improve hardware efficiency....

February 18, 2025 · 2 min · Fabian Alvarez

HDMI Output with LiteX on the Tang Nano 9K

HDMI output on FPGA platforms is a powerful way to generate real-time graphics directly from custom hardware. In this article, we’ll explore how to implement HDMI output using the LiteX framework on the Tang Nano 9K, a low-cost FPGA with impressive versatility. I’ve already written a guide on how to get started with LiteX and build a basic SoC in the previous post. 🧱 HDMI Architecture in LiteX By default, the tangnano9k....

May 25, 2025 · 3 min · Fabian Alvarez

First Steps in RISC-V Microcontroller Development

Selection of Hardware and Development Tools In this second article of the series, I will begin with the first steps in developing a RISC-V 32I-based microcontroller. For this, I have decided to use a Tang Nano 20K as the implementation platform. However, depending on resource usage, I might consider switching to a Tang Nano 9K if it meets the design requirements. Since the selected FPGA belongs to the Tang Nano family, this limits the development environment to compatible tools....

February 19, 2025 · 2 min · Fabian Alvarez

Linux on LiteX: Building a RISC-V SoC with Buildroot on Tang Nano 20K

Introduction One of the most exciting milestones when working with embedded systems is running an operating system (OS). Among all options, Linux stands out as the premier choice—especially being free, open-source, and backed by a massive ecosystem of tools and community support. The ability to run Linux on custom FPGA-based SoCs opens up endless possibilities for prototyping, research, and production systems. In this guide, we’ll walk through the complete process of booting Linux on a Tang Nano 20K FPGA using LiteX to generate a RISC-V SoC and Buildroot to create a minimal Linux system....

June 12, 2025 · 10 min · Fabian Alvarez

Implementing a Register File for a RISC-V 32I Processor on FPGA

Implementing a Register File for a RISC-V 32I Processor on FPGA This article is part of our series on designing and implementing a RISC-V 32I processor on the Tang Nano 20K FPGA. Today we’ll dive into an essential component of any processor: the register file. We’ll explore what it is, why it’s critical to RISC-V architecture, and how to efficiently implement it in Verilog. Additionally, we’ll discuss key optimizations to ensure robustness and compatibility with real hardware....

March 16, 2025 · 3 min · Fabian Alvarez

Implementing the Control Unit of a RISC-V 32I Processor on FPGA

Implementing the Control Unit of a RISC-V 32I Processor on FPGA We continue our series on building a RISC-V 32I processor using the Tang Nano 20K FPGA. Today, we’ll discuss the Control Unit, a key component that brings our processor to life. We’ll explain it clearly and simply, then implement the code together in Verilog, detailing each step for clarity. What Exactly is the Control Unit? The Control Unit is like the conductor of an orchestra—it ensures all parts of the processor work in harmony....

March 16, 2025 · 5 min · Fabian Alvarez

How to Run Zephyr on a LiteX SoC in the Tang Nano 20K

How to Run Zephyr on a LiteX SoC in the Tang Nano 20K In this guide, you will learn how to install and run Zephyr OS on a LiteX SoC with a VexRiscv CPU on the Tang Nano 20K FPGA. This process will allow you to experiment with advanced embedded systems and leverage the capabilities of open hardware. 📦 Requirements Tang Nano 20K LiteX development environment (Python, dependencies, toolchains) Zephyr OS and toolchain (west, cmake, ninja, etc....

August 15, 2025 · 2 min · Fabian Alvarez

Turn a PS2 Joystick into a USB Gamepad with Feather 32u4

In this guide, you’ll learn how to interface a generic PS2 joystick with a Feather 32u4, so it works as a USB gamepad on Windows and Steam. We’ll cover the hardware, wiring, Arduino IDE firmware, and Steam setup. Motivation I left my Xbox 360 controller at home, but I have a PS2 joystick I bought years ago for a retro project. With a Feather 32u4 and a bit of code, we can turn it into a USB gamepad compatible with any PC....

June 1, 2025 · 7 min · Fabian Alvarez