diff options
author | Trung N Tran <trung.tran@ettus.com> | 2018-02-09 17:19:37 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-02-12 19:57:24 +0100 |
commit | a69e9fc98c64908e3c4bc8aeb817664429a80db4 (patch) | |
tree | d7356bb0b9c8567397b187f6abc35028901e7155 /mpm | |
parent | fc772f8e1812d124278c36ba3810eb630e962b0f (diff) | |
download | uhd-a69e9fc98c64908e3c4bc8aeb817664429a80db4.tar.gz uhd-a69e9fc98c64908e3c4bc8aeb817664429a80db4.tar.bz2 uhd-a69e9fc98c64908e3c4bc8aeb817664429a80db4.zip |
mpm: mg: add cpld revision to dboard info
Reviewed-by: Martin Braun <martin.braun@ettus.com>
Diffstat (limited to 'mpm')
-rw-r--r-- | mpm/python/usrp_mpm/dboard_manager/magnesium.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/magnesium.py b/mpm/python/usrp_mpm/dboard_manager/magnesium.py index df6bd1534..205796844 100644 --- a/mpm/python/usrp_mpm/dboard_manager/magnesium.py +++ b/mpm/python/usrp_mpm/dboard_manager/magnesium.py @@ -237,13 +237,13 @@ class MgCPLD(object): "Expected: 0x{:04X} Got: 0x{:04X}".format( self.CPLD_SIGNATURE, signature)) raise RuntimeError("CPLD Signature Check Failed! Incorrect signature readback.") - minor_rev = self.peek16(self.REG_MINOR_REVISION) - major_rev = self.peek16(self.REG_MAJOR_REVISION) - if major_rev != self.CPLD_MAJOR_REV: + self.minor_rev = self.peek16(self.REG_MINOR_REVISION) + self.major_rev = self.peek16(self.REG_MAJOR_REVISION) + if self.major_rev != self.CPLD_MAJOR_REV: self.log.error( "CPLD Major Revision check mismatch! Expected: %d Got: %d", self.CPLD_MAJOR_REV, - major_rev + self.major_rev ) raise RuntimeError("CPLD Revision Check Failed! MPM is not compatible with " \ "the loaded CPLD image.") @@ -253,7 +253,7 @@ class MgCPLD(object): "CPLD Signature: 0x{:04X} " "Revision: {}.{} " "Date code: 0x{:08X}" - .format(signature, major_rev, minor_rev, date_code)) + .format(signature, self.major_rev, self.minor_rev, date_code)) def set_scratch(self, val): " Write to the scratch register " @@ -414,6 +414,8 @@ class Magnesium(DboardManagerBase): for key in self.spi_factories } self.cpld = MgCPLD(self._spi_ifaces['cpld'], self.log) + self.device_info['cpld_rev'] = \ + str(self.cpld.major_rev) + '.' + str(self.cpld.minor_rev) def _power_on(self): " Turn on power to daughterboard " |