Hi. I want to get started with RFSoC development and pynq (RFSoC4x2 board, pynq 3.0.1). I ran and studied the provided overlays but now i want to start using my own hardware.
I created a minimal design, 1 DAC enabled, tile 230. ca 1GSPs.
My clocks are connected and i verified the are OK. When i load the overlay i see the RFDC driver is getting loaded. But when i check the rfdc.IPStatus i see all my tiles report IsEnabled = 0.
I tested multiple clock and reset sequences, but i don’t get this to work. Should i do some startup initialization on the pynq driver ? Any ideas how to start debugging this ?
Hi Matthew, thanks for your time.
I am not getting any error message. Building the vivado design works without problems. Loading the overlay works as well. But nothing is output by the DAC, my datapath stalls (tReady remains low) and when polling the rfdc within pynq i get
Since it is my first design with pynq and rfsoc i was wondering if i need to configure some things from within the pynq driver or not ?
Yesterday evening i had a bit of a breakthrough: i need the rfdc to operate in DUC bypass mode to get the 9.8GSPs samplerate i am aiming for. I changed this to “DUC 0 to Fs/2” and now it comes to live.
So at least i know now my pynq driver is ok. But my design still doesn’t work with datapath mode 4 (see pg269 page 132). If you have any idea on how to fix this i would love to hear it. Thanks.
Can you please provide the block design, the architecture you are using? Can you also provide the code or notebook you use for controlling the DAC?
I want to check how you activated the DAC. In the xilinx notebook for the xilinx architecture, they activated the DACs via:
for i in range(0, len(base.radio.transmitter.channel)): base.radio.transmitter.channel[i].control.gain = 0.5 base.radio.transmitter.channel[i].control.enable = True
Hey Matthew, i used a stripped down version of the rfsoc base overlay for my blockdesign, i generate data in an external module outside of the IPI block design. blockdesign.pdf (242.6 KB)
If i am correct then they created a ‘radio’ hierarchy which combines the RFDC ip core with a transmitter and receiver hierarchy to generate/record data. I tried to read through the xrfdc and rfsystem packages on the rfsoc board to see what happens during the initialization but as far as i can tell nothing needs to be enabled in the rfdc block (is this assumption correct) ? At least if you configured it according to your wishes in the vivado design. The control.enable = True only impacts the transmitter block to start generating data ?
Or am i wrong and do i have to implement a startup routine in my pynq drivers ?
Can you please provide the code or notebook you use for controlling the DAC?
I am not sure but I think you still need the control.enable to initialize the transmitter and receiver hierarchy to communicate with the DACs and ADCs.
There is also a line base.init_rf_clks() in the base notebook, it says it initializes the clocks, but maybe it also launches the drivers.
import os
import sys
from pynq import DefaultHierarchy
from pynq import DefaultIP
from pynq import Overlay
import xrfclk
import xrfdc
class rfsocdriver(Overlay):
def __init__(self,bitfile=None, verbose:bool=True):
#Initialise the LMK and LMX clocks for the radio hierarchy.
xrfclk.set_ref_clks(lmk_freq=245.76, lmx_freq=491.52)
#program bitfile
if bitfile == None: bitfile = os.path.join(os.path.dirname(__file__), 'rfsoc.bit')
super().__init__(bitfile)
#select interfaces
self.rf = self.usp_rf_data_converter_0
Then in my main notebook i call this class and probe the rf.IPStatus
import rfsocdriver
ol = rfsocdriver.rfsocdriver()
ol.rf.IPStatus
But this doesn’t show any enabled tiles…
I’m not using the radio hierarchy but am trying to control the rfdc directly. So the control.enable functions doesn’t even exists…
My rfsocdriver class extends the basic Overlay class. That is where the bit and hwh file are loaded.
I seem to have solved the problem by connecting the rfdc AXI interface to the FPD instead of the LPD in my original blockdesign. I’m not sure why this solved it, but for now i’m out of the bad water …