aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/periph_manager/base.py
Commit message (Collapse)AuthorAgeFilesLines
* mpm: fixed mboard_max_revision valueMatthew Crymble2019-09-241-12/+7
| | | | | | | | This value should be 9 to correspond with the rev J motherboards. This property was renamed to mboard_last_rev_compat in a previous commit. But mboard_max_rev is actually a more accurate description, since it specifies the latest hardware revision that the software is aware of. I renamed all references back to mboard_max_rev.
* mpm: Change SW/HW compat check to use last_rev_compatTrung Tran2019-05-101-15/+30
| | | | | | | Newer revisions of the E320 and N3xx motherboards use EEPROM version 3, and store a rev_compat field. The rev_compat is the last revision that this hardware is compatible with. We now use that instead of simply the revision.
* e310/e320: Move E310 to MPM architecture and refactorSugandha Gupta2019-05-011-0/+6
| | | | | | | | | | | | - Turns the E310 into an MPM device (like N3xx, E320) - Factor out common code between E320 and E310, maximize sharing between the two devices - Remove all pre-MPM E310 code that is no longer needed - Modify MPM to remove all existing overlays before applying new ones (this is necessary to enable idle image mode for E310) Co-authored-by: Virendra Kakade <virendra.kakade@ni.com> Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
* n3xx: init peripherals before loading FPGATrung Tran2019-02-011-20/+32
| | | | | | | | | Issue: Current code loads FPGA too early while many essential peripherals such as net clocks are not brought up. This change will make sure those are got init before FPGA loaded. Signed-off-by: Trung Tran<trung.tran@ettus.com>
* mpm: add Git hash, version to device infoBrent Stapleton2018-08-201-0/+9
| | | | | | | | Adding MPM Git hash and version to the MPM device info. This information is currently only available through logs when MPM starts (it is the first log message in usrp_hwd.py). Adding it to the device info makes it accessible to any application which checks that, such as uhd_usrp_probe.
* mpm: Remove unused _init_args from PeriphManagerBaseMartin Braun2018-07-171-4/+0
|
* mpm: n3xx: Factor out component updatingBrent Stapleton2018-07-111-1/+2
| | | | | | | | | - Refactoring component (FPGA, DTS) updating functions out of n3xx.py into their own components.py. The ZynqComponent class now defines the methods to update these two components. - Adding super().__init__() to the PeriphManagerBase class. This is needed to get the multiple inheritance used in N3XX now to work, and (apparently) good Python practice.
* mpm: n3xx: Overridable crossbar base portBrent Stapleton2018-07-061-1/+4
| | | | | | Moving the RFNoC crossbar base port to the class overridables. MPM devices may need to reserve different numbers of ports for non-blocks; this can now be done by overriding the crossbar_base_port.
* mpm: Use device_info to determine overlay listMartin Braun2018-06-081-7/+5
|
* mpm: n3xx: Derive product key programmaticallyMartin Braun2018-06-081-2/+6
| | | | | | Since there is no simple mapping from an arbitrary tuple of mboard- and dboard info dictionaries, we use generate_device_info() to figure out the product key.
* mpm: Distinguish mboard_info and device_infoMartin Braun2018-06-081-9/+22
| | | | | | In the N3xx series, the motherboard ID and the device ID can differ. For example, the N310 could share the same motherboard with a different device that uses different daughterboards.
* mpm: Refactor periph manager init; split EEPROM read from restMartin Braun2018-06-081-104/+135
| | | | | The readout of EEPROMs is moved to their own functions. This will allow us to read out EEPROM values before starting the initialization.
* mpm: Adding offset to EEPROM readsBrent Stapleton2018-03-201-0/+14
| | | | | | Adding address offset to all MBoard and DBoard EEPROM reads. This matches what we're doing for the user portion of the EEPROM, and allows us to share access to an EEPROM.
* mpm: Add INFO log statements on MPM reset and component updateMartin Braun2018-03-131-0/+1
|
* mpm: Fix some Pylint warningsMartin Braun2018-03-061-1/+0
| | | | No functional changes.
* mpm: Demote some log messagesMartin Braun2018-03-061-7/+7
| | | | | | 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: n300/n310: Select correct overlay based on product IDMartin Braun2018-03-051-12/+15
|
* n310: Make MPM report FPGA version and description, UHD read itMartin Braun2018-03-021-0/+7
| | | | | | | The FPGA and MPM version as well as the description of the device ("N300-Series Device") and its name (its the hostname) are now properly reported coming from MPM, properly saved in the prop tree, and uhd_usrp_probe can nicely display them this way.
* mpm: periph_manager: Guarantee self.dboards existsMartin Braun2018-02-281-1/+1
| | | | | Other components assume the existence of mgr.dboards, and so it needs to be default-initialized before doing any code that can go wrong.
* mpm: adding get_component_infoBrent Stapleton2018-02-191-0/+18
| | | | | Add getter function for updateable component information. This is a minor compat number bump.
* 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: Use prefs API for periph managerMartin Braun2018-02-081-3/+36
| | | | | | | | - Allow to set default args via config file - Read them from prefs API - override-db-pids uses the same APIs now ([overrides] section in config file, prefs API, and same dictionary as --default-args when used on the command line
* mpm: n310: Return CHDR addresses as part of device_infoMartin Braun2018-02-071-1/+17
| | | | Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
* fixup! mpm: Log timeouts during API calls, reset timer on claimed callsMartin Braun2018-01-231-0/+6
|
* mpm/mpmd: Report device state using get_init_status() and verifyMartin Braun2018-01-161-1/+7
| | | | | | When trying to run init(), mpmd will first query the initialization status of the MPM device. If it is found to be in a bad state, it will not go forward with initialization, but instead print the error message.
* mpm: Refactor PeriphManager classesMartin Braun2018-01-161-36/+65
| | | | | - Sort methods by functional groups - Removed some cruft
* mpm: n310: Check all periphs for initialization statusMartin Braun2018-01-121-0/+4
|
* mpm: periph_manager: Pass default args to dboard managerMartin Braun2018-01-111-2/+3
|
* mpm: Add API call for claim and unclaimMartin Braun2018-01-101-0/+18
| | | | | | These are hooks that the RPC server calls into when claiming a device, and allow the device implementation to trigger user-definable actions on claiming/unclaiming.
* mpm: n310: Move SID re-alloc log message to right spotMartin Braun2018-01-081-1/+0
|
* n310: Move SID framing all the way to n310.pyMartin Braun2017-12-221-2/+3
| | | | | | | MPM will now no longer keep a SID framer variable. Reviewed-by: Trung Tran <trung.tran@ettus.com> Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
* mpm: Fix linter warningsMartin Braun2017-12-221-1/+5
| | | | | | - Magnesium: Bad formatting in DRP setup - PeriphManagerBase: Import order - dtoverlay: Missed default value for param
* mpm: periph_manager: Clarify request/commit protocolMartin Braun2017-12-221-5/+8
|
* mpm: xports: Amend protocol for request/commit xport, add allocationMartin Braun2017-12-221-0/+11
| | | | Reviewed-by: Trung Tran <trung.tran@ettus.com>
* mpm: Harmonize all license headerMartin Braun2017-12-221-13/+2
| | | | Now uses SPDX headers everywhere.
* mpm: UIOs now open only when necessaryBrent Stapleton2017-12-221-0/+4
| | | | | | | 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-6/+6
| | | | | | | | - 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
* mpm: Factor out xport managers as own objectsMartin Braun2017-12-221-5/+0
| | | | | | - Move XportMgr classes out of n310.py - Subclass them there and apply N310-specific settings - Remove chdr_interfaces option from PeriphManagerBase
* mpm: Reset periph manager on updateBrent Stapleton2017-12-221-1/+7
| | | | | | | | | | 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: PeriphManager decides and applies overlayBrent Stapleton2017-12-221-15/+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).
* fpga load: Atomic updating of multiple componentsBrent Stapleton2017-12-221-40/+29
| | | | | | | - 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.
* 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>
* mpm: Made PeriphManagerBase.__init__ more exception-safeMartin Braun2017-12-221-4/+13
|
* mpm/mpmd: Move to request_xport()/commit_xport() architectureMartin Braun2017-12-221-20/+68
| | | | | This commit combines code from various branches to finally enable both UDP and Liberio transports.
* mpm: Lower logging level for PeriphManagerBase.deinit()Martin Braun2017-12-221-2/+2
|
* mpm: Cache connection type in PeriphManagerBaseMartin Braun2017-12-221-0/+13
| | | | | | Now, when claiming a device, the connection type will be stored as a string in PeriphManagerBase. This way we can read out the current connection type even when not currently inside an RPC call.
* mpm: Remove leading _ from _get_device_info()Martin Braun2017-12-221-1/+2
| | | | Use @norpc instead. This fixes some linting issues.
* mpm: Make list_updateable_components return somethingMartin Braun2017-12-221-2/+1
|
* fpga load: add update_component function to MPMBrent Stapleton2017-12-221-0/+68
| | | | | | | | -update_component takes a byte array containing the data to be written, and a dictionary containing the metadata of the component to be updated -The metadata must contain 'id' and 'filename' -The metadata may contain an md5 hash ('md5')
* mpm: Minor refactoring of PeriphManagerBase attributesMartin Braun2017-12-221-8/+2
|