LiteX

Recent Popular

Checking the LiteX 2023.12 Release

The CHANGES are as follows. Judging from them, there don't seem to be any major changes. I'll have to update my own CPU and try it out. [> Fixed -------- - liteeth/arp : Fixed response on table update. - litesata/us(p)sataphy : Fixed data_…

How to Run FPGA Synthesis with LiteX and Various Logic Synthesis Results

Notes from using LiteX's synthesis environment to estimate the operating frequency and size of various cores. With tag 2023.8, Rocket could no longer be synthesized. VexRiscv python3 -m litex_boards.targets.digilent_zedboard --cpu-type=vex…

Trying to Build an SoC Environment with LiteX (13. How to Use LiteX CPU Variants)

Until now, the LiteX support for my own CPU has targeted only the smallest configuration, but on closer inspection it turns out that LiteX lets you specify a CPU configuration and synthesize it. For example, in the case of VexRiscv, you ca…

Trying to Build an SoC Environment with LiteX (12. Checking LiteX's Memory Bandwidth in Waveforms)

Even with last time's test program, memset() and memcpy() just seemed far too slow, so I decided to check the waveforms to be sure. $ litex_sim --cpu-type=scariv --output scariv_build --trace --trace-fst --trace-end 100000000000 --integrat…

Trying to Build an SoC Environment with LiteX (11. Adding Custom Software to the SoC Environment of My Own CPU)

This time, let's put an app that I wrote myself, rather than the demo app, into the LiteX SoC environment for my own CPU. Although I call it an app, it's just a test that simply reads and writes memory. I created a test that only writes to…

Trying to Build an SoC Environment with LiteX (10. Applying the Demo App to My Own CPU)

Last time, I also applied an app to VexRiscv and got the donut program running. This time, I'd like to apply it to my own CPU. After some investigation, I found that VexRiscv and my own CPU have different memory maps, so the program has to…

Building a Docker Environment for LiteX Experiments

I've ended up with so many LiteX environments scattered around my machine that I can't tell which is which anymore, so I'm going to build a Docker environment and stuff everything into it. Let's start with writing the Dockerfile. Basically…

Trying to Build an SoC Environment with LiteX (9. How to Load and Simulate a Demo App Other Than the BIOS on VexRiscv)

I've been investigating what to do to load and run a program of my choice when running LiteX. For now, there were demo files, so I'd like to try them out. github.com First, simply build VexRiscv. To do this, run the following command. lite…

Trying to Build an SoC Environment with LiteX (8. How to Load a Program During Simulation)

I've been investigating what to do to load and run a program of my choice when running LiteX. Looking at Linux-on-Litex-Vexriscv, I get the feeling that loading it somewhere and running it from there is the way to go. litex_sim --help | gr…

Trying to Build an SoC Environment with LiteX (7. Checking FPGA Logic Synthesis)

In logic synthesis with LiteX, the design doesn't fit on the target FPGA board, so I analyzed the area. The graph below shows only the LUT area, which is where the problem lies. The LSU and the BRU take up quite a lot of area. I don't real…

Trying to Build an SoC Environment with LiteX (6. Checking FPGA Logic Synthesis)

The LiteX simulation environment is now in fairly good shape, so I'm looking into an environment for checking operation on real hardware. One option is to use the litex-bords repository, but I haven't been able to use that with my own CPU …

Trying to Build an SoC Environment with LiteX (6. Analyzing UC Read / Write)

For the first time in a while, I've connected my own CPU core to LiteX and am working on simulation. The FPGA environment is slowly coming together, so I figure that if I can confirm the BIOS runs in simulation, things will be more or less…

Trying to Build an SoC Environment with LiteX (5. Keyboard Input via PLIC Works in LiteX)

For the first time in a while, I've connected my own CPU core to LiteX and am working on simulation. The FPGA environment is slowly coming together, so I figure that if I can confirm the BIOS runs in simulation, things will be more or less…

Trying to Build an SoC Environment with LiteX (4. Debugging the PLIC)

For the first time in a while, I am connecting my own CPU core to LiteX and running simulations. The FPGA environment is coming together somehow, so I figure that if I can confirm the BIOS runs in simulation, things will be more or less fi…

Trying to Build an SoC Environment with LiteX (3. Debugging the PLIC)

For the first time in a while, I am connecting my own CPU core to LiteX and running simulations. The FPGA environment is coming together somehow, so I figure that if I can confirm the BIOS runs in simulation, things will be more or less fi…

Trying to Build an SoC Environment with LiteX (2. Debugging the PLIC)

For the first time in a while, I am connecting my own CPU core to LiteX and running simulations. The FPGA environment is coming together somehow, so I figure that if I can confirm the BIOS runs in simulation, things will be more or less fi…

Trying to Build an SoC Environment with LiteX (2. Debugging the LiteX Boot Sequence)

For the first time in a while, I am connecting my own CPU core to LiteX and running simulations. The FPGA environment is coming together somehow, so I figure that if I can confirm the BIOS runs in simulation, things will be more or less fi…

Trying to Build an SoC Environment with LiteX (Updating the Environment After a Long Time)

For the first time in a while, I am connecting my own CPU core to LiteX and running simulations. The FPGA environment is coming together somehow, so I figure that if I can confirm the BIOS runs in simulation, things will be more or less fi…

Investigating the FPGA Logic Synthesis Environment in LiteX (2. Investigating FPGA Bitstream Generation)

LiteX is an integrated environment for semi-automatically generating SoCs, and the SoC generation environment for my own CPU also uses LiteX. github.com There is not much information about the FPGA synthesis environment in LiteX, so I'd li…

Investigating the FPGA Logic Synthesis Environment in LiteX

LiteX is an integrated environment for semi-automatically generating SoCs, and the SoC generation environment for my own CPU also uses LiteX. github.com There is not much information about the FPGA synthesis environment in LiteX, so I'd li…

Trying to Build an SoC Environment with LiteX (Connecting the PLIC)

For connecting the PLIC, I'm just wiring up buses one after another. It compiles now, but the simulation still stops, so I need to look at the waveforms and analyze it... [serial2console] loaded (0x55e25615cef0) [gmii_ethernet] loaded (0x5…

Trying to Build an SoC Environment with LiteX (Analyzing the Serial Console)

On the problem of the serial console not responding: while dumping an FST, I had mistakenly put in an fst dump() call last time, which made everything extremely slow. After removing the dump(), I can now type on the keyboard while capturin…

Trying to Build an SoC Environment with LiteX (Analyzing the Serial Console)

On the problem of the serial console not responding: while dumping an FST, I had mistakenly put in an fst dump() call last time, which made everything extremely slow. After removing the dump(), I can now type on the keyboard while capturin…

Trying to Build an SoC Environment with LiteX (Analyzing the Serial Console)

The serial console isn't responding. When I try to type on the keyboard while dumping an FST, the simulation slows down a lot, and on top of that the keyboard input is still not accepted. I need to think a bit more about how to debug this.…

Trying to Build an SoC Environment with LiteX (Analyzing the Serial Console)

First, the design defines the following interface as the serial console. //------------------------------------------------------------------------------ // Module //-------------------------------------------------------------------------…

Trying to Build an SoC Environment with LiteX (Connecting Interrupts)

I'm trying out a PLIC implementation. I will instantiate a PLIC in the SoC environment of my own CPU and connect it. For the PLIC implementation, I plan to grab an open-source one from somewhere. github.com For now, I connect it as follows…

Trying to Build an SoC Environment with LiteX (How to Inject Interrupts)

Continuing with LiteX. I've managed to get the BIOS to boot on LiteX somehow, but now keyboard input isn't accepted. This is probably because I haven't properly connected the interrupts. How do the other designs in LiteX do it? First, let'…

Trying to Build an SoC Environment with LiteX (15. Rebuilding the AXI Wrapper Hierarchy and Booting the BIOS)

Continuing with LiteX. I had a problem where writes weren't reaching the SoC hierarchy, and it turned out that I hadn't connected the AXI correctly. After fixing the AXI arbitration, I finally got as far as the BIOS booting. I've reached t…

Trying to Build an SoC Environment with LiteX (14. Rebuilding the AXI Wrapper Hierarchy)

Continuing with LiteX. There was a problem where writes to the SoC hierarchy were not going through, and it turned out to be caused by the AXI not being connected correctly. The problem is that the current CPU interface does not support as…

Trying to Build an SoC Environment with LiteX (13. Analyzing the LiteX BIOS Boot Process)

Continuing with LiteX. It looks like accesses to the UART address are not going through correctly. First, checking where the .data section is located, Disassembly of section .data: 10000000 <s_flush_cpu_dcache>: 10000000: 0d60 .2byte 0xd60 10000002: 0000 .2by</s_flush_cpu_dcache>…