aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm
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:21:14 -0800
commite53596d17f287bdf853cbb7fd5ee83c6fd4241b3 (patch)
treefb1bbc5a776f644fb14998bc90ea37abf71441ff /mpm/python/usrp_mpm
parent02bfd33e8888166149d045e42ce722c3a5cde5f0 (diff)
downloaduhd-e53596d17f287bdf853cbb7fd5ee83c6fd4241b3.tar.gz
uhd-e53596d17f287bdf853cbb7fd5ee83c6fd4241b3.tar.bz2
uhd-e53596d17f287bdf853cbb7fd5ee83c6fd4241b3.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')
-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