LiteX

Recent Popular

Trying to Build an SoC Environment with LiteX (12. Debugging the Test Case)

In the previous articles I found out that the PLIC needs to be placed inside the CPU's system, so I have been reimplementing the subsystem. Specifically, until now the Tile was exposed as-is as the CPU subsystem of the SoC, but I decided t…

Trying to Build an SoC Environment with LiteX (11. Debugging the Test Case)

I was checking the waveforms to find out why the test case dies partway through, and it seems it was accessing an invalid memory region. I had placed the PLIC region at 0x0C00_0000, but once you go outside this region the bus stops respond…

Trying to Build an SoC Environment with LiteX (11. Analyzing the LiteX Boot Sequence)

By comparing against other waveforms, I have gradually figured out what is needed. Next, what we need is the memory map. I modified the memory map as follows. [ { "base": "0x0000_0000", "size": "0x0002_0000", "attr": {"R": 1, "W": 0, "X": …

Trying to Build an SoC Environment with LiteX (10. Changing the LiteX AXI Configuration)

By comparing against other waveforms, I have gradually come to understand what is needed. My own CPU is currently connected with a simplified AXI, but the configuration for it is insufficient. I made a few fixes so that it works properly a…

Trying to Build an SoC Environment with LiteX (9. Analyzing the LiteX Simulation Flow)

To investigate the simulation environment, I attached gdb to it. $ cd ./build/sim/gateware/ $ gdb ./obj_dir/Vsim run This lets me check the behavior, at least roughly. __ _ __ _ __ / / (_) /____ | |/_/ / /__/ / __/ -_)> < /____/_/\__/\__/_…

Trying to Build an SoC Environment with LiteX (10. Capturing Waveforms with VexRiscV)

For verifying my own CPU in LiteX, I have not yet reached the point where the simulation starts correctly. Instead, I got as far as capturing VexRiscV waveforms in the LiteX environment. The command line is as follows. ./sim.py --trace --t…

Trying to Build an SoC Environment with LiteX (8. Switching the Build Environment to Clang)

Continuing with LiteX. Compiling the SoC environment takes a long time no matter what, so I want to replace the gcc-based compile environment with a Clang-based one. After a lot of investigation, this is where I ended up. make is split int…

Trying to Build an SoC Environment with LiteX (7. Investigating Command-Line Options for Booting Linux)

I am reading the linux-on-litex-vexriscv code to investigate how to boot Linux. linux-on-litex-vexriscv/sim.py class SoCLinux(SoCCore): def __init__(self, init_memories = False, sdram_module = "MT48LC16M16", sdram_data_width = 32, sdram_ve…

Trying to Build an SoC Environment with LiteX (6. Capturing Waveforms During the VexRiscv Linux Boot)

I have been trying various things to get a grip on the details of the simulation environment in LiteX, and I really want to get an FST file. Reading the source code, it looks like an FST can be obtained just by adding an option. ./sim.py -…

Trying to Build an SoC Environment with LiteX (5. Trying to Add a Configuration for My Own CPU)

I'm still bringing up a simulation evaluation environment in LiteX, but the simulation doesn't seem to work properly past the point where the Verilator compilation finishes. After trying various things, it stops after the following output.…

Trying to Build an SoC Environment with LiteX (5. Trying to Add a Configuration for My Own CPU)

LiteX is a tool that lets you build your own SoC environment. I want to integrate my own CPU into an SoC, so this time I'll try it. github.com In my previous attempts I managed to launch Verilator, but a few parts of the environment were n…

Trying to Build an SoC Environment with LiteX (4. Trying to Add a Configuration for My Own CPU)

LiteX is a tool that lets you build your own SoC environment. I want to integrate my own CPU into an SoC, so I'll try that this time. github.com Basically, it seems you modify litex/soc/cores/cpu/mycpu/core.py. Create the file list. Extrac…

Trying to Build an SoC Environment with LiteX (3. Trying to Add a Configuration for My Own CPU)

LiteX is a tool that lets you build your own SoC environment. I want to integrate my own CPU into an SoC, so I'll try that this time. github.com When adding your own configuration, it seems you have to pass --dev when running litex_setup.p…

Trying to Build an SoC Environment with LiteX (2. Trying Rocket and Checking the Configuration)

LiteX is a tool that lets you build your own SoC environment. I want to integrate my own CPU into an SoC, so I'll try that this time. github.com It seems you can also configure a Rocket-based SoC. Let's check that below. You need to instal…

Trying to Build an SoC Environment with LiteX

LiteX is a tool that lets you assemble your own SoC environment. I want to integrate my own CPU into an SoC, so this time I will try it out. github.com $ wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py $ ./…