aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/periph_manager
Commit message (Collapse)AuthorAgeFilesLines
* mpm: x4xx: Remove GPIO classic mode registerLane Kolbly2022-03-231-12/+2
|
* mpm: e3xx: Fix Pylint warnings in periph_mgr classesMartin Braun2022-03-172-14/+11
| | | | | | - Whitespace - Long lines - Superfluous imports
* images: Update manifest and compat number for X410Aaron Rossetto2022-03-101-1/+1
|
* e320: mpm: Remove monitor threadMartin Braun2022-02-241-34/+0
| | | | | This thread is a vestige from copy & pasting N310 code, it does absolutely nothing but occupy resources.
* Remove FSRU-related filesMartin Braun2022-02-221-3/+0
| | | | | | | The FSRU (aka EISCAT) was never supported in UHD 4.0. The FPGA repository never had the relevant files, and the block controller also never existed. This removes all the corresponding files from MPM, as well as some references from makefiles.
* mpm: eeprom: Improve E320 and N3x0 EEPROM code/commentsMartin Braun2022-02-162-1/+11
| | | | | | - Fix some Pylint warnings in eeprom.py - Improve comments in n3xx.py and e320.py regarding rev_compat values in EEPROM
* mpm: x4xx: Add function to map from gpio src list indicesLane Kolbly2022-02-111-2/+29
| | | | | | | | set_gpio_src takes a list of twelve sources to apply to the pins. For the DIO mapping, this is fine, because the twelve pins are zero through eleven. However, for the HDMI mapping, the pin indices range from one to nineteen. This commit adds a function to convert from the set_gpio_src list indices into the pin number.
* images: Revert x4xx manifest and FPGA compat updateAaron Rossetto2022-02-081-1/+1
|
* mpm: x4xx: Update FPGA minor compat numberAaron Rossetto2022-02-071-1/+1
|
* mpm: x4xx: Align get/set_gpio_src mappings with HDMI pinoutsLane Kolbly2022-01-241-4/+6
|
* MPM: X410: Set correct tuning wordLars Amsel2022-01-101-1/+7
| | | | | | The comment behind the tuning word is correct but 0x200 does not give a voltage of 1.65V but 2.5V, because the full range of the DAC is 5V not 3.3V).
* mpm: x410: Fix docstrings related to GPS sensorsMartin Braun2022-01-102-2/+2
| | | | No code changes, only comment changes.
* mpm: x4xx: Add log message for older DIO boardsMartin Braun2021-12-091-1/+2
| | | | | | Older DIO boards don't support all the features of newer ones, but from the log messages, it's not clear what revision the board has. We add a log statement to clarify.
* mpm: x4xx: Move DioControl into its own moduleMartin Braun2021-12-094-882/+914
| | | | | | | | | No functional changes whatsoever, only: - Move DioControl to its own module (x4xx_dio_control.py) - Where PyLint was complaining about whitespace issues, fix those - Fix import list in x4xx_periphs.py after removing DioControl - Fix import list in x4xx.py to import DioControl from the correct location
* mpm: x4xx: Add checks before accessing self.dio_controlMartin Braun2021-12-061-5/+12
| | | | | | | | | | | | | | | | | | | The X4x0 MPM code doesn't always load the object for the DIO control, it only does that when certain checks pass (EEPROM readouts need to match expected values). Therefore, `self.dio_control` may be NoneObject during operations, and in other areas of the code, we already check if that's the case. The APIs added in c36fc5f don't have these checks, which means accessing these new APIs may result in odd exceptions when trying to dereference a NoneType object. By adding checks for the initialization state of `self.dio_control`, we can avoid these and either substitute better error messages / exception messages, or return safe values. Note that mpmd_mb_controller also accesses this object indirectly by checking the length of the return value of get_gpio_banks(). This check is not affected by this change, as we now are guaranteed to return an empty list if there is no self.dio_control.
* mpm: x4xx: Remove superfluous importMartin Braun2021-12-061-1/+0
|
* mpm: x4xx: update mboard_max_revVirendra Kakade2021-12-021-1/+1
| | | | Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
* uhd: add support for max10 variantsVirendra Kakade2021-12-021-3/+56
| | | | Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
* mpm: x4xx: Allow retrieving external power stateLane Kolbly2021-11-052-5/+51
| | | | | | | | | | | The external power can, broadly speaking, be in one of three possible states: - OFF (the default) - ON (the user has enabled external power, and it's working normally) - FAULT (the external power has encountered a fault condition) This commit allows the client of MPM to distinguish between these three conditions.
* mpm: x4xx: Allow GPIO0 and GPIO1 as port namesLane Kolbly2021-11-041-3/+5
|
* fixup! mpm: x4xx: add DIO GPIO API configuration methodsLane Kolbly2021-11-031-0/+22
|
* mpm: x4xx: add DIO GPIO API configuration methodsDhiren Wijesinghe2021-11-032-35/+218
| | | | | | These methods allow for reconfiguration of GPIO masters for x4xx. The method names are get_gpio_banks, get_gpio_srcs, get_gpio_src, and set_gpio_src.
* mpm: rfdc: Tear down RFDC on teardownLane Kolbly2021-10-112-3/+5
| | | | | | | | | | | | | | | So, the Python garbage collector is a bit pernicious, in that it happens behind the scenes in a way which is difficult to predict. The rfdc_ctrl class expects that its "lifetime" will be a single live/die cycle of the FPGA (i.e. that when a new FPGA is loaded, it will be destructed). However, by default the Python GC will keep the X4xxRfdcCtrl class alive for an arbitrary amount of time, meaning that it's possible that multiple (C++) rfdc_ctrl classes can be alive at a single time. When the GC reaps all of these classes, libmetal segfaults when we call metal_finish several times in a row. This change works around that issue, if not the overall GC issue, by explicitly deleting the rfdc_ctrl object.
* mpmd: Add discoverable feature for trig i/o modeGrant Meyerhoff2021-09-021-1/+1
|
* mpm: x4xx: update mboard_max_revAndrew Lynch2021-08-251-1/+1
|
* MPM: add X410 support for 250e6 master clock rateMichael Dickens2021-08-241-0/+1
|
* n3xx: Add support for rev 10michael-west2021-08-161-1/+1
| | | | | | No hardware interface change, so just bumping max revision. Signed-off-by: michael-west <michael.west@ettus.com>
* mpm: Expose motherboard regs for debuggingSam O'Brien2021-08-131-0/+9
| | | | | | | | | There currently isn't a way to access the motherboard register using MPM (the ones defined in x4xx_global_regs). This commit adds a simple interface to peek and poke them which is very similar to the current interface for the daughter board registers. Signed-off-by: Sam O'Brien <sam.obrien@ni.com>
* mpm: update x410 fpga minor compat numberHumberto Jimenez2021-06-241-1/+1
|
* mpm: Move cal freeze defaults to x4xxLane Kolbly2021-06-232-3/+27
| | | | | | | | This fixes an issue where the slot 0 ADC blocks would erroneously report that they were unfrozen. Additionally, adds logic to restore a saved cal freeze state on sync source change.
* mpm: restore rfdc nco frequency after setting sync sourceGrant Meyerhoff2021-06-222-0/+31
| | | | After setting sync sources, the RFDCs get reset, we need to restore the previously set frequencies so that the device continues to transmit/receive at the requested frequency
* uhd: Add support for the USRP X410Lars Amsel2021-06-1014-11/+6244
| | | | | | | | | | | | | | | | Co-authored-by: Lars Amsel <lars.amsel@ni.com> Co-authored-by: Michael Auchter <michael.auchter@ni.com> Co-authored-by: Martin Braun <martin.braun@ettus.com> Co-authored-by: Paul Butler <paul.butler@ni.com> Co-authored-by: Cristina Fuentes <cristina.fuentes-curiel@ni.com> Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com> Co-authored-by: Virendra Kakade <virendra.kakade@ni.com> Co-authored-by: Lane Kolbly <lane.kolbly@ni.com> Co-authored-by: Max Köhler <max.koehler@ni.com> Co-authored-by: Andrew Lynch <andrew.lynch@ni.com> Co-authored-by: Grant Meyerhoff <grant.meyerhoff@ni.com> Co-authored-by: Ciro Nishiguchi <ciro.nishiguchi@ni.com> Co-authored-by: Thomas Vogel <thomas.vogel@ni.com>
* mpm: Remove helper classes from RPC APILars Amsel2021-06-031-9/+9
| | | | | | | | All public callables are exported as part of the RPC API. Because classes are callable in Python they are now protected to prevent export. Having theses inner helper classes marked as protected also matches better their purpose as the are not meant to be used outside the class.
* mpm: Add symbol name based EEPROM read, cleanup EEPROM handlingLars Amsel2021-05-312-71/+217
| | | | | | | | | | | | Handling of EEPROM read was cleanup in PeriphManagerBase such that EEPROM reading for mother and daugther board have similar names and signatures. Base class supports symbol names for the nvmem files which make it easy to find them by name such as db0_eeprom instead of addresses like ff020000.i2c:cros-ec@3c:db0-i2c-tunnel. Base class furthermore reads out all available auxiliary board EEPROM files and stores them in a dictionary member.
* MPM for N32x: Add 'XQ' image as valid when using sfp0 as time_sourceMichael Dickens2021-05-181-1/+1
|
* mpm: PeriphManagerBase: Add _add_public_methods()Martin Braun2021-04-291-0/+41
| | | | This allows conditionally adding public API methods.
* mpm: periph_mgr: Demote "no SPI nodes" warningMartin Braun2021-04-211-1/+1
| | | | | | | | | When there are SPI nodes declared for a daughterboard, MPM will emit a warning: "No SPI nodes for dboard". The warning is misleading, because this only occurs when no SPI nodes where *declared*, not when they were declared but not found. This is entirely normal for USRPs where the daughterboards do not have SPI nodes, and thus, not even worth a debug statement.
* mpm: periph manager: Fix get_mb_eeprom() return value formattingMartin Braun2021-03-251-1/+4
| | | | | | | | | | The get_mb_eeprom() RPC call is supposed to return a string -> string map and thus converts all EEPROM entries to strings. However, for raw strings, the existing conversion (using str()) was not correct (we need to decode raw strings first). This would lead to things like the serial being returned as b'ABCD123' instead of just ABCD123.
* mpm: Add DboardIface for MB DB driver controlToni Jones2021-03-041-0/+8
| | | | | | | | Add DboardIface class which will act as an interface to bridge the gap between MB and DB drivers in MPM. The DboardIface will be implemented by each Motherboard with MB specific information. Dboard objects will then instantiate the class in order to utilize the implemented control functions.
* mpm: deduplicate dboard eeprom handlingMichael Auchter2021-02-112-39/+29
| | | | | | | | | | | | The _get_dboard_eeprom_info implementations are the same with the exception of how the dboard eeprom is actually read. Break that out into a _read_dboard_eeprom method to reduce code duplication. The base class now defines a lambda expression for the eeprom reader which can be changed in subclasses. Co-authored-by: Lars Amsel <lars.amsel@ni.com> Co-authored-by: Michael Auchter <michael.auchter@ni.com>
* mpm: filesystem_status: tolerate absence of menderMichael Auchter2021-02-091-1/+3
| | | | | | If the mender utility is not installed or exits with a failure, return NULL for the artifact rather than raising an exception (and disrupting device initialization).
* mpm: Implement get_sync_source and get_sync_sources.Lane Kolbly2021-01-252-0/+21
|
* sim: Ignore mender artifact file on sim devicesAaron Rossetto2021-01-212-2/+13
|
* sim: Move Hardware Specific to Config FileSamuel O'Brien2020-10-281-22/+25
| | | | | | | | This commit moves various magic numbers and hardware specific settings into the configuration file. It also provides default presets for said configuration files which can be inherited from. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* sim: Support Configuration FilesSamuel O'Brien2020-10-281-1/+10
| | | | | | | | This commit adds support for configuration files to the simulator. As of now, these files only change the source and sink of data samples, but they are easily extensible to add more configuration to the simulator. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* sim: Support StreamingSamuel O'Brien2020-10-281-2/+1
| | | | | | This commit add support for both Tx and Rx streams to the simulator. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* sim: Clarify Naming of StreamsSamuel O'Brien2020-10-081-2/+2
| | | | | | | | | ChdrSniffer is renamed to ChdrEndpoint to clarify its function as the actual destination of chdr packets, rather than just an observer. TxWorker has been renamed to OutputStream and RxWorker has been renamed to InputStream to avoid ambiguities regarding Tx and Rx terminology. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* sim: Simulator CHDR Parsing and RFNoC GraphSamuel O'Brien2020-10-081-5/+8
| | | | | | | | | This commit adds a simulated RFNoC Graph to the simulator. It is also able to process management and control packets which can traverse the graph and read from simulated registers. Stub callbacks for creating streams have been provided but are not implemented yet. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* sim: Add Daughterboard MethodsSamuel O'Brien2020-10-071-7/+10
| | | | | | | | This commit adds daughterboard simulation to the simulator. There is a sim_dboard class which registers it's methods with the rpc server. These methods are visible over mpm as well as the mpm_shell. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* sim: Lay Groundwork for SimulatorSamuel O'Brien2020-10-072-0/+303
| | | | | | | | | | | | | | | At this point, only about half of the mpm methods work on the simulator over the mpm shell, and it hasn't been tested with uhd at all. If you want to give it a try, first install all of the python dependencies of mpm (The simulator doesn't require libusrp or any of the C++ deps). In addition, running mpm on a desktop machine requires the python lib netifaces. Next, make an /mpm/build directory and open it. Run `cmake .. -DMPM_DEVICE=sim`, then `make`. Finally, run `python3 python/usrp_hwd.py`. You should be able to open another terminal and run `mpm/tools/mpm_shell.py localhost` to connect to the mpm server. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>