Commit graph

410 commits

Author SHA1 Message Date
Martin Braun
2787e2dee4 mpm: mg: Adding fast-reinit mode
When a device is re-initialized without any changes (e.g.,
master_clock_rate, ref_clock_freq) then we can skip the initialization
sequence and move on. This shaves a significant amount of time from the
init sequence.

Fast re-init can be overridden by providing the `force_reinit=1` device
arg.
2018-07-17 10:49:21 -07:00
Martin Braun
4a4d1d797f mpm: mg: Move RF cal initialization after JESD init 2018-07-17 10:49:21 -07:00
Martin Braun
e364ad4281 mpm: mg: Store init args between runs 2018-07-17 10:49:21 -07:00
Martin Braun
c8c4cf1b0c mpm: Remove unused _init_args from PeriphManagerBase 2018-07-17 10:49:21 -07:00
Martin Braun
8e02dec0fb mpm: n3xx: mg: Refactor init code
All code relevant to initializing an N310/N300 daughterboard is moved to
its own module (mg_init.py).

No functional changes.
2018-07-17 10:49:21 -07:00
Martin Braun
2fce1974d9 mpm: n3xx: Remove unused imports 2018-07-17 10:49:21 -07:00
Martin Braun
6c7a4193a3 mpm: mg: Print AD9371 info as debug message during init 2018-07-17 10:49:21 -07:00
Brent Stapleton
05722dcc51 mpm: n3xx: Factor out component updating
- 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.
2018-07-11 12:42:45 -07:00
Brent Stapleton
6eaf521d2b mpm: n3xx: Factor out GPSd Iface functions
- Refactoring GPSd interface to be instead wrapped by a
GPSDIfaceExtension class. This class will faciliate "extending" an
object, allowing that object to call the GPSDIfaceExtension methods as
their own.
- New MPM devices (or whatever else) can now use the GPSDIfaceExtension
class instead of writing their own GPSDIface handling functions.
- N3XX now instantiates a GPSDIfaceExtension object, and extends
itself. This means that an n3xx object can call the `get_gps_time`
method as its own, for example.
- N3XX must get through initialization in order for the GPSd methods
to be registered.
2018-07-06 15:00:20 -07:00
Brent Stapleton
9c2e1907e9 mpm: n3xx: Overridable crossbar base port
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.
2018-07-06 14:53:40 -07:00
Brent Stapleton
4f49b4a937 mpm: adding adf400x support to chips
Adding ADF400X driver to MPM. This uses the Boost.Python bound spidev,
and is largely a translation from the C++ driver in UHD.
2018-06-27 10:22:25 -07:00
Moritz Fischer
91a5518443 mpm: tools: Introduce dt-compat and mcu-compat fields
Introduce dt-compat and mcu-compat fields into the eeprom
structure.
For the motherboard eeprom this is straightforward, since
there's still padding bytes that could be (ab)used for this.
On the dboard side more creativity is required and the
original revision field of 2 bytes is reduced to only
one byte revision and one byte dt-compat.
Since this will only affect new units being backwards
compatible with older versions of the bootloader is not
an issue.

Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
2018-06-20 17:10:05 -05:00
Martin Braun
0935bf5c2a mpm: dboard_manager: Fix docstring for get_serial() 2018-06-18 17:37:11 -07:00
Mark Meserve
f473df0a0b mpm: fix sanity check in _init_peripherals
- change scoping of product_map in n3xx
2018-06-13 14:09:13 -07:00
Martin Braun
444857598f mpm: xportmgr_udp: Catch inconsistent Ethernet device detections
This manager first detects all valid Ethernet devices. The checks for
validity happen across multiple calls in a non-atomic fashion, so it's
possible to end up with inconsistent results. To avoid such issues, we
filter results without talking to the network stack as a final pass.
2018-06-08 14:58:20 -07:00
Martin Braun
8762a4d444 mpm: net: Fix rare failures for IP addr detection
Because the detection of valid Ethernet devices happens across multiple
calls in a non-atomic fashion, we cannot assume that a device passed to
net.get_iface_info() actually has a valid IP address, so we don't make
that assumption.
2018-06-08 14:58:20 -07:00
Martin Braun
22d684c3c8 mpm: Use device_info to determine overlay list 2018-06-08 13:27:13 -07:00
Martin Braun
cd716e264e mpm: n3xx: Derive product key programmatically
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.
2018-06-08 13:27:13 -07:00
Martin Braun
30cc2e9982 mpm: Distinguish mboard_info and device_info
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.
2018-06-08 13:27:13 -07:00
Martin Braun
d1e1ac71be mpm: Remove 'test' periph_manager 2018-06-08 13:27:13 -07:00
Martin Braun
aa0cc703fe mpm: Refactor periph manager init; split EEPROM read from rest
The readout of EEPROMs is moved to their own functions. This will allow
us to read out EEPROM values before starting the initialization.
2018-06-08 13:27:13 -07:00
Brent Stapleton
cc6121e0ac mpm: Adding FPGA type to device info 2018-06-06 08:19:48 -07:00
Mark Meserve
e942181f60 mpm: allow multiple spi device objects to use the same chip select 2018-05-14 17:55:15 -07:00
Martin Braun
5df5177d49 n3x0: Pick different standard tests for BIST
Replaced 'clock_int' (which is not implemented) with 'fan'.
2018-05-14 14:46:25 -07:00
Martin Braun
9cf1a8e99a mpm: n3xx: Refactor n3xx_periphs into its own module 2018-05-08 11:37:12 -07:00
Martin Braun
2970aa27ce mpm: xportmgr_udp: Assign xports to previously used SFPs
This changes the sorting algorithm for the xport<->SFP mapping. When
multiple SFPs are used, this sorting will avoid a criss-cross mapping
(e.g., mapping ports 0 and 1 of 0/Radio_0 to different SFPs).
2018-04-30 16:57:45 -07:00
Trung Tran
d5da0f44d4 mpm: types: Add getters for dst_ep and dts_block to SID 2018-04-30 16:57:45 -07:00
Trung Trang
0f7d3b6f71 mpm: rpc server: Remove disable_commit for init()
The async calls to long C++ methods allows the claimer loop to smoothly
continue during init, so this hack is no longer necessary.
2018-04-30 14:36:29 -07:00
Trung N Tran
546aa04355 mpm: replace long execution function with async call
- Replace mykonos finish_initialization with async version
- Replace myknonos setup_cal with async version
- Remove disable_timeout on rpc_server init()
2018-04-30 14:36:29 -07:00
Trung Trang
bd14776500 mpm: rpc server: Increase claim timeout to 5 seconds
Usually, the current timeout is fine, but there are cases when a lot of
RPC traffic could drown out the reclaim calls. 5 seconds is an
experimentally derived safe value.
2018-04-30 14:36:29 -07:00
Brent Stapleton
13b45a08c9 mpm: add device-specific Boost.Python bindings
Separating Boost.Python bindings into device-specific files. N3XX code
now lives in n3xx/pyusrp_periphs. Only one src file should be added for
pyusrp_periphs.so by CMake.
2018-04-18 15:34:51 -07:00
Alex Williams
7dcd16f5a6 mpm: Use configurable components for build system
For a minimal build, default to off for components unless the MPM_DEVICE
or the user requests it specifically.
2018-04-18 15:34:51 -07:00
Moritz Fischer
fbb407f2d0 mpm: n3xx: Bump maximum supported revision to 5 (RevF)
Bump maximum supported motherboard revision to 5 (RevF),
to support upcoming motherboard revisions.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
2018-04-17 13:26:55 -07:00
Daniel Jepson
d107f0e775 jesd: add rx and tx SYSREF delay control in MPM 2018-04-10 09:58:34 -07:00
Daniel Jepson
e2f9120331 mg: implement digital loopback arg for the rfic 2018-04-10 09:58:34 -07:00
Daniel Jepson
0430819e47 fixup! n3xx: add White Rabbit support 2018-04-03 17:02:13 -07:00
Martin Braun
a5b87ab7c4 mpm: cmake: Add git hash and version info to Python module
Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
2018-04-02 15:27:05 -07:00
Trung N Tran
6e66bd7d7b mpm: increase timeout interval for claiming 2018-04-02 14:57:21 -07:00
Martin Braun
08245bb92c mpm: n3xx: Disable PPS out during initialization 2018-04-02 14:56:39 -07:00
Daniel Jepson
7ced80becc n3xx: add White Rabbit support
Reviewed-by: Martin Braun <martin.braun@ettus.com>
2018-03-30 11:32:07 -07:00
Trung N Tran
4e34d35ec4 mpm: improve logging on exception 2018-03-30 11:05:53 -07:00
Brent Stapleton
93617aa25c mpm: Adding offset to EEPROM reads
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.
2018-03-20 16:47:24 -07:00
Brent Stapleton
86dbaee5b8 mpm: adding reference counters to UIO
UIO objects now count references on open and close calls. This should
prevent problems with nested function calls that open/close the same
UIO object.

References counts are not atomic -- this is intended for nesting with
statements within the same thread context.

Reviewed-by: Martin Braun <martin.braun@ettus.com>
Reviewed-by: Trung Tran <trung.tran@ettus.com>
2018-03-14 16:45:45 -07:00
Martin Braun
86b95486ed mpm: Add INFO log statements on MPM reset and component update 2018-03-13 16:19:03 -07:00
Martin Braun
398d7bb587 mpm: n3xx: Fix failure on get_device_info() when uninitialized 2018-03-13 16:19:03 -07:00
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