Commit graph

400 commits

Author SHA1 Message Date
Humberto Jimenez
eb4a609ec8 rh: Deterministic latency optimization in JESD204B
- Optimized JESD204B RX/TX links' latency.
- Made JESD latency constant across supported frequencies.
- Checking RX SYSREF capture in the FPGA deframer block.

The JESD204B standard can be linked in such a way to produce a
repeatable, deterministic delay from the framer to deframer. This is
accomplished by setting up a LMFC (local multiframe clock) in both
devices.

The LMFCs are reset whenever a SYSREF edge is captured by the framer
and deframer. Therefore, it is simple to control the LMFC rising edges
in each device by implementing variable delay elements on the SYSREF
pulses to the framer and deframer.

Latency across the JESD204B TX/RX links should remain constant and
deterministic across the supported sampling_clock_rate values. By
testing the roundtrip latency (i.e. FPGA -> TX -> RX -> FPGA) with
different delay values in the FPGA, one may decrease the latency and
provide enough setup and hold margin for the data to be transfered
through each JESD link.

It was found that a different set of SYSREF delay values are required
for sampling_clock_rate = 400 MSPS to match the latency of the other
supported rates.
2018-10-30 09:57:55 -07:00
Mark Meserve
d87ae61d04 rh: add support for rhodium devices
Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com>
Co-authored-by: Alex Williams <alex.williams@ni.com>
Co-authored-by: Derek Kozel <derek.kozel@ni.com>
2018-10-25 10:30:59 -07:00
Mark Meserve
ec2977d8cb nijesdcore: add PRBS-31 testing 2018-10-25 10:30:59 -07:00
Mark Meserve
a49a03aa60 nijesdcore: add eyescan utility 2018-10-25 10:30:59 -07:00
Mark Meserve
fad36514e5 nijesdcore: add variable configuration support 2018-10-25 10:30:59 -07:00
Martin Braun
bf353515b6 mpm: e320: n3xx: Factor BIST code to common module 2018-10-24 18:53:16 -07:00
Mark Meserve
2801dc0f4e n3xx: output exception string on boot init failure 2018-10-24 15:20:27 -07:00
Martin Braun
f23c8cd140 mpm: Add lock_guard() function
This allows sharing mutexes between C++ and Python, and uses the with
statement to provide a locked-out context.
2018-10-23 10:13:00 -07:00
Trung Tran
b24f8495c5 mpm:n3xx: improve set_time_source,set_clock_source
Add coercing behavior to set_time_source and set_clock_source to
a valid sync source. Also, skip set_sync_source if device already
set to the corresponding one.
2018-10-22 10:37:09 -07:00
Trung Tran
0e30a5ca08 mg: adding skip_rfic argument
This change to add skip_rfic as an device argument.
skip_rfic should be only used in ref_clock bist tests
to bring down the test time.
2018-10-18 18:20:14 -07:00
Mark Meserve
d0de7a5812 mpm: identify sysfs gpios more generically
- Allow generic path names to be given for each search parameter instead of
  only checking the label
2018-10-18 18:15:25 -07:00
Trung Tran
e0d4f92d05 N310: Clarify logging for when re-inits occur 2018-10-16 10:00:59 -07:00
Martin Braun
b0bf984a99 mpm: n3xx: Fix Pylint warnings
This commit contains whitespace and formatting changes only. No
functional changes.
2018-10-12 16:39:36 -07:00
Trung Tran
22ec3e4bd6 mpm: dboard_manager: add more args to update_ref_clock_freq
Summary:
This change will allow correct args to pass from mboard to dboards,
that in turn can be useful for dboard manager.

Details:
In N310, the dboard manager needs the  time source to be updated before
calling update_ref_clock_source(), because it will trigger a reinit of
the dboard, for which the time_source is essential to determine correct
clock synchronizer settings.
The special case is the white rabbit time source needs a different
internal ref_clock_frequency for the clock synchronizer than the passed
in ref_clock_freq.
2018-10-12 10:59:02 -07:00
Martin Braun
6466ae1d3e mpm: Add __mpm_device__ as usrp_hwd module variable 2018-10-09 17:11:08 -07:00
Brent Stapleton
d50e013646 n3xx: e320: fixing GPSDIface sensor names
N3xx and E320 were registering GPSDIface names as get_*_sensor instead
of just the sensor name. Fixing this to now register the sensor name.
2018-09-26 11:48:44 -07:00
Trung Tran
b357278c1b mpm: add link_speed xport_info 2018-09-13 14:47:54 -07:00
Brent Stapleton
ad0bd0d915 n3xx: Get RFNoC crossbar baseport from FPGA 2018-09-06 15:59:25 -07:00
Brent Stapleton
ec0bf1add3 e320: Get RFNoC crossbar baseport from FPGA 2018-09-06 15:59:25 -07:00
Daniel Jepson
77631f3603 mpm: tdc: update PDAC BIST and flatness test to use latest APIs 2018-09-05 15:04:02 -07:00
Brent Stapleton
191e250827 mpm: reset the RPC server upon reload
When reloading the Periph Manager (as when we run the image loader),
we need to run the RPCServer `__init__` function in order to reset the
cache of RPC methods. Otherwise, that cache keeps stale references to
old functions (and prevents garbage collection).

It may be possible to reset the method cache some other way, but the
`_methods` attribute of RPCServer is Cython, and doesn't seem to be
accessible in our Python code.
2018-08-27 18:14:23 -07:00
Brent Stapleton
90f2d1579a mpm: add Git hash, version to device info
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.
2018-08-20 17:57:16 -07:00
Trung Tran
3b42e6f029 mpm: mg: move init_rf_cal before JESD de/framer bringup
This sequence is the one as described by the AD9371 user guide.
2018-08-16 13:02:38 -07:00
Martin Braun
276cd040f3 mpm: n3xx: Improve error messages for invalid clock/time settings 2018-08-13 13:32:04 -07:00
Martin Braun
f2914ff437 mpm: n3xx: Bump max rev to G/6 2018-08-10 13:10:35 -07:00
Sugandha Gupta
4683f0fa18 e320: Add all 5 temp sensors, fan sensor and rssi sensors per channel 2018-08-09 17:39:14 -07:00
Sugandha Gupta
2c91648c7f mpm: sys_utils: Get list of temperatures from all thermal zones 2018-08-09 17:39:14 -07:00
Sugandha Gupta
61ac937294 adf400x: Fix adf400x driver for ref counter and charge pump mode
- For different ref clock frequencies, the ref_counter should change
and not the n_counter.
- The charge pump should be set to normal mode and tristate as that
would prevent the PLL to lock.
2018-08-02 16:07:15 -07:00
Daniel Jepson
065740babd mpm: n3xx: clocking API changes for transitioning clock and time sources
Added set_sync_source method to set both the time and clock sources
without forcing a re-init twice. Modified the existing set_time_source
and set_clock_source methods to call into set_sync_source.
2018-08-02 12:37:34 -07:00
Martin Braun
5f624d6592 mpm: mg: periphs: Modify AD9361 reset function to keep it in reset 2018-08-02 12:37:34 -07:00
Sugandha Gupta
07ea501abe e320: Fix front panel gpio to support 3.3V
- E320 will support only 3.3 V for the front panel GPIO
- Remove other voltage options
2018-07-31 14:02:02 -07:00
Sugandha Gupta
0e0b62baf8 e320: Add 'ref_locked' sensor to mboard sensors 2018-07-31 14:02:02 -07:00
Brent Stapleton
476b65f35e n3xx: Fixup for parsing the EEPROM
EEPROM parsing in MPM was ignoring the dt_compat number (MPM doesn't
need it), so when the dt_compat number was non-zero, the CRC
calculation was incorrect. CRC calculations are now done on the raw
data.
2018-07-30 18:17:29 -07:00
Trung Tran
a39b6680a5 mpm: n3xx: Allow to run without daughterboards connected
The product ID will fall back to the motherboard ID (n300, n310). This
will load FPGA images even if there is no daughterboard connected.
2018-07-23 18:11:32 -07:00
Brent Stapleton
5b18614d39 uio: mpm: Fixup for opening mboard-regs UIO
- Fix the syntax to open mboard-regs UIO objects, and change the open()
and close() functions to be private.
- We were calling open() twice in every context manager line- once
manually, and once in __enter__. This commit corrects those usages, and
allows the context manager to fully manage the opening and closing of
UIO objects.
2018-07-23 10:33:34 -07:00
Martin Braun
e56d9188f7 mpm: uio: Fix use of logger
When logger==None, it uio.py would fail.
2018-07-19 10:31:40 -07:00
Martin Braun
118e7a21bf mpm: n3xx: Init device on boot
Specify skip_boot_init=1 to not init during boot. This will increase
boot time for an N310, typically by around 15 seconds.
2018-07-18 17:55:50 -07:00
Sugandha Gupta
1e4649ce29 e320: mpm: Add dboard and mboard sensors
Adding the following sensors:
- Catalina temperature, RSSI, and LO Lock sensors
- GPS lock, time, TPV, and SKY sensors

Co-authored-by: Brent Stapleton <brent.stapleton@ettus.com>
2018-07-18 15:37:27 -07:00
Brent Stapleton
300a5e3f6e mpm: initial commit of E320 code
Co-authored-by: Sugandha Gupta <sugandha.gupta@ettus.com>
2018-07-18 15:37:27 -07:00
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