diff options
author | Trung N Tran <trung.tran@ettus.com> | 2017-08-29 12:11:05 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:04:02 -0800 |
commit | aeaea4936011665e2bbad66e1fdf4628e2b940f2 (patch) | |
tree | 10018b0abc453bacc2dfc582239d6d04768bfa69 /mpm/python/n3xx_bist | |
parent | 1585af8814cd5eae7021f33bb229053dd5fcb08c (diff) | |
download | uhd-aeaea4936011665e2bbad66e1fdf4628e2b940f2.tar.gz uhd-aeaea4936011665e2bbad66e1fdf4628e2b940f2.tar.bz2 uhd-aeaea4936011665e2bbad66e1fdf4628e2b940f2.zip |
mpm: add n310 motherboard revD support
This will enable both RevC and RevD from an MPM perspective. The
revision read back from the EEPROM is used to enable the code for either
rev.
The impact on the code is limited to the port expander GPIOs. Port
expander objects are instantiated in both the N310 MPM module as well as
the n3xx_bist executable.
Diffstat (limited to 'mpm/python/n3xx_bist')
-rwxr-xr-x | mpm/python/n3xx_bist | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/mpm/python/n3xx_bist b/mpm/python/n3xx_bist index 0f3d89de2..55ce0f57f 100755 --- a/mpm/python/n3xx_bist +++ b/mpm/python/n3xx_bist @@ -226,6 +226,7 @@ def expand_options(option_list): 'spam': 'eggs'}. """ return dict(x.split('=') for x in option_list) + ############################################################################## # Bist class ############################################################################## @@ -238,6 +239,7 @@ class N310BIST(object): 'standard': ["ddr3", "gpsdo", "rtc", "temp", "clock_int", "tpm"], 'extended': "*", } + REV = 3 @staticmethod def make_arg_parser(): @@ -281,6 +283,14 @@ class N310BIST(object): def __init__(self): self.args = N310BIST.make_arg_parser().parse_args() self.args.option = expand_options(self.args.option) + try: + from usrp_mpm.periph_manager.n310 import n310 + default_rev = n310.mboard_max_rev + except ImportError: + # This means we're in dry run mode or something like that, so just + # pick something + default_rev = 3 + self.mb_rev = int(self.args.option.get('mb_rev', default_rev)) self.tests_to_run = set() for test in self.args.tests: if test in self.collections: @@ -296,7 +306,7 @@ class N310BIST(object): get_main_logger().setLevel(WARNING) self.log = get_main_logger().getChild('main') except ImportError: - pass + print("No logging capability available.") def expand_collection(self, coll): """ @@ -448,8 +458,8 @@ class N310BIST(object): "mode": 3 } from usrp_mpm.periph_manager import n310 + gpio_tca6424 = n310.TCA6424(self.mb_rev) # Turn on GPS, give some time to acclimatize - gpio_tca6424 = n310.TCA6424() gpio_tca6424.set("PWREN-GPS") time.sleep(5) gps_warmup_timeout = float( @@ -678,7 +688,7 @@ class N310BIST(object): 'read_patterns': list(patterns), } from usrp_mpm.periph_manager import n310 - gpio_tca6424 = n310.TCA6424() + gpio_tca6424 = n310.TCA6424(self.REV) gpio_tca6424.set("FPGA-GPIO-EN") # Allow some time for the front-panel GPIOs to become usable time.sleep(.5) |