Using a Custom FemtoRV Device Implementation with a LiteX Generated Version of FemtoRV #109
Replies: 4 comments
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Thanks for the tips so far! I have tried this: orangecrab-fpga/production-test-sw#2 (comment) and got the ADC related code into the csr.h file. Unfortunately in the process I broke the SPI SD card functionality. What is the most sensible way to debug this? |
Beta Was this translation helpful? Give feedback.
-
I have tried to get around my problem by switching to the Arty which has an ADC hardware block that LiteX supports |
Beta Was this translation helpful? Give feedback.
-
It is probably the same problem here as your other message: each time you change the SOC, you need to recompile all the software as well ( |
Beta Was this translation helpful? Give feedback.
-
I created a custom ADC peripheral for FemtoRV based off of the other peripherals in the DEVICES folder.
I then wrote some C code (which I want to use to interact with my custom peripheral) that I am running over LiteOs on a LiteX generated instance of FemtoRV Gracilis. Taking a look at the FemtoRV code that LiteX uses here: https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/cpu/femtorv/core.py it only pulls in the core and not the verilog which describes the peripherals in the DEVICES folder.
If I also want my peripheral in the DEVICES folder to be put into the LiteX generated instance of FemtoRV Gracilis. Would it be best to paste the femtosoc.v file and all of the relevant files I want it to include into the directory where I run the LiteX command to build the system on chip?
I would leave out the files for the SD card, SPI flash and other verilog files as LiteX is handling the SD card and flash.
Does this sound like a sensible approach for getting my custom design up and running?
Or should I try to copy the way LiteX implements peripherals such as DRAM and include my ADC peripheral in the same way that LiteX includes DRAM as a peripheral?
I am asking this question here because I believe that if I take the wrong approach I could burn a lot of time getting my design running and I am keen to get some advice on the most sensible approach.
Beta Was this translation helpful? Give feedback.
All reactions