Commit graph

1160 commits

Author SHA1 Message Date
Cristina Fuentes
2e64cb1b28 multi_usrp: Add get_mb_controller() API call 2020-09-24 15:16:45 -05:00
Wade Fife
8f09caaa06 fpga: Update DRAM IO signatures
This updates the IO signatures so that all devices and RFNoC blocks use
the same IO signature for the DRAM. This is needed because the IO
signatures must match between the RFNoC blocks and the devices. This
means that some devices have extra bits in the IO signature for the
address, but the extra bits will simply be ignored.
2020-09-03 15:26:33 -05:00
Martin Braun
b9f9ca2d0f uhd: Add APIs for getting the available power range
The previously added APIs for getting/setting power reference levels was
missing an option to read back the currently available power levels
(minimum and maximum power levels).
This adds getters for TX and RX power ranges to multi_usrp and
radio_control. The power API is thus now more similar to the gain API,
which always had getters for gain ranges.
2020-08-17 16:22:35 -05:00
Steven Koo
bd851e7836 rfnoc: set a nop destructor for clang crash
Clang will generate an illegal instruction if a virtual destructor
isn't defined.
2020-08-12 07:13:04 -05:00
Steven Koo
be5bee81c4 rfnoc: Resolves streamer/link segfaults on python
This commit resolves a segfault that occurs during teardown. Since
teardown isn't detereministic in python, there were cases where the
graph would destruct before the streamers or links got chance to
cleanup. This would result in a segfault. This change gives the lambda
a shared pointer to the object the callback method is calling on, so
that it won't destruct before being called.
2020-08-11 16:07:40 -05:00
Steven Koo
6c213ecd09 rfnoc: Remove M_PI usage to fix Windows builds
M_PI may not exist if _USE_MATH_DEFINES isn't defined before the
first include of math.h or cmath on Windows. This changes avoids the
issue all together by defining our own PI.
2020-08-07 07:24:16 -05:00
Bill Davis
4ddd653089 utils: Change template specialization namespacing
There is a gcc bug for template specialization that causes compile errors.
Reformatting the namespacing avoids the bug.
2020-08-05 13:56:00 -05:00
Aaron Rossetto
72e4cc81d2 rfnoc: Add Keep One in N block support 2020-08-05 07:47:22 -05:00
Aaron Rossetto
b39021ac2e fpga: rfnoc: Add RFNoC Keep One in N block 2020-08-05 07:47:22 -05:00
michael-west
5a00f4d786 RFNoC: Add disconnect methods to graph
- Added method to disconnect an edge
- Added method to remove a node
- Fixed algorithm to check edges during connect.  Previous code was
checking some edges twice and allowing duplicate edges to be created
for existing edges.

Signed-off-by: michael-west <michael.west@ettus.com>
2020-08-04 15:41:07 -05:00
mattprost
ef16cea9bd rfnoc: Add RFNoC replay block
Signed-off-by: mattprost <matt.prost@ni.com>
2020-08-04 15:40:30 -05:00
Wade Fife
6d92a18281 fpga: rfnoc: Add RFNoC Replay block 2020-08-04 15:40:08 -05:00
Aaron Rossetto
19171e719c rfnoc: Add siggen RFNoC block controller support 2020-07-30 13:03:16 -05:00
Wade Fife
1e94f85b8b fpga: rfnoc: Add Signal Generator RFNoC block 2020-07-30 12:51:41 -05:00
Jesse Zhang
152823d508 rfnoc: Add Switchboard block support 2020-07-30 12:51:11 -05:00
Jesse Zhang
8db024d43b fpga: Add Switchboard RFNoC block 2020-07-30 12:50:30 -05:00
Aaron Rossetto
a5fe0b071d rfnoc: Support instance overrides in set_properties()
This commit adds an enhancement to node_t::set_properties() in which
the instance argument provided to the function (which normally applies
to all properties in the key/value list) can be overridden on a
per-property basis using a special syntax.

If the key consists of the property name followed by a colon (':') and
then a number, the number following the colon is used to determine which
instance of the property this set pertains to, and the value passed via
the instance parameter is ignored for that property. For example, in the
following call:

    node->set_properties("dog=10,cat:2=5,bird:0=0.5", 1)

instance 1 of node's 'dog' property is set to 10, the 1 coming from the
instance parameter, instance 2 of the node's 'cat' property is set to 5
due to the override syntax provided in the string, and instance 0 of the
node's 'bird' property is set to 0.5 due to its override.

If the name/instance pair is malformed, e.g. 'value:=10' or
'value:foobar=10', a runtime error is thrown.
2020-07-24 13:15:30 -05:00
RobertWalstab
1d3866bef4 uhd: remove liberio 2020-07-20 16:01:03 -05:00
Martin Braun
e4291f1ddc multi_usrp: Add get_radio_control() API call
This is an advanced API call that allows direct underlying
access to the radio_control object for RFNoC devices.
2020-07-16 15:17:26 -05:00
Martin Braun
35038421e1 multi_usrp: Fix some documentation 2020-07-16 15:17:26 -05:00
Wade Fife
b3c74a712a fpga: rfnoc: Add RFNoC Moving Average block 2020-07-16 12:15:21 -05:00
mattprost
0507cc2d79 rfnoc: Add Moving Average block controller
Signed-off-by: mattprost <matt.prost@ni.com>
2020-07-16 12:14:49 -05:00
Samuel O'Brien
919a147afc python: Add bindings for C++ CHDR Parser
This commit adds pybind11 glue code for the userland chdr parsing code
introduced in the uhd::utils::chdr namespace. Additionally, it moves
some pybind11 adapter code to a common pybind_adaptors.hpp file which
originally existed in the cal_python.hpp file.

This commit also adds unit tests for the python bindings using a
captured wireshark trace which is located in rfnoc_packets_*.py and some
handwritten packets in hardcoded_packets.py

Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
2020-07-16 09:59:25 -05:00
Samuel O'Brien
297d5855ca utils: Expose CHDR Parsing API
This commit introduces a new public api in uhd::utils which allows serializing
and deserializing chdr packets.

As far as testing, this commit adds the chdr_parse_test test. It uses a
wireshark trace located in rfnoc_packets_*.cpp as well as hand coded
packets from hardcoded_packets.cpp to test the serialization and
deserialization process

Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
2020-07-13 15:21:52 -05:00
robot-rover
22837edfe2 utils: Expose CHDR Types in Public API
This commit exposes uhdlib/rfnoc/chdr_types.hpp in the public includes.
Additionally, it takes some types from uhdlib/rfnoc/rfnoc_common.hpp and
exposes them publicly in uhd/rfnoc/rfnoc_types.hpp.
Finally, one constant is moved from uhdlib/rfnoc/rfnoc_common.hpp to
uhd/rfnoc/constants.hpp

Signed-off-by: robot-rover <sam.obrien@ni.com>
2020-07-13 15:21:52 -05:00
Steven Koo
feb05cba75 meta-ettus: remove io_type.hpp
io_type's implementation was removed when host/lib/depricated.cpp was
removed. This commit also removes the hpp and installation.

Signed-off-by: Steven Koo <steven.koo@ni.com>
2020-07-08 12:46:20 -07:00
Aaron Rossetto
1ce6f961a7 rfnoc: Add Log Power RFNoC block support 2020-06-29 14:03:17 -05:00
Wade Fife
cf82b36388 fpga: rfnoc: Add Log-Power block 2020-06-29 14:03:17 -05:00
Aaron Rossetto
619f9d6372 rfnoc: Add window RFNoC block controller 2020-06-29 13:41:15 -05:00
Wade Fife
38caced694 fpga: rfnoc: Add RFNoC Window block 2020-06-29 13:41:15 -05:00
Lane Kolbly
1b502694e1 fixup! uhd: Add discoverable_features API 2020-06-25 13:36:08 -05:00
Lane Kolbly
d25782cf48 uhd: Implement discoverable_features for radio_control
radio_control doesn't implement any discoverable_features in
particular, but this gives it the API to do so.
2020-06-25 13:36:08 -05:00
Lane Kolbly
d6cb55ef08 uhd: Create discoverable feature registry implementation
Classes which want to implement discoverable_feature can simply inherit
from this registry and get access to an ergonomic map-backed registry of
features.
2020-06-25 13:36:08 -05:00
Lane Kolbly
e9ae5fb949 uhd: Add discoverable_features API
The "discoverable features" API handles how clients access the myriad
features we offer, without simply adding a million has_FOO and do_FOO
methods to radio_control and multi_usrp. discoverable_features allows
clients to query the existance of, enumerate, and ultimately they get
(by enum or by type) an object which implements their wanted feature.
2020-06-25 13:36:08 -05:00
Lars Amsel
b772b5b2cb cal: change default extension of calibration files
Flatbuffers offers an option to set the default extension for
binary files. Our calibration files have the extension .cal. Set
the extension in all schema files to ease conversion between
binary and text representation of calibration files.

Updated documentation accordingly.
2020-06-23 12:25:05 -05:00
Wade Fife
a0a5b6d6a6 rfnoc: Update port format in block YAML 2020-06-18 10:23:04 -05:00
Wade Fife
ade82b6ae4 rfnoc: Add makefile_srcs to block YAML 2020-06-18 10:23:04 -05:00
Andrew Moch
3af8dcaacf fpga: rfnoc: Add support for 512-bit CHDR widths
This fixes the rfnoc_null_src_sink, chdr_crossbar_nxn, and
chdr_stream_endpoint blocks so that wider CHDR widths are properly
supported. It also updates PkgChdrBfm to able to properly test these
blocks. The testbenches have been updated to test both 64 and 512-bit
widths.
2020-06-18 09:09:34 -05:00
Aaron Rossetto
bf9594641d rfnoc: Augment FFT RFNoC block controller
This commit augments the existing FFT RFNoC block controller with
C++ functions through which the block can be configured, as well as
adding range checking to the various properties that sit atop the FFT
RFNoC block registers.
2020-06-18 07:48:25 -05:00
Aaron Rossetto
18460e3478 python: Add radio RFNoC block controller bindings 2020-06-09 07:10:57 -05:00
Aaron Rossetto
eba658881b rfnoc: Add Add/Sub RFNoC block support 2020-05-28 15:04:05 -05:00
Wade Fife
5134b6caea fpga: rfnoc: Add RFNoC Add/Sub block 2020-05-28 15:04:05 -05:00
Aaron Rossetto
9c67396ec1 rfnoc: Add support for Split Stream RFNoC block
The split stream RFNoC block is an RFNoC block that takes in a single
CHDR stream and duplicates it, creating a number of output streams for
each input stream. Consult the split_stream_block_control class header
file for more details on block configuration and behavior, including how
property and action forwarding is handled by the block.
2020-05-28 14:49:32 -05:00
Aaron Rossetto
cb99b720ee rfnoc: Add USE_MAP prop/action forwarding policy
This commit adds a new forwarding policy for properties and actions,
USE_MAP. This forwarding policy causes the node to consult a
user-provided map to determine how to forward the property or action.
The map's key is the source edge of the incoming property or action,
while the value is a list of destination edges to which the property
should be propagated or action should be forwarded. It allows clients to
construct sophisticated forwarding behaviors for specialized blocks,
such as a split stream block that needs to forward properties and
actions only to specific output edges based on the incoming edge.
2020-05-28 14:49:32 -05:00
Wade Fife
c27c8db011 rfnoc: Add Split Stream RFNoC block 2020-05-28 14:49:32 -05:00
Martin Braun
dbff8eaf05 cal: Minor fixes in power container, add unit test
- min_power and max_power arguments were swapped. They were always
  called correctly, so this is more of a documentation fix.
- Add a unit test for the case where power values are not regular, which
  is the normal case with real data.
2020-05-26 12:58:10 -05:00
Martin Braun
e67871c7c8 rfnoc: radio: Add APIs to query cal keys
This allows asking the radio for the keys it uses to read/write its
calibration data.

By querying radio_control::get_{rx,tx}_power_ref_keys(), the return
values can be used to access uhd::usrp::cal::database::read_cal_data().
2020-05-20 15:19:55 -05:00
Martin Braun
d728767835 cal: database: Add option to register flash cal callbacks
This adds the possibility to read cal data from flash/EEPROM by adding
callbacks to the database. Unlike the RC and FILESYSTEM data, this is
very device-specific, but we can let devices register callbacks in the
database so that reading cal data from flash can use the same APIs as
from RC or filesystem.

Note that this also gives a convenient way to inject call data during
unit tests, if desired.
2020-05-20 07:30:15 -05:00
Aaron Rossetto
c1549b9f6a rfnoc: Add Vector IIR RFNoC block support 2020-05-19 14:22:55 -05:00
Wade Fife
a40f2a4a5d fpga: rfnoc: Add Vector IIR RFNoC block 2020-05-19 14:22:55 -05:00