Skip to content

Commit

Permalink
MPM: Init DSP only if there is a radio frontend
Browse files Browse the repository at this point in the history
Users might build X400 bitfiles without RF blocks in it. In that
case the DSP info will report 0 for both the TX and RX.
MPM needs to handle that case correct an skip RF block initialization
an fall back to default values. This will allow bitfiles without
RF to load.
  • Loading branch information
NI-LAm authored and joergho committed Oct 23, 2024
1 parent 92ebec5 commit 99b5661
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mpm/python/usrp_mpm/periph_manager/x4xx_clock_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ def __init__(self, mboard_info, dboard_infos, args, log):
def set_dsp_info(self, dsp_info):
"""Store the DSP info of the current FPGA image."""
self._dsp_info = dsp_info
if self._dsp_info[0]["num_rx_chans"] == 0 and self._dsp_info[0]["num_tx_chans"] == 0:
return

# this part of DSP initialization is only relevant for radio frontends
self._dsp_bw = dsp_info[0]["bw"]
assert self._dsp_bw in [x[0] for x in self.master_to_sample_clk.values()]

Expand Down Expand Up @@ -406,6 +410,10 @@ def __init__(self, mboard_info, dboard_infos, args, log):
def set_dsp_info(self, dsp_info):
"""Store the DSP info of the current FPGA image."""
self._dsp_info = dsp_info
if self._dsp_info[0]["num_rx_chans"] == 0 and self._dsp_info[0]["num_tx_chans"] == 0:
return

# this part of DSP initialization is only relevant for radio frontends
self._dsp_bw = dsp_info[0]["bw"]
# We assume that SPC == the bitfile's spc_rx
self._spc = dsp_info[0]["spc_rx"]
Expand Down

0 comments on commit 99b5661

Please sign in to comment.