From 2d667b3500256df59b319d2e58b9f99891de488d Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 23 Jun 2015 17:07:47 -0700 Subject: doc: Integrated install instructions into manual --- host/docs/usrp_x3x0_config.dox | 131 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) (limited to 'host/docs/usrp_x3x0_config.dox') diff --git a/host/docs/usrp_x3x0_config.dox b/host/docs/usrp_x3x0_config.dox index 935e4cc1c..2ee449cc2 100644 --- a/host/docs/usrp_x3x0_config.dox +++ b/host/docs/usrp_x3x0_config.dox @@ -131,6 +131,137 @@ use with a USRP X3xx: The above file was generated and modified on a Fedora 20 system. +\subsection x3x0cfg_hostpc_pcie PCI Express Configuration + +\b Note: These instructions are \b only relevant for using a +USRP X3xx device over a cabled PCIe transport (PCIe over MXIe cable). +If you are using your USRP X3xx device over 1 Gigabit Ethernet or +10 Gigabit Ethernet, these instructions do not apply to you. + +\subsubsection x3x0cfg_hostpc_pcie_linux Linux Systems + +In order to use the USRP X300/X310 with PCI Express on Linux, +NI USRP RIO kernel modules needs to be installed. In order to use +the PCIe kernel module, and thus PCIe-over-cable with the X3xx, +your kernel version must be supported by the kernel module. +Only 64-bit kernels are supported. To check if your kernel is supported +by the drivers, check the NI USRP RIO website. + +#### Downloading and Extracting Installer + +- Download the installer from here: http://files.ettus.com/binaries/niusrprio/niusrprio-installer.tar.gz +- Extract it with the following command: + + tar zxf niusrprio-installer.tar.gz + +The files will be extracted into a directory called `niusrprio-installer`. + +#### Installation + +To install the NI USRPRIO kernel modules and RPC server, run the following command: + + sudo niusrprio-installer/INSTALL + +Select `y` for each prompt, and the script will install all necessary components. +This script will automatically load all necessary kernel modules for +the duration of the session. + +#### Enabling/Disabling Usage + +Once everything is installed, run the following commands to enable +use of the X300/X310 over PCI Express (the assumption is that `niusrprio_pcie` +was installed into your `$PATH`): + + sudo niusrprio_pcie start + +To stop these processes, run the following command: + + sudo niusrprio_pcie stop + +To check if the kernel modules are loaded and if the RPC server +is running, run the following command: + + niusrprio_pcie status + +\b Note: `niusrprio_pcie` start does not run when the host system is booted. +If you would like the USRP PCIe device to be available automatically after +a system restart, please create an init.d script that runs `niusrprio_pcie start`. + +#### Hot-plugging/Power-cycling + +The USRP X3x0, NI USRP-294x and NI USRP-295x devices cannot be hot-swapped when +connected over PCI Express. Unplugging the PCI Express connection or powering +the device should be done only after disabling the device using the following command. + + sudo /usr/local/bin/niusrprio_pcie stop + +\b Warning: If the device is unplugged without running the above command, the system +can become unstable and crash. + +#### Linux kernel upgrades + +The NI USRP RIO kernel modules are built for a specific kernel version. +If you upgrade/downgrade the linux kernel on the host to a version different +from the one that the installer was run on, then you may see the following +error message when running `niusrprio start`: + + ERROR: could not insert 'NiRioSrv': Unknown symbol in module, or unknown parameter (see dmesg) + ERROR: could not insert 'niusrpriok': Unknown symbol in module, or unknown parameter (see dmesg) + +To rebuild the kernel modules for the currently running kernel, simple run the following + + sudo /usr/local/bin/niusrprio_pcie stop + sudo /usr/local/bin/updateNIDrivers --no-prompt + sudo /usr/local/bin/niusrprio_pcie start + +#### Uninstallation + +To uninstall the NI USRP RIO kernel modules and RPC server, run the following command: + + sudo niusrprio-installer/UNINSTALL + +Select `y` at the prompt, and the script will uninstall all installed components. + +\subsubsection x3x0cfg_hostpc_pcie_windows Windows + +In order to use the USRP X300/X310 with PCI Express on Windows, the +NI-RIO driver package and the NI-USRP RIO kernel driver needs to be installed. + +\b Note: The kernel driver is only supported with certain Windows versions. +Check the NI USRP RIO website to see if your version is supported. + +#### Installing NI-USRP + +The NI-USRP 1.3 installer can be downloaded from this location: http://www.ni.com/download/ni-usrp-1.3/4711/en/ + +You will need to create a free NI User Account to download the installer. +Perform the following steps to download and install the NI-USRP exe driver package: + +- Choose the "2. Standard Download:NIUSRP130.exe" option to download NIUSRP130.exe to your computer +- Run NIUSRP130.exe as an Administrator and extract the contents to C:\\National Instruments Downloads\\NI-USRP\\1.3 +- In the extract location, run setup.exe and follow the prompts. + +Reboot the computer after both the NI-USRP package has been installed. + +#### Enabling/Disabling Usage + +Once everything is installed and the system is rebooted, your X300/X310 PCI Express device should automatically be detected by the Windows Device Manager. The device should be enabled by default. + +- To disable the USRPRIO device, navigate to "Device Manager", locate your USRPRIO-X3x0 device, right-click on it and choose "Disable". +- To enable the USRPRIO device, navigate to "Device Manager", locate your USRPRIO-X3x0 device, right-click on it and choose "Enable". + +#### Hot-plugging/Power-cycling + +The USRP X3x0, NI USRP-294x and NI USRP-295x devices cannot be hot-swapped when connected over PCI Express. Unplugging the PCI Express connection or powering the device should be done only after disabling the device. + +\b Warning: If the device is unplugged without running the above command, the system can become unstable and crash + +#### Uninstalling NI-USRP + +Navigate to the Control Panel and open "Programs". Then select National Instruments +Software and select NI-USRP and NI-RIO from the list. Click on uninstall +to remove the drivers from your system. + \subsection x3x0cfg_hostpc_pwr Power Management Power management on the host system attempts to save power by reducing -- cgit v1.2.3 From 41812aa2f3ec7bd112926210cfff8212037efa4d Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 22 Jun 2015 14:34:35 -0700 Subject: uhd: Removed the ORC dependency --- host/CMakeLists.txt | 3 -- host/cmake/Modules/FindORC.cmake | 36 --------------- host/cmake/Toolchains/oe-sdk_cross.cmake | 2 - host/docs/usrp_x3x0_config.dox | 34 ++------------ host/lib/convert/CMakeLists.txt | 34 -------------- host/lib/convert/convert_common.hpp | 5 +- host/lib/convert/convert_orc.orc | 79 -------------------------------- host/lib/convert/convert_with_orc.cpp | 65 -------------------------- 8 files changed, 6 insertions(+), 252 deletions(-) delete mode 100644 host/cmake/Modules/FindORC.cmake delete mode 100644 host/lib/convert/convert_orc.orc delete mode 100644 host/lib/convert/convert_with_orc.cpp (limited to 'host/docs/usrp_x3x0_config.dox') diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index b0a00db40..31ca0172c 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -385,9 +385,6 @@ ENDFOREACH(Boost_Comp) IF(ENABLE_USB) LIST(APPEND UHD_LINK_LIST_STATIC "usb-1.0") ENDIF(ENABLE_USB) -IF(ENABLE_ORC) - LIST(APPEND UHD_LINK_LIST_STATIC "orc-0.4") -ENDIF(ENABLE_ORC) CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/cmake/Modules/UHDConfigVersion.cmake.in diff --git a/host/cmake/Modules/FindORC.cmake b/host/cmake/Modules/FindORC.cmake deleted file mode 100644 index e13eae235..000000000 --- a/host/cmake/Modules/FindORC.cmake +++ /dev/null @@ -1,36 +0,0 @@ -######################################################################## -# Find the library for ORC development files -######################################################################## - -INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(PC_ORC "orc-0.4") -PKG_CHECK_MODULES(PC_ORC_V4_11 "orc-0.4 > 0.4.11") - -#we are using the pkg config as a version check -#if we have pkg config, the right version must be found -#the alternative is that no pkg config orc is found -if (PC_ORC_V4_11_FOUND OR NOT PC_ORC_FOUND) - -FIND_PATH( - ORC_INCLUDE_DIRS - NAMES orc/orc.h - HINTS $ENV{ORC_DIR}/include/orc-0.4 - ${PC_ORC_INCLUDEDIR} - PATHS /usr/local/include/orc-0.4 - /usr/include/orc-0.4 -) - -FIND_LIBRARY( - ORC_LIBRARIES - NAMES orc-0.4 - HINTS $ENV{ORC_DIR}/lib - ${PC_ORC_LIBDIR} - PATHS /usr/local/lib - /usr/lib -) - -endif() #both PC ORC FOUND - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(ORC DEFAULT_MSG ORC_LIBRARIES ORC_INCLUDE_DIRS) -MARK_AS_ADVANCED(ORC_LIBRARIES ORC_INCLUDE_DIRS) diff --git a/host/cmake/Toolchains/oe-sdk_cross.cmake b/host/cmake/Toolchains/oe-sdk_cross.cmake index ea77815c9..f8ef0157c 100644 --- a/host/cmake/Toolchains/oe-sdk_cross.cmake +++ b/host/cmake/Toolchains/oe-sdk_cross.cmake @@ -9,5 +9,3 @@ set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_NATIVE_SYSROOT} $ENV{OECORE_TARGET_SYSROOT set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) -set ( ORC_INCLUDE_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/include/orc-0.4 ) -set ( ORC_LIBRARY_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/lib ) diff --git a/host/docs/usrp_x3x0_config.dox b/host/docs/usrp_x3x0_config.dox index 2ee449cc2..ed80c31de 100644 --- a/host/docs/usrp_x3x0_config.dox +++ b/host/docs/usrp_x3x0_config.dox @@ -320,38 +320,12 @@ Real-time scheduling is enabled via different methods depending on your application and operating system. In GNU Radio Companion, it can be turned on in each individual flowgraph. -\subsection x3x0cfg_hostpc_volk Building with ORC & Volk +\subsection x3x0cfg_hostpc_volk SIMD Acceleration Especially when running high-performance applications, processing -performance can be dramatically improved by SIMD instructions. UHD uses -ORC to provide SIMD capability, and GNU Radio includes a SIMD library -called "Volk". These should both be used to guarantee optimum -performance. - -\subsubsection x3x0cfg_hostpc_volk_orc Compiling UHD with ORC - -ORC, the Oil Runtime Compiler, -is a third-party compiler that UHD uses to create efficient SIMD code for -your particular computer. ORC is generally easily installed from your -OS's package manager. - -On Fedora: - - $ sudo yum update; sudo yum install orc-compiler orc-devel - -On Ubuntu: - - $ sudo apt-get update; sudo apt-get install liborc- liborc--dev - -After installing ORC, when building UHD from source, you should see -"ORC" as one of the configured UHD components. - - -- ###################################################### - -- # UHD enabled components - -- ###################################################### - -- * LibUHD - - -- * ORC +performance can be dramatically improved by SIMD instructions. +GNU Radio includes a SIMD library +called "Volk", which should be used to guarantee optimum performance. \subsubsection x3x0cfg_hostpc_volk_volk Compiling GNURadio with Volk diff --git a/host/lib/convert/CMakeLists.txt b/host/lib/convert/CMakeLists.txt index 5204c29ea..024c2260b 100644 --- a/host/lib/convert/CMakeLists.txt +++ b/host/lib/convert/CMakeLists.txt @@ -21,40 +21,6 @@ INCLUDE(CheckIncludeFileCXX) MESSAGE(STATUS "") -######################################################################## -# Look for Orc support -######################################################################## -FIND_PACKAGE(ORC) - -IF(NOT ORCC_EXECUTABLE) - FIND_PROGRAM(ORCC_EXECUTABLE orcc) -ENDIF() - -LIBUHD_REGISTER_COMPONENT("ORC" ENABLE_ORC ON "ENABLE_LIBUHD;ORC_FOUND;ORCC_EXECUTABLE" OFF) - -IF(ENABLE_ORC) - INCLUDE_DIRECTORIES(${ORC_INCLUDE_DIRS}) - LINK_DIRECTORIES(${ORC_LIBRARY_DIRS}) - ENABLE_LANGUAGE(C) - - SET(orcc_src ${CMAKE_CURRENT_SOURCE_DIR}/convert_orc.orc) - - GET_FILENAME_COMPONENT(orc_file_name_we ${orcc_src} NAME_WE) - SET(orcc_gen ${CMAKE_CURRENT_BINARY_DIR}/${orc_file_name_we}.c) - MESSAGE(STATUS "Orc found, enabling Orc support.") - ADD_CUSTOM_COMMAND( - COMMAND ${ORCC_EXECUTABLE} --implementation -o ${orcc_gen} ${orcc_src} - DEPENDS ${orcc_src} OUTPUT ${orcc_gen} - ) - LIBUHD_APPEND_SOURCES(${orcc_gen}) - LIBUHD_APPEND_SOURCES( - ${CMAKE_CURRENT_SOURCE_DIR}/convert_with_orc.cpp - ) - LIBUHD_APPEND_LIBS(${ORC_LIBRARIES}) -ELSE(ENABLE_ORC) - MESSAGE(STATUS "Orc not found, disabling orc support.") -ENDIF(ENABLE_ORC) - ######################################################################## # Check for SSE2 SIMD headers ######################################################################## diff --git a/host/lib/convert/convert_common.hpp b/host/lib/convert/convert_common.hpp index 6c2ea9fec..65fdcbea2 100644 --- a/host/lib/convert/convert_common.hpp +++ b/host/lib/convert/convert_common.hpp @@ -65,11 +65,10 @@ static const int PRIORITY_GENERAL = 0; static const int PRIORITY_EMPTY = -1; #ifdef __ARM_NEON__ -static const int PRIORITY_LIBORC = 3; -static const int PRIORITY_SIMD = 2; //neon conversions could be implemented better, orc wins +static const int PRIORITY_SIMD = 2; static const int PRIORITY_TABLE = 1; //tables require large cache, so they are slower on arm #else -static const int PRIORITY_LIBORC = 2; +// We used to have ORC, too, so SIMD is 3 static const int PRIORITY_SIMD = 3; static const int PRIORITY_TABLE = 1; #endif diff --git a/host/lib/convert/convert_orc.orc b/host/lib/convert/convert_orc.orc deleted file mode 100644 index ffb298f26..000000000 --- a/host/lib/convert/convert_orc.orc +++ /dev/null @@ -1,79 +0,0 @@ -.function _convert_fc32_1_to_item32_1_nswap_orc -.source 8 src -.dest 4 dst -.floatparam 4 scalar -.temp 8 scaled -.temp 8 converted -.temp 4 short -x2 mulf scaled, src, scalar -x2 convfl converted, scaled -x2 convlw short, converted -swapl short, short -x2 swapw dst, short - -.function _convert_fc32_1_to_item32_1_bswap_orc -.source 8 src -.dest 4 dst -.floatparam 4 scalar -.temp 8 scaled -.temp 8 converted -.temp 4 short -x2 mulf scaled, src, scalar -x2 convfl converted, scaled -x2 convlw short, converted -x2 swapw dst, short - -.function _convert_item32_1_to_fc32_1_nswap_orc -.source 4 src -.dest 8 dst -.floatparam 4 scalar -.temp 4 tmp1 -.temp 8 tmp2 -x2 swapw tmp1, src -swapl tmp1, tmp1 -x2 convswl tmp2, tmp1 -x2 convlf tmp2, tmp2 -x2 mulf dst, tmp2, scalar - -.function _convert_item32_1_to_fc32_1_bswap_orc -.source 4 src -.dest 8 dst -.floatparam 4 scalar -.temp 4 tmp1 -.temp 8 tmp2 -x2 swapw tmp1, src -x2 convswl tmp2, tmp1 -x2 convlf tmp2, tmp2 -x2 mulf dst, tmp2, scalar - -.function _convert_sc16_1_to_item32_1_nswap_orc -.source 4 src -.dest 4 dst -.temp 4 tmp -.floatparam 4 scalar -swapl tmp, src -x2 swapw dst, tmp - -.function _convert_item32_1_to_sc16_1_nswap_orc -.source 4 src -.dest 4 dst -.floatparam 4 scalar -.temp 4 tmp -x2 swapw tmp, src -swapl dst, tmp - -.function _convert_swap_byte_pairs_orc -.source 4 src -.dest 4 dst -swapl dst, src - -.function _convert_fc32_1_to_sc8_1_nswap_orc -.source 8 src -.dest 2 dst -.temp 8 tmp -.temp 4 tmp2 -.floatparam 4 scalar -x2 mulf tmp, src, scalar -x2 convfl tmp, tmp -x2 convlw tmp2, tmp -x2 convwb dst, tmp2 diff --git a/host/lib/convert/convert_with_orc.cpp b/host/lib/convert/convert_with_orc.cpp deleted file mode 100644 index 19755fa44..000000000 --- a/host/lib/convert/convert_with_orc.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright 2011-2013 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// - -#include "convert_common.hpp" -#include - -using namespace uhd::convert; - -extern "C" { -extern void _convert_fc32_1_to_item32_1_nswap_orc(void *, const void *, float, int); -extern void _convert_fc32_1_to_item32_1_bswap_orc(void *, const void *, float, int); -extern void _convert_item32_1_to_fc32_1_nswap_orc(void *, const void *, float, int); -extern void _convert_item32_1_to_fc32_1_bswap_orc(void *, const void *, float, int); -extern void _convert_sc16_1_to_item32_1_nswap_orc(void *, const void *, float, int); -extern void _convert_item32_1_to_sc16_1_nswap_orc(void *, const void *, float, int); -extern void _convert_fc32_1_to_sc8_1_nswap_orc(void *, const void *, float, int); -extern void _convert_swap_byte_pairs_orc(void *, const void *, int); -} - -DECLARE_CONVERTER(fc32, 1, sc16_item32_le, 1, PRIORITY_LIBORC){ - _convert_fc32_1_to_item32_1_nswap_orc(outputs[0], inputs[0], scale_factor, nsamps); -} - -DECLARE_CONVERTER(fc32, 1, sc16_item32_be, 1, PRIORITY_LIBORC){ - _convert_fc32_1_to_item32_1_bswap_orc(outputs[0], inputs[0], scale_factor, nsamps); -} - -DECLARE_CONVERTER(sc16_item32_le, 1, fc32, 1, PRIORITY_LIBORC){ - _convert_item32_1_to_fc32_1_nswap_orc(outputs[0], inputs[0], scale_factor, nsamps); -} - -DECLARE_CONVERTER(sc16_item32_be, 1, fc32, 1, PRIORITY_LIBORC){ - _convert_item32_1_to_fc32_1_bswap_orc(outputs[0], inputs[0], scale_factor, nsamps); -} - -DECLARE_CONVERTER(sc16, 1, sc16_item32_le, 1, PRIORITY_LIBORC){ - _convert_sc16_1_to_item32_1_nswap_orc(outputs[0], inputs[0], scale_factor, nsamps); -} - -DECLARE_CONVERTER(sc16_item32_le, 1, sc16, 1, PRIORITY_LIBORC){ - _convert_item32_1_to_sc16_1_nswap_orc(outputs[0], inputs[0], scale_factor, nsamps); -} - -DECLARE_CONVERTER(fc32, 1, sc8_item32_be, 1, PRIORITY_LIBORC){ - _convert_fc32_1_to_sc8_1_nswap_orc(outputs[0], inputs[0], scale_factor, nsamps); -} - -DECLARE_CONVERTER(fc32, 1, sc8_item32_le, 1, PRIORITY_LIBORC){ - _convert_fc32_1_to_sc8_1_nswap_orc(outputs[0], inputs[0], scale_factor, nsamps); - _convert_swap_byte_pairs_orc(outputs[0], outputs[0], (nsamps + 1)/2); -} -- cgit v1.2.3