aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHumberto Jimenez <humberto.jimenez@ni.com>2018-11-21 13:17:41 -0600
committermichael-west <michael.west@ettus.com>2018-12-17 13:38:02 -0800
commit9fc4b029c8ba0c18c34b4c719bd47c268aceb5a3 (patch)
tree82079156c1ccc6158fba229b345516d6d2907fef
parentmulti_usrp: Fixed get_tx_stream reference (diff)
downloaduhd-9fc4b029c8ba0c18c34b4c719bd47c268aceb5a3.tar.xz
uhd-9fc4b029c8ba0c18c34b4c719bd47c268aceb5a3.zip
n3xx: Change init() procedure to reduce configuration time
Previously, the init() procedure of the n3xx class passed either the user-provided or the default clock_source and time_source values to initialize the clocking configuration. When the user did not provide these parameters, the default values were assigned, overriding whatever configuration the device was previously initialized with. Therefore, a dboard reinit was forced when the currently configured state of the N3xx device did not match the default configuration (i.e. internal sources). Now, the init() procedure still provides the clock_source and time_source values; but, if the user does not provide the parameters, the previously used values are assigned (i.e. self._clock_source and/or self._time_source). By the time MPM runs this n3xx init() procedure for the first time, both self._clock_source and self._time_source have been initialized with the default internal values anyways in the _init_ref_clock_and_time() procedure. This change prevents additional, unnecessary calls to the set_sync_source() procedure, which ultimately causes a daughterboard reinitialization when either a new clock or time source is requested.
-rw-r--r--mpm/python/usrp_mpm/periph_manager/n3xx.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/n3xx.py b/mpm/python/usrp_mpm/periph_manager/n3xx.py
index 8e0ce4463..34b07f0c4 100644
--- a/mpm/python/usrp_mpm/periph_manager/n3xx.py
+++ b/mpm/python/usrp_mpm/periph_manager/n3xx.py
@@ -387,8 +387,12 @@ class n3xx(ZynqComponents, PeriphManagerBase):
self.enable_pps_out(False)
# if there's no clock_source or time_source params, we added here since
# dboards init procedures need them.
- args['clock_source'] = args.get('clock_source', N3XX_DEFAULT_CLOCK_SOURCE)
- args['time_source'] = args.get('time_source', N3XX_DEFAULT_TIME_SOURCE)
+ # At this point, both the self._clock_source and self._time_source global
+ # properties should have been set to either the default values (first time
+ # init() is run); or to the previous configured values (updated after a
+ # successful clocking configuration).
+ args['clock_source'] = args.get('clock_source', self._clock_source)
+ args['time_source'] = args.get('time_source', self._time_source)
self.set_sync_source(args)
# Uh oh, some hard coded product-related info: The N300 has no LO
# source connectors on the front panel, so we assume that if this was