From 5f803ae32e48023d1c26894e16f9d8891dd7e1cf Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 6 Jun 2017 13:52:02 -0700 Subject: eiscat: Skip re-initialization of dboards --- mpm/python/usrp_mpm/dboard_manager/eiscat.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'mpm/python/usrp_mpm/dboard_manager/eiscat.py') diff --git a/mpm/python/usrp_mpm/dboard_manager/eiscat.py b/mpm/python/usrp_mpm/dboard_manager/eiscat.py index 5f117c207..0f58b6e7f 100644 --- a/mpm/python/usrp_mpm/dboard_manager/eiscat.py +++ b/mpm/python/usrp_mpm/dboard_manager/eiscat.py @@ -506,7 +506,10 @@ class EISCAT(DboardManagerBase): adc.reset() return adcs # Go, go, go! - if self.initialized and not args.get("force_init", False): + if args.get("force_init", False): + self.log.info("Forcing re-initialization of dboard.") + self.initialized = args.get("force_init", self.initialized) + if self.initialized: self.log.info( "Dboard was previously initialized; skipping init. " \ "Specify force_init=1 to force initialization." @@ -577,6 +580,12 @@ class EISCAT(DboardManagerBase): Initialize the ADCs and the JESD deframers. Assumption is that they were SYSREF'd before. """ + if self.initialized: + self.log.debug( + "Dboard already initialized; skipping initialization " \ + "of ADCs and JESD cores." + ) + return True self.adc0.setup() self.adc1.setup() self.log.info("ADC Initialization Complete!") @@ -594,6 +603,12 @@ class EISCAT(DboardManagerBase): Will throw on failure. """ + if self.initialized: + self.log.debug( + "Dboard already initialized; assuming JESD deframer status " \ + "is fine." + ) + return True for jesd_idx, jesd_core in enumerate(self.jesd_cores): if not jesd_core.check_deframer_status(): raise RuntimeError( -- cgit v1.2.3