Is there a way to write and read to a custom CSR register on the FPGA (LimeSDR XTRX v1.2) with the LimeSuiteNG software?
I am trying to write some custom module on the RX pipeline following the example (adding an fft module). I have the LimeSDR XTRX connected with an Raspberry pi.
I also tried to add a CSR register in the LimeSDR_GW code in the LimeTop.py module:
self.output_mode = CSRStorage(size=16, reset=10, description=“Chooses output mode”)
I find in the generated csr.json:
“lime_top_output_mode”: {“addr”: 4026552652, “size”: 1, “type”: “rw”},
and in a generated csr.h file I find:
static inline uint32_t lime_top_output_mode_read(void) {
return csr_read_simple((CSR_BASE + 0x514cL));
}
static inline void lime_top_output_mode_write(uint32_t v) {
csr_write_simple(v, (CSR_BASE + 0x514cL));
}
It looks like there are logic generated, on the FPGA Software/Hardware system to write to the custom CSR register. My question is how to interact with the system from the Raspberry pi host, to write to the CSR register. When I tried to use limeGUI (CSR and limeSPI) to write to the register, nothing happens. It is possible to read from some low address value registers.
Do I somehow have to map some of the low address registers to my custom registers which the post implies?
