enjoy-digital / litex

Build your hardware, easily!
Other
2.89k stars 555 forks source link

How to generate DMA in litex #1832

Open mmx-114514 opened 10 months ago

mmx-114514 commented 10 months ago

I've managed to add a frame buffer to sipeed_tang_20k so far, I'd like to set up DMA to reduce CPU pressure, I refer to the linux-on-litex-vexriscv project to add coherent DMA to the cpu, but this doesn't seem to work. What should I do to set up DMA at software and hardware level to be able to connect memory and framebuffer for transfer.

mmx-114514 commented 10 months ago

I used the way in linux-on-litex-vexriscv to generate vexriscv-smp via make.py, I used "python3 . /make.py --board=Sipeed_tang_primer_20k --with-coherent-dma --with-rvc --build" to generate the coherent DMA, and also added framebuffer and with video terminal. currently my screen displays the terminal information correctly. But I can find through coremark that the cpu score is much lower than without hdmi, I think this is caused by not being able to call video dma. Also in the generated dts file I can't find any configuration related to video with hdmi.