diff options
author | djepson1 <daniel.jepson@ni.com> | 2017-10-09 10:41:08 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:04:02 -0800 |
commit | 6bb1e1250399e96d1f612320adc059aa61d22dd8 (patch) | |
tree | 6244e62d68247f4d65a7efa47bc77ba1e671aa77 /mpm/python | |
parent | ee3f82e4544c06cb25f90ecd3871d1a2ac4638c7 (diff) | |
download | uhd-6bb1e1250399e96d1f612320adc059aa61d22dd8.tar.gz uhd-6bb1e1250399e96d1f612320adc059aa61d22dd8.tar.bz2 uhd-6bb1e1250399e96d1f612320adc059aa61d22dd8.zip |
mg: Clean up radio_regs creation
Signed-off-by: djepson1 <daniel.jepson@ni.com>
Diffstat (limited to 'mpm/python')
-rw-r--r-- | mpm/python/usrp_mpm/dboard_manager/magnesium.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/magnesium.py b/mpm/python/usrp_mpm/dboard_manager/magnesium.py index df573219d..f5d17a3f4 100644 --- a/mpm/python/usrp_mpm/dboard_manager/magnesium.py +++ b/mpm/python/usrp_mpm/dboard_manager/magnesium.py @@ -132,10 +132,6 @@ class Magnesium(DboardManagerBase): self.mykonos = self._device.get_radio_ctrl() self.log.debug("Loaded C++ drivers.") - self.log.debug("Getting Mg A uio...") - self.radio_regs = UIO(label="dboard-regs-0", read_only=False) - self.log.info("Radio-register UIO object successfully generated!") - for mykfuncname in [x for x in dir(self.mykonos) if not x.startswith("_") and callable(getattr(self.mykonos, x))]: self.log.trace("adding {}".format(mykfuncname)) setattr(self, mykfuncname, self._get_mykonos_function(mykfuncname)) @@ -145,6 +141,13 @@ class Magnesium(DboardManagerBase): Execute necessary init dance to bring up dboard """ + def _init_dboard_regs(): + " Create a UIO object to talk to dboard regs " + self.log.trace("Getting uio...") + return UIO( + label="dboard-regs-{}".format(self.slot_idx), + read_only=False + ) def _init_spi_devices(): " Returns abstraction layers to all the SPI devices " self.log.trace("Loading SPI interfaces...") @@ -176,7 +179,8 @@ class Magnesium(DboardManagerBase): ",".join(['{}={}'.format(x, args[x]) for x in args]) )) - + self.radio_regs = _init_dboard_regs() + self.log.info("Radio-register UIO object successfully generated!") self._spi_ifaces = _init_spi_devices() self.log.info("Loaded SPI interfaces!") self.dboard_clk_control = _init_clock_control(self.radio_regs) |