Commit graph

51 commits

Author SHA1 Message Date
Brent Stapleton
0bf22a3e57 mpm: UIOs now open only when necessary
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>
2017-12-22 15:05:58 -08:00
Martin Braun
d3e6dd1140 mpm: Harmonize imports, tidy + sort modules
- 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
2017-12-22 15:05:58 -08:00
Martin Braun
58e7022062 mpm: Factor out xport managers as own objects
- Move XportMgr classes out of n310.py
- Subclass them there and apply N310-specific settings
- Remove chdr_interfaces option from PeriphManagerBase
2017-12-22 15:05:57 -08:00
Brent Stapleton
19cdfb4148 mpm: Reset periph manager on update
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.
2017-12-22 15:05:57 -08:00
Brent Stapleton
d0cb6de410 mpm: PeriphManager decides and applies overlay
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).
2017-12-22 15:05:57 -08:00
Brent Stapleton
a2029b0439 fpga load: Atomic updating of multiple components
- 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.
2017-12-22 15:05:43 -08:00
Martin Braun
afe889af2b mpm: mg: Optionally parallelize init calls to dboard
Default is to run in parallel. serialize_init=1 will run them serially.

Reviewed-By: Brent Stapleton <brent.stapleton@ettus.com>
2017-12-22 15:05:06 -08:00
Martin Braun
2ab5a0f6aa mpm: Made PeriphManagerBase.__init__ more exception-safe 2017-12-22 15:05:06 -08:00
Martin Braun
b12b9465ed mpm/mpmd: Move to request_xport()/commit_xport() architecture
This commit combines code from various branches to finally enable both
UDP and Liberio transports.
2017-12-22 15:05:06 -08:00
Martin Braun
d327a93530 mpm: Lower logging level for PeriphManagerBase.deinit() 2017-12-22 15:05:06 -08:00
Martin Braun
fb5e10a8e4 mpm: Cache connection type in PeriphManagerBase
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.
2017-12-22 15:05:05 -08:00
Martin Braun
16da5da375 mpm: Remove leading _ from _get_device_info()
Use @norpc instead. This fixes some linting issues.
2017-12-22 15:05:05 -08:00
Martin Braun
a972069f07 mpm: Make list_updateable_components return something 2017-12-22 15:05:05 -08:00
Brent Stapleton
e63a3e8b74 fpga load: add update_component function to MPM
-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')
2017-12-22 15:04:28 -08:00
Martin Braun
983bea69e5 mpm: Minor refactoring of PeriphManagerBase attributes 2017-12-22 15:04:03 -08:00
Martin Braun
016866d3f1 mpm: Provide default dboard EEPROM getter/setters
The setter will throw an exception though. It is supposed to be
overriden by device-specific classes.
2017-12-22 15:04:02 -08:00
Martin Braun
cea45dda8f mpm: Add mboard EEPROM support
MPMD binds a property for the mboard EEPROM to the appropriate RPC
calls. PeriphManager now provides default implementations for an mboard
EEPROM.
2017-12-22 15:04:02 -08:00
Martin Braun
e2f8f8e0bd mpm: Added sensor API
- 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
2017-12-22 15:04:02 -08:00
Martin Braun
688637522a mpm: Added max rev check overridable
When reading revision numbers from EEPROM, we now have an easy way of
checking of our version MPM is sufficient to run on the current device.
N310 implicitly makes use of this starting with this commit.
2017-12-22 15:04:01 -08:00
Martin Braun
8ecb09be8b mpm: Overlay handling functions use dtoverlay module 2017-12-22 15:04:00 -08:00
Martin Braun
3bd01c27a3 mpm/n310: Moved eth dispatcher setup into __init__ 2017-12-22 15:04:00 -08:00
Martin Braun
c34a36853e n310: Allow --override-db-pids to skip dbs 2017-12-22 15:03:59 -08:00
Martin Braun
b14bc217e9 mpm/mpmd: Dboard info is now stored in mboard info; refactored initialization 2017-12-22 15:03:59 -08:00
Martin Braun
eb4a0cb6eb mpmd/mpm/n310: Added clock and time source APIs 2017-12-22 15:03:59 -08:00
Martin Braun
40235b8c5a mpm/mpmd: Call init() during UHD session init, not on hwd spawn 2017-12-22 15:03:59 -08:00
Martin Braun
664f471baf mpm: Addition Py3k fixes, all related to string/UTF-8/ascii differences
- Also fixed some error handling in various cases
2017-12-22 15:03:58 -08:00
Martin Braun
1809822893 mpm/mpmd: Further improvements on multi-device operations
- Crossbar local addr is now written during initialization of UHD
  session
- Support for multiple crossbars per device (at least on UHD side)
- Crossbars are now sequentially given a unique address
2017-12-22 15:03:58 -08:00
Martin Braun
6183d9eeaa mpm: Made code Python3-compatible 2017-12-22 15:03:58 -08:00
Martin Braun
2406def0ac mpm/mpmd: Crossbar info is now polled instead of hardcoded
- Extended base periph manager to provide crossbar info
2017-12-22 15:03:58 -08:00
Martin Braun
1ce038094d mpm: Factored out eeprom code into its own module 2017-12-22 15:03:53 -08:00
Martin Braun
0c0b0595bb mpm: motherboards can now also request overlays, dboard overlay code slightly refactored 2017-12-22 15:03:53 -08:00
Martin Braun
7c9b801906 mpm: Made overlay selection a static method for more flexibility 2017-12-22 15:03:53 -08:00
Martin Braun
5926f1b9d9 mpm: dt overlay handling: Better error handling, fewer FIXMEs 2017-12-22 15:03:53 -08:00
Martin Braun
245b96a777 mpm: Added auto-loading of dboard-specific overlays 2017-12-22 15:03:53 -08:00
Martin Braun
e9a1af171e mpm: Better handling of case where no CHDR interfaces are available 2017-12-22 15:03:53 -08:00
Martin Braun
3102bf1cee mpm: periphs and n310 use eth table dispatcher now 2017-12-22 15:03:53 -08:00
Martin Braun
e2503018da mpm: SIDs are returned to pool after device is uninitialized 2017-12-22 15:03:53 -08:00
Martin Braun
c0a528394d mpm: Guaranteed stringification of mboard_info values 2017-12-22 15:03:53 -08:00
Martin Braun
9dee6175da mpm: Moved device and dboard init/deinit to their own methods
Also cleaned up some cruft.
2017-12-22 15:03:53 -08:00
Martin Braun
13cd22e867 mpm: Added command line args to usrp_hwd.py 2017-12-22 15:03:53 -08:00
Martin Braun
4efea95324 mpm: Enabled mboard EEPROM readout 2017-12-22 15:03:53 -08:00
Martin Braun
2270a6b1a6 mpm: Fixed python import in discovery module 2017-12-22 15:03:53 -08:00
Martin Braun
b5b1ef2de2 mpm: Various EISCAT fixes 2017-12-22 15:03:53 -08:00
Mark Meserve
24d3011233 mg: bring up links 2017-12-22 15:03:52 -08:00
Martin Braun
1b27c16dd3 mpm: Updating ref clock frequency will propagate to dboard, changed slot indexing to numbers 2017-12-22 15:03:52 -08:00
Martin Braun
0e7fe25f42 mpm: eiscat: Added first pass at EISCAT dboard driver 2017-12-22 15:03:52 -08:00
Martin Braun
af6d240949 mpm: Improved udev identification of SPI device nodes 2017-12-22 15:03:52 -08:00
Martin Braun
285f14392b mpm: Moved over to new logging infrastructure
Also currently hardcodes some settings.
2017-12-22 15:03:45 -08:00
Andrej Rode
7f71111988 mpm: comment out functionality to make it work
- add uio udev find routine
 - add debug prints

Signed-off-by: Andrej Rode <andrej.rode@ettus.com>
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
2017-12-22 15:03:45 -08:00
Andrej Rode
6a12add156 mpm: mpm reorganization 2017-12-22 15:03:45 -08:00