Commit graph

365 commits

Author SHA1 Message Date
Martin Braun
7a8967e71e mpm: n300: Warn when user tries to use external LOs
The N300-variant has no front-panel LO connectors, so we need to warn
ther user when trying to use them.
2018-03-09 11:54:53 -08:00
Martin Braun
37e49f56b1 mpm: sysfs_gpio: Throw exception on unsuccessful init
In case of a lost connection to a sysfs-gpio device, this will trigger
the correct errors.
2018-03-08 10:54:19 -08:00
Daniel Jepson
caf3cb87d2 tdc: support for White Rabbit 2018-03-07 12:40:28 -08:00
djepson1
38771b0f2f lmk: clean up logging statements 2018-03-07 12:40:28 -08:00
djepson1
7d0aec1890 tdc: support for tdc 2.0 2018-03-07 12:40:28 -08:00
Martin Braun
f9a8098cae mpm: Fix some Pylint warnings
No functional changes.
2018-03-06 15:45:15 -08:00
Martin Braun
ed2d1ac3e4 mpm: Demote some log messages
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.
2018-03-06 15:28:33 -08:00
sugandhagupta
38a7bcbff4 n3xx_bist: Ignore errors from uhd_usrp_probe on running ddr3 test
we only care about getting a valid throughput regex match, and can
ignore errors from uhd_usrp_probe, e.g. no daughterboards, etc.
2018-03-06 12:04:08 -08:00
Martin Braun
725debb964 mpm: Rename n310 to n3xx
This module (and class) are, in fact, used for all N3xx-derivates so
renaming it is the more correct thing to do.
2018-03-05 15:56:41 -08:00
Martin Braun
9d55c58858 mpm: n300/n310: Select correct overlay based on product ID 2018-03-05 15:56:41 -08:00
Martin Braun
d150449822 n310: Make MPM report FPGA version and description, UHD read it
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.
2018-03-02 13:48:14 -08:00
Martin Braun
d04b6e3a62 mpm: uhd: RPC server reports MPM version, uhd_usrp_probe reads it 2018-03-02 13:48:14 -08:00
Martin Braun
0cb30c8412 mpm: net: Add get_hostname() 2018-03-02 13:48:14 -08:00
Martin Braun
c3cc98cc76 mpm: n3xx: Fix usage of UIO in Aurora tests 2018-03-01 18:34:28 -08:00
sugandhagupta
8ff6175960 mpm: n3xx_bist: Fix regex to match with optional space
Fix regex so it matches an optional additional space.

Signed-off-by: Sugandha Gupta <sugandha.gupta@ettus.com>
2018-03-01 18:22:51 -08:00
Martin Braun
7e5fffa3cc mpm: n310: Default-initialize some members
This allows flawless execution of code paths regardless of
initialization status.
2018-02-28 15:20:58 -08:00
Martin Braun
c73a013d01 mpm: periph_manager: Guarantee self.dboards exists
Other components assume the existence of mgr.dboards, and so it needs to
be default-initialized before doing any code that can go wrong.
2018-02-28 15:20:12 -08:00
Trung N Tran
cf7667fe71 n3xx_bist: set fp_gpio master to PS 2018-02-21 16:58:51 -08:00
Trung N Tran
6d0404c678 n3xx: add front panel gpio control registers 2018-02-21 16:58:51 -08:00
Brent Stapleton
a9ba8a9fd9 mpm: N310 updates FPGA information on init
-Adding MboardRegsControl.get_fpga_type(), which reads the SFP info
registers and determines the FPGA image type (HG, XG, AA, etc). This is
a minor FPGA compat number bump.
-Adding N310._update_fpga_type(), which updates the component
information using the get_fpga_type() function described above. This
information can then be accessed through get_component_info().
2018-02-19 16:58:52 -08:00
Brent Stapleton
94aedfd2d9 mpm: adding get_component_info
Add getter function for updateable component information. This is a
minor compat number bump.
2018-02-19 16:58:52 -08:00
Martin Braun
e9288a439c mpm: Update all license headers
- Fix typo in company name (missing 'a')
- Updated SPDX license identifier to version 3.0
2018-02-19 16:55:08 -08:00
Martin Braun
2a508aabd3 mpm: mg: Move MgCPLD, TCA6408, DboardClockControl class to own module 2018-02-14 15:46:39 -08:00
Martin Braun
d58cadb8b0 mpm: Add RAII style GIL release mechanism to Python library
Note: This commit does not actually apply the GIL release, it only
provides the class to do so.
2018-02-13 19:58:32 -08:00
Moritz Fischer
e2a6b2e077 mpm: n310: Remove some leftover cruft
The lines removed here are no longer needed, get rid of them

Suggested-by: Martin Braun <martin.braun@ettus.com>
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
2018-02-13 19:04:16 +01:00
Moritz Fischer
8f153c9497 mpm: Add entries for renamed sfps
In order to match the front panel 0 and 1 for the SFPs, as well as for
clarity and consistency reasons, udev rules will be put onto future
filesystems in order to rename the eth1 eth2 devices to sfp0 and sfp1.

This change *should* be backwards compatible, nevertheless, be careful
and bump compat number.

This also updates the uhd image loader manifest.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
2018-02-13 19:04:16 +01:00
Trung N Tran
a69e9fc98c mpm: mg: add cpld revision to dboard info
Reviewed-by: Martin Braun <martin.braun@ettus.com>
2018-02-12 19:57:24 +01:00
Brent Stapleton
167bc5942e fixup! mpm: magnesium_update_cpld.py: Add axi_bitq support 2018-02-09 21:20:45 +01:00
Trung N Tran
43969f4758 mpm: remove GPIOBank.set_all function
-set_all function doesn't fit well with the GPIO api. It is rather
a test sepecific function.
-Add gpio_set_all helper to n3xx_bist.

Reviewed-by: Martin Braun <martin.braun@ettus.com>
2018-02-09 18:02:44 +01:00
Martin Braun
832cbe095a mpm: Use prefs API for periph manager
- 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
2018-02-08 22:18:14 +01:00
Martin Braun
44533fb035 mpm: Use prefs API in logging module
This allows to set the default log level from the config file.
2018-02-08 22:18:14 +01:00
Martin Braun
e6dc09470d mpm: Add prefs modules
- prefs is a module for centralized preferences management
- Uses Python's ConfigParser module
2018-02-08 22:18:14 +01:00
Moritz Fischer
342971d268 fixup! mpm: Changed mpm_shell to support scripted use
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
2018-02-07 16:47:50 -08:00
Moritz Fischer
2e6146707b mpm: magnesium_update_cpld.py: Add axi_bitq support
Add axi_bitq support. In order for this to work we need several
conditions to be true:

- Updated openocd
- FPGA image with axi_bitq built in and hooked up to correct pins
- Updated overlays matching the FPGA image
- An svf file with correct max frequency <= 10MHz

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
2018-02-07 16:47:50 -08:00
Martin Braun
852bf3aa10 mpm: n310: Return CHDR addresses as part of device_info
Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
2018-02-07 14:04:30 -08:00
Martin Braun
88ab35529b fixup! mpm: Fixup for argument parsing in N310 2018-02-07 13:59:23 -08:00
Martin Braun
0d73d8ab81 mpm: rpc_server: Declare local connection for *all* local IPs
Before, it was possible to trick the RPC server in believing a
connection was remote when the incoming connection was from a local IP
address that was not 127.0.0.1.
2018-02-07 13:46:53 -08:00
Martin Braun
0e285428df mpm: net: Add get_local_ip_addrs() method 2018-02-07 13:44:54 -08:00
Martin Braun
c2747ed0ce mpm: n310: Removed superfluous import 2018-02-07 13:41:27 -08:00
Brent Stapleton
d9366ba7d4 mpm: Fixup for argument parsing in N310
Adding helper function to parse strings to a boolean value. We can
then use that function to parse MPM's default_args, and set enable_gps
and enable_fp_gpio. This replaces the usages of the Python builtin
bool(), which returns True for any non-empty string.
2018-02-07 17:21:43 +01:00
Martin Braun
31f9d3dce7 mpm: n310: bist: Add error_msg for temp bist if no sensores were found 2018-02-07 08:21:06 -08:00
Trung N Tran
8f5f38e4f9 mpm: convert to string explicitly in GPIOBank 2018-01-24 17:33:34 -08:00
Ashish Chaudhari
081e81274d usrp3: Changes for Vivado 2017.4
- Bumped compat number for e3xx, n230, x3xx, n3xx
- Updated images package for e3xx, n230, x3xx, n3xx
- Updated fpga-src submodule
2018-01-24 15:09:29 -08:00
Martin Braun
4c81ed0a5d fixup! mpm: Log timeouts during API calls, reset timer on claimed calls 2018-01-23 15:21:28 -08:00
Martin Braun
37d4eabf27 mpm: mg: Remove superfluous import 2018-01-23 13:08:50 -08:00
Trung N Tran
58eda20beb mg: ease the usage of init and tracking cal
Using string expression instead of passing in a total hex value.
Now user can passed in for example: init_cals=DEFAULT or
init_cals=BASIC|TX_QEC_INIT

Reviewed-by: Martin Braun <martin.braun@ettus.com>
2018-01-23 12:36:42 -08:00
Martin Braun
f83f6fb464 mpm: Log timeouts during API calls, reset timer on claimed calls
Reviewed-by: Trung Tran <trung.tran@ettus.com>
2018-01-22 15:36:13 -08:00
Martin Braun
dee1d75339 mpm: n310: Fix setting time source depending on clock source
- When clock source is set, but time source is not, still set time
  source to guarantee correct ref clock freq
- Enable unconditional setting of time source

Reviewed-by: Daniel Jepson <daniel.jepson@ettus.com>
2018-01-22 14:02:24 -08:00
Martin Braun
de51d0ec9c fixup! mpm: Harmonize imports, tidy + sort modules
- Fixes n3xx_bist, which failed on a an import
2018-01-22 14:00:20 -08:00
Brent Stapleton
2ba7dba5f4 n310: removed orphaned comments 2018-01-19 17:10:09 -08:00