aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mpm: Fix floating-point errors in MCR configurationMartin Braun2017-12-223-83/+114
| | | | | | Use fuzzy comparisons for setting the MCR. Reviewed-By: Trung Tran <trung.tran@ettus.com>
* n3xx: enable DRP access to DB MGTS & QPLLsdjepson12017-12-222-36/+249
| | | | | | | | - 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: bfrfs: Assert reference buffer is a byte stringMartin Braun2017-12-221-0/+1
| | | | Reviewed-By: Brent Stapleton <brent.stapleton@ettus.com>
* types: Change eeprom_map_to to uint8_t vectorsMartin Braun2017-12-222-3/+6
| | | | | | | mpmd_impl was already using this type, fixed conversion from std::string to std::vector<uint8_t> there too. Reviewed-By: Brent Stapleton <brent.stapleton@ettus.com>
* mg: Add LO specific properties and methodsTrung N Tran2017-12-224-57/+515
| | | | | | | | This change adds extra hooks to the property tree to make LOs accessible thru the property tree. These can be used by multi_usrp api. Reviewed-By: Martin Braun <martin.braun@ettus.com>
* mpm: Enable TX external LO set through args, simplify codeTrung N Tran2017-12-227-71/+93
| | | | | | | Simplify the process of setting external LO without calling through many API layers. Reviewed-By: Martin Braun <martin.braun@ettus.com>
* n3xx: fix TX power lossTrung N Tran2017-12-221-0/+1
| | | | Need to set RF frequency after set_tx_frequency done.
* tdc: fix bug in pps capture reportingDaniel Jepson2017-12-222-8/+19
| | | | Reviewed-By: Martin Braun <martin.braun@ettus.com>
* mpm: add all time_source options and complete MB clk controlDaniel Jepson2017-12-221-10/+96
| | | | | | | | - complete time_source options to match updates to fpga registers - add methods for each of the bitfields in the clock control register - add init sequences for the meas_clk MMCM and PPS output Reviewed-By: Martin Braun <martin.braun@ettus.com>
* mpm: added uio for motherboard regssugandhagupta2017-12-221-7/+47
| | | | Reviewed-By: Martin Braun <martin.braun@ettus.com>
* mpm: Factor out xport managers as own objectsMartin Braun2017-12-229-233/+328
| | | | | | - Move XportMgr classes out of n310.py - Subclass them there and apply N310-specific settings - Remove chdr_interfaces option from PeriphManagerBase
* mg: Update gain immediately after setting frequencyTrung N Tran2017-12-222-5/+37
| | | | | | | We want to have set frequency and set gain atomic. i.e if user set gain and tune to different frequency, they expect the gain won't change. Reviewed-By: Martin Braun <martin.braun@ettus.com>
* mg: Lock access to settersMartin Braun2017-12-222-0/+16
| | | | | | | | | | | | Magnesium APIs are not thread-safe and can take a while to execute in some cases. Adding a mutex to setters avoids invalid states of the hardware from API calls. Note that the lock applies to one block at a time. With the two-radios-per-dboard approach, two locks need to be applied and race conditions are still possible. Reviewed-By: Trung Tran <trung.tran@ettus.com>
* mpm: utils: Add string conversion utilitiesMartin Braun2017-12-221-0/+42
| | | | | | | Adds conversions for: - Any-to-binary - Any-to-UTF8 - Any-to-native
* mpm: close unused pyroute objectsTrung N Tran2017-12-221-33/+39
| | | | | | Current code have couple places that open pyroute2 without closing it. That seems to cause the file descriptor leakage. This change effectively fix the issue #1964
* mpm: Return correct value for usrp_hwd.py --init-onlyMartin Braun2017-12-221-1/+1
| | | | Before, it would always return success even if that failed.
* mg: Fix gain setting on channels 1 and 3Trung Tran2017-12-224-36/+46
| | | | | | | Updated channel param: -modify radio_ctrl_cpld the param for channel has to be more concrete type of chan_sel_t -fix _update_rx_freq_switches and _update_tx_freq_switches to get correct frequency by NOT using radio base class
* mpm: Fix python2 vs python3 zlib.crc32 output differenceSteven Bingler2017-12-221-1/+1
| | | | | | | Zlib's crc32 outputs signed values in python2 and unsigned values in python3. As per this page (https://docs.python.org/2/library/zlib.html) 0xffffffff can be AND'd to the result to get the same value between Python versions
* mg: fix rx gain on channel 1Trung N Tran2017-12-221-1/+2
|
* mpm: n310: Compile .dts files to .dtbo on updateMartin Braun2017-12-221-7/+31
| | | | Reviewed-By: Brent Stapleton <brent.stapleton@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()
* mg: Fix TX power issuesTrung N Tran2017-12-222-3/+5
| | | | | - Fixed incorrect register address for channel 1 lowband mixer select - Fixed enabling of bypass path
* mpmd: More gracefully quite the reclaim loop on failureMartin Braun2017-12-221-1/+6
|
* mpm: Add temporary failure for FPGA reloadMartin Braun2017-12-221-0/+9
| | | | | Note: This is subject to removal, but makes the FPGA reloading code available to all until we fix the reload bug.
* mpm: Reset periph manager on updateBrent Stapleton2017-12-224-15/+105
| | | | | | | | | | Upon updating certain components (the FPGA, for example), the Peripheral Manager is restarted, and the overlay is reapplied. In order to facilitate this, the RPC server intercepts and handles the update_component function. Tested on the RJ45 ethernet connection. It probably won't work as well if the SFP connection goes down when the overlay is removed.
* mpm: adding destructor for UIOBrent Stapleton2017-12-221-0/+11
| | | | UIO object now has an explicit destructor to properly tear down.
* mpm: PeriphManager decides and applies overlayBrent Stapleton2017-12-225-57/+14
| | | | | | | 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).
* fpga load: Components file paths in component dictBrent Stapleton2017-12-221-9/+12
| | | | | | Paths to the component files is now stored in the updateable_components dictionary. This makes them accessible in the base class, and generally cleans up the member variables.
* fpga load: Atomic updating of multiple componentsBrent Stapleton2017-12-225-97/+155
| | | | | | | - The MPM function update_component now accepts multiple components to be updated in one RPC call. - Updated the property tree and image loader to match this change. - Also added DTS loading to the image loader.
* mg: fix TX dsa bugTrung N Tran2017-12-221-1/+3
| | | | | DSA value was set at wrong value since it is at upper 6 bits of DSA register. Added comment.
* 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: lmk04828: Fix docstringMartin Braun2017-12-221-2/+2
| | | | Says check_plls_locked() would throw an exception. That's not true.
* legacy_compat: extend radio index and radio slotTrung N Tran2017-12-221-2/+28
| | | | We need more radio index and radio slot for N310.
* 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-222-32/+38
| | | | | | 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: n310: Remove unused imports (linter warnings)Martin Braun2017-12-221-2/+1
|
* mpm: mykonos: Increase SPI speed to 20 MHzTrung N Tran2017-12-221-1/+1
|
* 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-228-10/+135
|
* mpmd: Bump init timeout to 120 seconds (sic)Martin Braun2017-12-221-1/+1
|
* jesd: add reset routine and make portions more generic for various linksdjepson12017-12-221-33/+101
|
* n3xx: add support for 122.88 and 153.6 MHz sample clock ratesMartin Braun2017-12-225-91/+207
| | | | | | - 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-225-11/+56
| | | | | | | | | | 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.
* mg: Init dboard sensors via MPMMartin Braun2017-12-223-9/+39
| | | | | Reviewed-By: Steven Bingler <steven.bingler@ni.com> Reviewed-By: Trung Tran <trung.tran@ettus.com>
* mpm: mg: Add dboard sensors for low- and highband LO lock statusMartin Braun2017-12-223-16/+52
| | | | | | | | | - 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: ad937x: Add LO lock APIMartin Braun2017-12-222-0/+21
| | | | | Reviewed-By: Steven Bingler <steven.bingler@ni.com> Reviewed-By: Trung Tran <trung.tran@ettus.com>
* mpm: Let usrp_hwd.py --init-only show init status and durationMartin Braun2017-12-221-1/+10
| | | | Reviewed-By: Brent Stapleton <brent.stapleton@ettus.com>
* mpm: mg: Optionally parallelize init calls to dboardMartin Braun2017-12-221-3/+19
| | | | | | Default is to run in parallel. serialize_init=1 will run them serially. Reviewed-By: Brent Stapleton <brent.stapleton@ettus.com>