Commit Graph

148 Commits

Author SHA1 Message Date
Michael Dickens
8aa73deb5a cmake: fix cut-and-paste typo to fix SIM APPLE build
Ref: 00c306d5c4
2021-01-25 15:24:17 -06:00
Samuel O'Brien
00c306d5c4 sim: Integrate simulator into UHD
This commit adds a device::register_device which allows uhd to start up
a simulator when uhd is called with the arguments type=sim. Creating the
device object creates a subprocess using pybind and an embedded
interpreter, and destroying the object cleans up those subprocesses.

Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
2020-10-28 15:25:48 -05:00
RobertWalstab
1d3866bef4 uhd: remove liberio 2020-07-20 16:01:03 -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
Martin Braun
675bec3e38 cmake: Fix warning finding libusb
UHD has a custom file to find libusb. This fixes a warning coming from
that file caused by the fact that we're looking for a package called
LIBUSB, but the file was called FindUSB1 (i.e., we're expecting
a package name of USB1).

Common CMake calls were also moved to lowercase for CMake coding
guidelines consistency.
2020-06-17 09:36:49 -05:00
Martin Braun
f13615ec14 uhd: cal: Add database class
This class contains methods to store and retrieve data from the local
calibration database. Note that in this case, the "database" is just a
bunch of files on the local filesystem.
2020-03-26 07:46:03 -05:00
Martin Braun
933eca17b1 cmake: Add CMakeRC module and ::rc namespace
This module allows to add binary files into UHD (e.g., for cal data
storage) in a platform-independent way.

The upstream CMakeRC.cmake is modified in the following way to allow
linkage against a shared object:

```diff
     # Generate the actual static library. Each source file is just a single file
     # with a character array compiled in containing the contents of the
     # corresponding resource file.
     add_library(${name} STATIC ${libcpp})
     set_property(TARGET ${name} PROPERTY CMRC_LIBDIR "${libdir}")
     set_property(TARGET ${name} PROPERTY CMRC_NAMESPACE "${ARG_NAMESPACE}")
     target_link_libraries(${name} PUBLIC cmrc::base)
     set_property(TARGET ${name} PROPERTY CMRC_IS_RESOURCE_LIBRARY TRUE)
+    set_property(TARGET ${name} PROPERTY POSITION_INDEPENDENT_CODE ON)
```

This forces the -fPIC flag for the static object that CMakeRC generates,
allowing to link it into a shared object file.

The version of CMakeRC used is: a7e355290, cloned from
git@github.com:vector-of-bool/cmrc.git.
2020-03-18 12:53:00 -05:00
Alex Williams
07e04cd760 docs: Change DPDK version to 18.11 and make args use underscores
Swap out hyphens for underscores in the DPDK args. Also update list
of distributions with the correct DPDK version in the repos.
2019-11-26 12:21:33 -08:00
Martin Braun
7d69dcdcc3 Remove proto-RFNoC files
This commit removes all files and parts of files that are used by
proto-RFNoC only.

uhd: Fix include CMakeLists.txt, add missing files
2019-11-26 12:16:25 -08:00
Martin Braun
2ed94af772 uhd: Remove deprecated objects and methods
This removes the following symbols:
- otw_type_t
- clock_config_t
- Any functions that use those symbols
- Non-standard args from examples (e.g., --total-time is deprecated in
  favour of --duration)
2019-11-26 11:49:08 -08:00
Martin Braun
d94140a412 uhd: Remove support for N230
Note: N230 is still supported on the 3.15 LTS branch
2019-11-26 11:49:08 -08:00
Martin Braun
1210a633ae Remove GPSd dependency
GPSd was used by the E310 prior to its MPM-ification, GPSd is therefore
no longer required by UHD.
2019-07-24 12:10:29 -07:00
Nicholas Corgan
918e4ff20c C: Add uhd_get_abi_string, uhd_get_version_string
Clients that include the UHD C headers have access to
the version and ABI #defines, but this is not available
to clients that dynamically load the library. This
commit adds publicly exported functions to provide this
information.
2019-05-02 08:36:44 -07:00
Sugandha Gupta
178b35569b e310/e320: Move E310 to MPM architecture and refactor
- Turns the E310 into an MPM device (like N3xx, E320)
- Factor out common code between E320 and E310, maximize sharing between
  the two devices
- Remove all pre-MPM E310 code that is no longer needed
- Modify MPM to remove all existing overlays before applying new ones
  (this is necessary to enable idle image mode for E310)

Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
2019-05-01 15:17:23 -07:00
Martin Braun
864d4002db uhd: Remove cal containers
They are currently unused, and may need reimplementation. For the time
being, they can go out of the codebase.
2019-03-20 14:02:08 -07:00
Martin Braun
367c88e49e cmake: Register N320 component
This will default to building the N320 driver. It replaces having to
manually specify -DENABLE_N320=ON when depdendencies are met. This also
means that N320 will be built by default.
2019-01-21 13:40:03 -08:00
Martin Braun
a69ab0c23a cmake: Update coding style to use lowercase commands
Also updates our coding style file.

Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code (with GNU compliant sed):

cmake --help-command-list | grep -v "cmake version" | while read c; do
  echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done > convert.sed \
&& git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \
'*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed

(Make sure the backslashes don't get mangled!)
2018-11-14 14:10:09 -08:00
Martin Braun
7c64976e84 cmake: Change SOVERSION and VERSION for the library files
The SOVERSION will now match the ABI string, and the VERSION matches the
full UHD version. This will allow easier parallel installation of
multiple versions of UHD.
2018-10-29 14:51:20 -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
Alex Williams
2084a5a72d uhd-dpdk: Add DPDK-based sockets-like library
This library makes available a userspace network stack with a
socket-like interface for applications (except the sockets pass around
pointers to buffers and use the buffers directly--It's sockets + a
put/get for buffer management). Supported services are ARP and UDP.
Destinations can be unicast or broadcast. Multicast is not currently
supported.

The implementation has two driver layers. The upper layer runs within
the caller's context. The caller will make requests through lockless
ring buffers (including socket creation and packet transmission), and
the lower layer will implement the requests and provide a response.

Currently, the lower layer runs in a separate I/O thread, and the caller
will block until it receives a response.

The I/O thread's main body is in src/uhd_dpdk_driver.c. You'll find that
all I/O thread functions are prefixed by an underscore, and user thread
functions do not.

src/uhd_dpdk.c is used to initialize uhd-dpdk and bring up the network
interfaces.

src/uhd_dpdk_fops.c and src/uhd_dpdk_udp.c are for network services.

The test is a benchmark of a flow control loop using a certain made-up
protocol with credits and sequence number tracking.
2018-08-29 15:52:00 -07:00
Ciro Nishiguchi
27a2182974 uhd: Define UHD_API as empty string when building static lib
Fixes #2484

When building uhd host as a static library on Windows, UHD_API is
defined as __declspec(dllimport). This results in MSVC returning error
C2491 during compilation. Added a preprocessor define UHD_STATIC_LIB
in cmake and made the config headers set UHD_API to empty string when
UHD_STATIC_LIB is defined.
2018-08-22 17:42:39 -07:00
Brent Stapleton
7d28d9140e uhd: initial commit of UHD support for E320
Co-authored-by: Sugandha Gupta <sugandha.gupta@ettus.com>
2018-07-18 15:37:27 -07:00
Martin Braun
526929071a cmake: Add ENABLE_N300 target
Driver support for N310/N300 was previously implied by
ENABLE_MPMD, which had two issues:
1) It was not clear that ENABLE_MPMD was actually enabling
   the N3x0
2) It did not allow to enable mpmd support without N3x0 support

This resolves these issues.
2018-06-11 12:13:46 -07:00
Martin Braun
ae5211d71d uhd: Update license headers
All copyright is now attributed to "Ettus Research, a National
Instruments company".

SPDX headers were also updated to latest version 3.0.
2018-02-19 16:54:52 -08:00
Martin Braun
65713fa6f5 Rename netd to mpmd 2017-12-22 15:03:53 -08:00
Andrej Rode
c8ae32253b usrp: add netd find and impl, add uhd rpc client wrapper 2017-12-22 15:03:45 -08:00
Martin Braun
fc8cd827f6 lib: Add non-public include directory
This is meant for headers that don't export symbols.
2017-12-22 14:59:23 -08:00
Martin Braun
4f948e2c8b Move all license headers to SPDX format. 2017-12-22 10:45:51 -08:00
Martin Braun
895c965f75 uhd: Removed drivers for E100/E110
The E1x0 series is still supported on the 3.9 LTS branch.
2017-09-29 10:52:27 -07:00
Moritz Fischer
ed1c64c819 transport: Added liberio_zero_copy transport implementation
This adds a zero copy transport using the liberio library.

Currently supported API version for liberio is 0.3, this might
still very much break, since the library is still in development.

So far nobody uses it UHD so we might as well merge it.

Signed-off-by: Alex Williams <alex.williams@ni.com>
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
2017-08-07 16:09:43 -07:00
Paul David
a9dfc903fa calibration: generic containers for datasets
- Includes a container for power calibration data
- Unit tests to check underlying container functionality
- Nearest neighbor and bilinear interpolation
2016-11-29 15:02:16 -08:00
Martin Braun
c66cb1bad0 cmake: Change version numbering to remove leading zeros 2016-10-31 09:39:34 -07:00
Martin Braun
3bf4b000f7 Merging RFNoC support for X310 2016-08-09 12:42:52 -07:00
Nicholas Corgan
0b2f56bdd6 Changing UHD's versioning system
* Version numbers now Major.API.ABI.Patch
2016-06-14 16:20:46 -07:00
Ashish Chaudhari
7c7622c1fe uhd: Added expert dependency tracking infrastructure
- Code location uhd/lib/experts
- expert_nodes.hpp contains all node definitions: data and worker
- expert_container.hpp contains the memory manager and resolver for expert nodes
- expert_factory contains the initializer and modifier for expert_container
2016-02-12 00:21:15 -08:00
Ashish Chaudhari
863ca545d6 n230: Added N230 device support 2016-01-05 17:35:14 -08:00
Nicholas Corgan
f4656fcb7b Added uhd_config_info utility 2015-12-30 14:23:05 -08:00
Martin Braun
3f1d0fb1bd cmake: Register components earlier
All device-specific CMake components are now registered in one place,
before the host/lib/ subdirs are sourced. This way, there are no
cyclic dependencies.

This solves the issue where ENABLE_X300=Off could disable USB, but
preserves the fix where ENABLE_X300=Off would still build some X300
codes.
2015-11-16 15:21:44 -08:00
Martin Braun
4dd7cea6e0 cmake: Proper selection of files for ENABLE_X300 2015-10-26 16:56:04 -07:00
Nicholas Corgan
30f87afcba uhd: C API wrapper
* multi_usrp, multi_usrp_clock, and associated classes accessible through C
* Added Doxygen documentation explaining structure and API
* Simple RX and TX streaming examples
* Unit tests for different parts of C interface and C++ error conversion
2015-08-06 10:42:23 -07:00
Nicholas Corgan
0595900ecc Added uhd::image_loader class and uhd_image_loader utility
* Single class for loading firmware/FPGA images onto devices instead of multiple utilities
* Loading functions are registered for each device, corresponding to their --args="type=foo" name
* Deprecation warnings added to all product-specific image loading utilities
2015-07-15 09:32:18 -07:00
Nicholas Corgan
6b64d9bbc1 cmake: allow for custom DLL resource file
* Use -DCUSTOM_RC_FILE=(filepath) option to use custom RC file
* Defaults to host/lib/uhd.rc.in if none specified
2015-06-22 13:25:54 -07:00
Nicholas Corgan
b821635dcb cmake: fixed setting RC_TRIMMED_VERSION_PATCH 2015-01-30 14:09:58 +01:00
Martin Braun
659d2e2c78 cmake: Dev branches can get a named version 2015-01-28 22:21:19 +01:00
Martin Braun
ad1ef1b645 cmake: Added ENABLE_STATIC_LIBS option
- Allows building static libraries
- For users calling find_package(UHD), provides extra options
  for building apps statically linking UHD.
- Updated the init_usrp example to link UHD statically.
2015-01-19 09:07:16 +01:00
Nicholas Corgan
a6e18604be OctoClock firmware upgrade, added host driver
* OctoClock can communicate with UHD over Ethernet
* Can read NMEA strings from GPSDO and send to host
* Added multi_usrp_clock class for clock devices
* uhd::device can now filter to return only USRP devices or clock devices
* New OctoClock bootloader can accept firmware download over Ethernet
* Added octoclock_burn_eeprom,octoclock_firmware_burner utilities
* Added test_clock_synch example to show clock API
2014-07-23 07:37:32 -07:00
Josh Blum
a7153fecdb uhd: added virtual destructors for several interface classes 2013-07-15 15:20:56 -07:00
Nicholas Corgan
4b72513a89 Added CMake variables to customize builds to match Debian package configurations
* -DLIBUHD_PKG=ON installs with libuhd003 configuration
* -DLIBUHDDEV_PKG=ON installs with libuhd-dev configuration
* -DUHDHOST_PKG=ON installs with uhd-host configuration
2013-05-10 15:04:00 -07:00
Nicholas Corgan
4a320f3143 Added Windows DLL resource file to insert version into DLL 2013-02-28 15:59:55 -08:00
Josh Blum
bf5aba2dc1 uhd: moved wax API into deprecated files 2011-11-03 20:37:09 -07:00