aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/periph_manager/n3xx.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-02-21 21:11:22 -0800
committerMartin Braun <martin.braun@ettus.com>2019-02-22 09:20:10 -0800
commitf0da25b14d71fc7a6226735c1e2a4534dd7cc33c (patch)
tree073095f223bae43b39196fede7c107a738206cc5 /mpm/python/usrp_mpm/periph_manager/n3xx.py
parent356d623c23f3c4f43a54f130b57981b59433293c (diff)
downloaduhd-f0da25b14d71fc7a6226735c1e2a4534dd7cc33c.tar.gz
uhd-f0da25b14d71fc7a6226735c1e2a4534dd7cc33c.tar.bz2
uhd-f0da25b14d71fc7a6226735c1e2a4534dd7cc33c.zip
mpm: n320: Update FPGA type if QSFP board is available
The N320 has FPGA types (XQ, AQ) which cannot be derived from the mboard regs in the same way as the non-QSFP variants. We therefore bite the bullet and hardcode those.
Diffstat (limited to 'mpm/python/usrp_mpm/periph_manager/n3xx.py')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/n3xx.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/n3xx.py b/mpm/python/usrp_mpm/periph_manager/n3xx.py
index c603c922f..5856036e3 100644
--- a/mpm/python/usrp_mpm/periph_manager/n3xx.py
+++ b/mpm/python/usrp_mpm/periph_manager/n3xx.py
@@ -351,7 +351,6 @@ class n3xx(ZynqComponents, PeriphManagerBase):
self.mboard_regs_control.get_git_hash()
self.mboard_regs_control.get_build_timestamp()
self._check_fpga_compat()
- self._update_fpga_type()
self.crossbar_base_port = self.mboard_regs_control.get_xbar_baseport()
# Init clocking
self.enable_ref_clock(enable=True)
@@ -372,6 +371,8 @@ class n3xx(ZynqComponents, PeriphManagerBase):
"No QSFP board detected: "
"Assuming it is disabled in the device tree overlay "
"(e.g., HG, XG images).")
+ # Init FPGA type
+ self._update_fpga_type()
# Init CHDR transports
self._xport_mgrs = {
'udp': N3xxXportMgrUDP(self.log.getChild('UDP'), args),
@@ -1024,6 +1025,13 @@ class n3xx(ZynqComponents, PeriphManagerBase):
def _update_fpga_type(self):
"""Update the fpga type stored in the updateable components"""
fpga_type = self.mboard_regs_control.get_fpga_type()
+ # This is ugly, but we have no elegant way of probing QSFP capabilities
+ # through the mboard regs object, so we simply hardcode the options:
+ if self.device_info['product'] == 'n320' and self._qsfp_retimer:
+ if fpga_type == "XG":
+ fpga_type = "AQ"
+ if fpga_type == "WX":
+ fpga_type = "XQ"
self.log.debug("Updating mboard FPGA type info to {}".format(fpga_type))
self.updateable_components['fpga']['type'] = fpga_type