aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/dboard_manager/magnesium.py
Commit message (Collapse)AuthorAgeFilesLines
* mpm: replace long execution function with async callTrung N Tran2018-04-301-5/+10
| | | | | | - Replace mykonos finish_initialization with async version - Replace myknonos setup_cal with async version - Remove disable_timeout on rpc_server init()
* mg: implement digital loopback arg for the rficDaniel Jepson2018-04-101-1/+6
|
* n3xx: add White Rabbit supportDaniel Jepson2018-03-301-3/+17
| | | | Reviewed-by: Martin Braun <martin.braun@ettus.com>
* tdc: support for tdc 2.0djepson12018-03-071-25/+25
|
* mpm: Fix some Pylint warningsMartin Braun2018-03-061-6/+6
| | | | No functional changes.
* mpm: Demote some log messagesMartin Braun2018-03-061-7/+6
| | | | | | The log output at level 'INFO' was pretty cluttered. This cleans up the log messages at the higher levels. In some cases, log message typos or capitalizations were also fixed.
* mpm: Update all license headersMartin Braun2018-02-191-2/+2
| | | | | - Fix typo in company name (missing 'a') - Updated SPDX license identifier to version 3.0
* mpm: mg: Move MgCPLD, TCA6408, DboardClockControl class to own moduleMartin Braun2018-02-141-191/+2
|
* mpm: mg: add cpld revision to dboard infoTrung N Tran2018-02-121-5/+7
| | | | Reviewed-by: Martin Braun <martin.braun@ettus.com>
* mpm: mg: Remove superfluous importMartin Braun2018-01-231-1/+1
|
* mg: ease the usage of init and tracking calTrung N Tran2018-01-231-9/+94
| | | | | | | | Using string expression instead of passing in a total hex value. Now user can passed in for example: init_cals=DEFAULT or init_cals=BASIC|TX_QEC_INIT Reviewed-by: Martin Braun <martin.braun@ettus.com>
* n310: Update the dboard UIO usageBrent Stapleton2018-01-191-25/+22
| | | | | Updating the UIO usage in the debug functions in magnesium.py. Somehow this didn't get updated before.
* mpm: mg: Demote notice on LMK not being locked b/c of lacking initMartin Braun2018-01-181-1/+1
|
* mpm: Demoted some log statements from INFO to TRACE or DEBUGMartin Braun2018-01-171-2/+1
|
* mpm: mg: Pass deserializer_lane_xbar to ad937x_configTrung N Tran2018-01-121-0/+8
| | | | | | | | | Slot A and Slot B are different in how the JESD lanes are connected. We now pass in different deserializer_lane_xbar config values for each slot. Reviewed-by: Martin Braun <martin.braun@ettus.com> Reviewed-by: Daniel Jepson <daniel.jepson@ettus.com> Reviewed-by: Mark Meserve <mark.meserve@ni.com>
* mpm: tdc: add signature/revision checks and master reset routinedjepson12018-01-121-0/+1
| | | | Reviewed-by: Martin Braun <martin.braun@ettus.com>
* mpm: mg: Assert that ref clock freq was actually set before init()Martin Braun2018-01-051-5/+7
| | | | | | | There was a theoretical chance otherwise that we forgot to set the ref_clock_freq value and it set up the LMK incorrectly. Reviewed-by: Daniel Jepson <daniel.jepson@ettus.com>
* mg cpld: update compatibility checking to major/minordjepson12018-01-041-18/+19
| | | | | Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com> Reviewed-by: Martin Braun <martin.braun@ettus.com>
* jesd: add in detailed error reporting for JESD204b linksdjepson12018-01-041-20/+81
| | | | | | | | | | - add version control checks and bump to match latest core - add detailed mykonos reporting - add detailed fpga deframer reporting - misc cleanup Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com> Reviewed-by: Martin Braun <martin.braun@ettus.com>
* mpm: mg: Fix CPLD rev checkMartin Braun2017-12-221-6/+13
| | | | | | | | Now checks the oldest-compat-rev register. Current rev is read out for logging purposes. Reviewed-by: Daniel Jepson <daniel.jepson@ettus.com> Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
* mg: ignore Mykonos framer errordjepson12017-12-221-1/+1
| | | | According to ADI, this bit toggles a lot so ignoring it for now.
* mpm: mg: Repeat deframer init upon failuredjepson12017-12-221-1/+8
| | | | This is a band-aid solution.
* mpm: Fix linter warningsMartin Braun2017-12-221-31/+36
| | | | | | - Magnesium: Bad formatting in DRP setup - PeriphManagerBase: Import order - dtoverlay: Missed default value for param
* mpm: tdc: fixed typos in commentsDaniel Jepson2017-12-221-1/+1
| | | | Reviewed-By: Martin Braun <martin.braun@ettus.com>
* mpm: mg: Fix lookup of user EEPROM mapMartin Braun2017-12-221-1/+18
| | | | | | For unknown revs, this now scales back to the last known rev. Reviewed-By: Trung Tran <trung.tran@ettus.com>
* mpm: Harmonize all license headerMartin Braun2017-12-221-14/+3
| | | | Now uses SPDX headers everywhere.
* mpm: UIOs now open only when necessaryBrent Stapleton2017-12-221-28/+16
| | | | | | | Refactoring to use the C++-based UIO objects. The Liberio and Ethernet objects now open the UIO before using it, and close it once done. Reviewed-By: Martin Braun <martin.braun@ettus.com>
* mpm: Harmonize imports, tidy + sort modulesMartin Braun2017-12-221-8/+8
| | | | | | | | - Moved nijesdcore to cores/ - Moved udev, net, dtoverlay, uio to sys_utils/ - Made all imports non-relative (except in __init__.py files) - Removed some unnecessary imports - Reordered some imports for Python conventions
* n3xx: enable DRP access to DB MGTS & QPLLsdjepson12017-12-221-25/+173
| | | | | | | | - re-structured Magnesium.init_jesd() sequence to accomodate the reconfiguration - added DRP access protocols to nijesdcore.py - cleaned up a few comments and log statements in nijesdcore.py for flow Reviewed-By: Martin Braun <martin.braun@ettus.com>
* mpm: Enable TX external LO set through args, simplify codeTrung N Tran2017-12-221-11/+19
| | | | | | | Simplify the process of setting external LO without calling through many API layers. Reviewed-By: Martin Braun <martin.braun@ettus.com>
* tdc: fix bug in pps capture reportingDaniel Jepson2017-12-221-1/+1
| | | | Reviewed-By: Martin Braun <martin.braun@ettus.com>
* mpm: mg: Refactor init(), limit object scopesMartin Braun2017-12-221-39/+53
| | | | | | - ClockSynchronizer object has no more permanent lifetime - DboardClockControl object lives within `with' statement - dboard_ctrl_regs are limited to init()
* mpm: PeriphManager decides and applies overlayBrent Stapleton2017-12-221-14/+0
| | | | | | | Previously, the daughterboard requested an overlay file based on SFP preference using magic values. This commit moves the decision making to the peripheral manager, which uses our singular name (ie 'n3xx' for the N310).
* mpm: mg: Add ref lock sensorMartin Braun2017-12-221-0/+15
| | | | | Note: The sensor API for this lives in n310, but it queries the dboards for a ref lock status, which is now no longer a stub.
* mpm: mg: Add flag to see if master clock rate is being changedMartin Braun2017-12-221-10/+26
| | | | Note: On the first run, this flag will always assert.
* mpm: mg: Fix linter errors, compacted SPI factoriesMartin Braun2017-12-221-27/+16
|
* mpm: mg: Move some class attributes to local scopesMartin Braun2017-12-221-31/+35
| | | | | | The clock_synchronizer, jesdcore, and dboard_clk_control objects don't need to exist for the full lifetime of the Magnesium class. Having them around complicates management of UIO file descriptors.
* mpm: mg: Remove unused spi_factories keyTrung N Tran2017-12-221-5/+3
|
* mpm: mg: Set default master_clock_rate to 125 MHz at every initTrung Tran2017-12-221-0/+2
|
* mpm: mykonos: Add API to change master clock rateTrung N Tran2017-12-221-1/+5
|
* n3xx: add support for 122.88 and 153.6 MHz sample clock ratesMartin Braun2017-12-221-25/+45
| | | | | | - re-wrote portions of the LMK driver for flexible rates and configuration - tweaked TDC driver for compatibility and ease of debugging - updated comments and log statements throughout for uniformity
* mg: Enable variable master clock ratesMartin Braun2017-12-221-2/+6
| | | | | | | | | | The master_clock_rate argument is passed to init() during initialization; this change allows to query the correct MCR at initialization time. It does not allow changing the MCR while a session is active. The MCR also affects the LO settings; it is the reference clock for the lowband LOs.
* mpm: mg: Add dboard sensors for low- and highband LO lock statusMartin Braun2017-12-221-11/+20
| | | | | | | | | - Add LO locked APIs to Magnesium - Add LO locked sensor APIs for RX/TX and highband/lowband LOs - Poll all those sensors from magnesium_radio_ctrl_impl Reviewed-By: Steven Bingler <steven.bingler@ni.com> Reviewed-By: Trung Tran <trung.tran@ettus.com>
* mpm: mg: Make Magnesium __init__ exception-safeMartin Braun2017-12-221-5/+33
|
* mpm: enable RX external LO set through argsTrung N Tran2017-12-221-0/+11
| | | | | | | | | This change allow user to set RX LO of ad9371 to external or internal from args constructor of usrp device. new args is rx_lo_source value can be either internal or external: If there's no rx_lo_source specified or invalid value, default rx_lo is used; which is internal LO. Usage example: usrp_application --args "rx_lo_source=external"
* mg: enable init and track calibration APITrung Tran2017-12-221-2/+21
| | | | | | | | | | | | | | | | | | | Currently, AD9371 turned on most of the calibration and hard coding the turning on process during bringup time. This change enables users to pass in a mask field for init ARM calibration and tracking arm calibration at the time creating USRP device reference. This mask field can be passed through device arguments of: 1/ init_cals : for init ARM calibration masks. This is defined in AD9371 UG-992 table 65. Default to 0x4DFF 2/ tracking_cals : for tracking calibration masks. This is defined in AD9371 UG-992 table 66. Default to 0xC3 Example of pasing in init calibration and tracking calibration mask usrp_application --args "init_cals=0x4f, tracking_cals=0xC3" NOTE: UHD currently expect user to input the correct init_cals and tracking_cals. There's no mechanism to check if init mask and tracking mask are valid. For example if the init mask field not mask 0x4f, the AD9371 will failed to setup.
* mpm: mg: Add lowband LO lock and AD9371 lock sensorsMartin Braun2017-12-221-2/+54
| | | | Note: The AD9371 lock sensors are only stubbed out for now.
* mpm: mg: Refactor some periph inits into __init__Martin Braun2017-12-221-40/+18
| | | | | | | SPI interfaces and -lock, user EEPROM, radio regs, CPLD, dboard clock control and GPIO expander can be initialized in Magnesium.__init__(). This shaves a little time off of the actual init() call and allows for earlier failures.
* mpm: mg: Fix linting issues and warningsMartin Braun2017-12-221-51/+47
| | | | | | - Removed superfluous code - Fixed most PyLint warnings - Reordered methods to match call order
* mpm: Fix minor logging issues with LMK04828 codeMartin Braun2017-12-221-1/+1
| | | | Log prefixes weren't properly being set.