aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/dboard_manager
Commit message (Collapse)AuthorAgeFilesLines
* mpm: mg: Added magnesium_update_cpld.pyBrent Stapleton2017-12-222-1/+128
| | | | Reviewed-by: Martin Braun <martin.braun@ettus.com>
* 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-229-120/+22
| | | | Now uses SPDX headers everywhere.
* mpm: UIOs now open only when necessaryBrent Stapleton2017-12-222-93/+94
| | | | | | | 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-228-23/+18
| | | | | | | | - 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-223-40/+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-222-72/+121
| | | | | | - 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-222-14/+26
| | | | | | | | | - 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: Make dboard manager __init__ exception-safeMartin Braun2017-12-221-12/+17
|
* 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-222-3/+55
| | | | 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-222-4/+3
| | | | Log prefixes weren't properly being set.
* mpm: mg: Move CPLD controls to dedicated classMartin Braun2017-12-221-91/+163
|
* mpm: Replace MMCM lock and TDC PPS sleeps with poll_with_timeoutMartin Braun2017-12-221-4/+7
| | | | This increases init speed by replacing worst-case sleeps with polls.
* lmk: change holdover settings to reduce lock timedjepson12017-12-222-11/+24
| | | | | - Register 0x150 bit [1] to '0' - Change lock detect to poll operation
* mpm: mg: Minor cleanup in __init__Martin Braun2017-12-221-6/+26
| | | | | - Moved AD9371 API generation around - Fixed some PyLint warnings
* mpm: mg: Enable user EEPROM data read/writeMartin Braun2017-12-221-2/+100
|
* mpm: mg: Specify I2C parents for GPIO devicesTrung N Tran2017-12-221-3/+77
| | | | | | The Magnesium daughterboards have GPIO port expanders, but both have the same udev label. In order to specify which port expander to use, we pass in the parent udev I2c device.
* mpm: mg: Specify the required overlay for FPGA auto-loadingMartin Braun2017-12-221-0/+15
|
* mpm: Properly populate device_info dict for dboard classesMartin Braun2017-12-221-1/+18
| | | | | | | | | | | Prior to this commit, device_info was always an empty dictionary on all dboard classes. The device_info dict is now auto-populated from the EEPROM contents, if any were provided. Dboard classes can still opt to amend that dictionary in specific class implementations. Signed-off-by: Martin Braun <martin.braun@ettus.com>
* mpm: Add mboard EEPROM supportMartin Braun2017-12-221-3/+3
| | | | | | MPMD binds a property for the mboard EEPROM to the appropriate RPC calls. PeriphManager now provides default implementations for an mboard EEPROM.
* mg: Updated JESD204b init seq and documentation.djepson12017-12-221-25/+37
| | | | | | | | | | | - Based on feedback from ADI, updated SYSREF sequencing for meeting deterministic latency requirements. - Changed majority of register addresses in nijesdcore.py to constants. - Corrected write data to SYSREF_CAPTURE_CONTROL to produce the correct SYSREF toggle rate inside the FPGA. Signed-off-by: djepson1 <daniel.jepson@ni.com>
* mg: Fix debug support for CPLD accessesdjepson12017-12-221-1/+0
| | | | Signed-off-by: djepson1 <daniel.jepson@ni.com>
* mg: Clean up CPLD initialization.djepson12017-12-221-16/+32
| | | | Signed-off-by: djepson1 <daniel.jepson@ni.com>
* mg: Preliminary clock sync supportdjepson12017-12-221-1/+36
| | | | Signed-off-by: djepson1 <daniel.jepson@ni.com>
* mg: Clean up radio_regs creationdjepson12017-12-221-5/+9
| | | | Signed-off-by: djepson1 <daniel.jepson@ni.com>
* mg: Updated support for LMKdjepson12017-12-222-32/+116
| | | | | | | | - add clock shifting - add DAC support - modify __init__ calls for cleanup Signed-off-by: djepson1 <daniel.jepson@ni.com>
* mpm: Added sensor APIMartin Braun2017-12-221-0/+38
| | | | | | | | - Motherboard sensors are automatically populated into the property tree, they can be automatically enumerated and queried - Daughterboard sensors have an API for querying and enumerating sensors, but this commit does not automatically add them to the property tree
* mpm: Update TDC sync code to make it generic for N dboardsDaniel Jepson2017-12-221-0/+3
|
* mpm: Added lmk_mg to CMakeDaniel Jepson2017-12-221-0/+1
|
* mpm: Streaming-related improvements to Magnesium controlsDJ Epson2017-12-222-79/+310
|
* mg: General fixesMark Meserve2017-12-221-4/+6
| | | | | - Make DB probe-able - Add RPC client
* n310/eiscat: Removed 20 MHz as a valid ref clock frequencyMartin Braun2017-12-222-9/+13
|