diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-10-26 17:28:00 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-10-26 17:28:00 -0700 |
commit | 248377a1db9f2761fd984528cde11ab66555ebfb (patch) | |
tree | 1c638c0affb9b3154d288b74428cd5a912edd24a /host | |
parent | f386a2805b1cda04eef8c2ba1a3c680edf28c2a6 (diff) | |
parent | 9517de45709adaea8b574011573a565007149d5d (diff) | |
download | uhd-248377a1db9f2761fd984528cde11ab66555ebfb.tar.gz uhd-248377a1db9f2761fd984528cde11ab66555ebfb.tar.bz2 uhd-248377a1db9f2761fd984528cde11ab66555ebfb.zip |
Merge branch 'maint'
Diffstat (limited to 'host')
-rw-r--r-- | host/docs/build.dox | 2 | ||||
-rw-r--r-- | host/docs/calibration.dox | 6 | ||||
-rw-r--r-- | host/docs/coding.dox | 2 | ||||
-rw-r--r-- | host/docs/configuration.dox | 2 | ||||
-rw-r--r-- | host/docs/general.dox | 4 | ||||
-rw-r--r-- | host/docs/octoclock.dox | 2 | ||||
-rw-r--r-- | host/docs/transport.dox | 13 | ||||
-rw-r--r-- | host/docs/usrp2.dox | 4 | ||||
-rw-r--r-- | host/docs/usrp_b200.dox | 2 | ||||
-rw-r--r-- | host/docs/usrp_e3x0.dox | 18 | ||||
-rw-r--r-- | host/docs/usrp_x3x0.dox | 8 | ||||
-rw-r--r-- | host/docs/vrt_chdr.dox | 4 | ||||
-rw-r--r-- | host/include/uhd/rfnoc/node_ctrl_base.ipp | 2 | ||||
-rw-r--r-- | host/include/uhd/stream.hpp | 13 | ||||
-rw-r--r-- | host/lib/experts/expert_nodes.hpp | 9 | ||||
-rw-r--r-- | host/lib/rfnoc/rx_stream_terminator.cpp | 1 | ||||
-rw-r--r-- | host/lib/rfnoc/tx_stream_terminator.cpp | 2 | ||||
-rwxr-xr-x | host/lib/transport/nirio/lvbitx/process-lvbitx.py | 12 | ||||
-rw-r--r-- | host/lib/usrp/x300/x300_impl.hpp | 5 | ||||
-rw-r--r-- | host/tests/graph.hpp | 6 | ||||
-rw-r--r-- | host/tests/graph_search_test.cpp | 2 | ||||
-rw-r--r-- | host/tests/tick_node_test.cpp | 17 |
22 files changed, 75 insertions, 61 deletions
diff --git a/host/docs/build.dox b/host/docs/build.dox index 95f7bab85..674377bb2 100644 --- a/host/docs/build.dox +++ b/host/docs/build.dox @@ -258,7 +258,7 @@ Many UHD developers first install UHD using MacPorts in order to get all of the \b NOTE: We highly recommended that all dependencies be installed via the same package manager! When issues arise, they are much easier to track down, and updating to newer versions of UHD as well as dependencies is much easier. -\b NOTE: Other package managers (e.g., Fink, HomeBrew) will require diffrent commands than the above to install all dependencies and then remove the UHD install. Please consult the specific package manager in use for how to do these commands properly; they will not be covered here. +\b NOTE: Other package managers (e.g., Fink, HomeBrew) will require different commands than the above to install all dependencies and then remove the UHD install. Please consult the specific package manager in use for how to do these commands properly; they will not be covered here. #### Compiling UHD from Source diff --git a/host/docs/calibration.dox b/host/docs/calibration.dox index b4454aa24..4bf89a8bc 100644 --- a/host/docs/calibration.dox +++ b/host/docs/calibration.dox @@ -19,11 +19,11 @@ re-apply the desired setting every time the LO is re-tuned. UHD software comes with the following calibration utilities: -- **uhd_cal_rx_iq_balance:** - mimimizes RX IQ imbalance vs. LO +- **uhd_cal_rx_iq_balance:** - minimizes RX IQ imbalance vs. LO frequency -- **uhd_cal_tx_dc_offset:** - mimimizes TX DC offset vs. LO +- **uhd_cal_tx_dc_offset:** - minimizes TX DC offset vs. LO frequency -- **uhd_cal_tx_iq_balance:** - mimimizes TX IQ imbalance vs. LO +- **uhd_cal_tx_iq_balance:** - minimizes TX IQ imbalance vs. LO frequency The following RF frontends are supported by the self-calibration diff --git a/host/docs/coding.dox b/host/docs/coding.dox index 6a15098d7..aab495c25 100644 --- a/host/docs/coding.dox +++ b/host/docs/coding.dox @@ -7,7 +7,7 @@ \subsection coding_api_hilevel High-Level: The Multi-USRP The Multi-USRP class provides a high-level interface to a single USRP device -with one or more channels, or multiple USRP devicess in a homogeneous +with one or more channels, or multiple USRP devices in a homogeneous setup. See the documentation for uhd::usrp::multi_usrp. \subsection coding_api_hilevelclock High-Level: The Multi-USRP-Clock diff --git a/host/docs/configuration.dox b/host/docs/configuration.dox index 4d6a6d504..aa054b650 100644 --- a/host/docs/configuration.dox +++ b/host/docs/configuration.dox @@ -34,7 +34,7 @@ and possible more options. self_cal_adc_delay | Run ADC transfer delay self-calibration. | X3x0 | self_cal_adc_delay=1 ext_adc_self_test | Run an extended ADC self test (more than the usual) | X3x0 | ext_adc_self_test=1 recover_mb_eeprom | Disable version checks. Can damage hardware. Only recommended for recovering devices with corrupted EEPROMs. | X3x0, N230 | recover_mb_eeprom=1 - skip_dram | Ignore DRAM FIFO block. Connect Tx streamers straight into DUC or radio. | X3x0 | skip_dram=1 + skip_dram | Ignore DRAM FIFO block. Connect TX streamers straight into DUC or radio. | X3x0 | skip_dram=1 skip_ddc | Ignore DDC block. Connect Rx streamers straight into radio. | X3x0 | skip_ddc=1 skip_duc | Ignore DUC block. Connect Rx streamers or DRAM straight into radio. | X3x0 | skip_duc=1 diff --git a/host/docs/general.dox b/host/docs/general.dox index 3e9dfc63a..ff407a304 100644 --- a/host/docs/general.dox +++ b/host/docs/general.dox @@ -8,7 +8,7 @@ A USRP device has two stages of tuning: -- RF front-end: translates bewteen RF and IF +- RF front-end: translates between RF and IF - DSP: translates between IF and baseband In a typical use-case, the user specifies an overall center frequency @@ -99,7 +99,7 @@ clock selection, allowing a broader range of sample rate selections by applicati pages for more details. In many cases using USRPs with flexible master-clock rates, it is possible to achieve lower sample rates without running into -the constraints of higher decimations, simply by choosing a lower master-clock rate to keep required decimation below 128. +the constraints of higher decimation rates, simply by choosing a lower master-clock rate to keep required decimation below 128. \subsection general_sampleratenotes_automatic Automatic master-clock selection diff --git a/host/docs/octoclock.dox b/host/docs/octoclock.dox index 23faff8f3..07ca35379 100644 --- a/host/docs/octoclock.dox +++ b/host/docs/octoclock.dox @@ -120,7 +120,7 @@ Device Address: \subsection eeprom Updating the device's EEPROM -As a final step, the device's EEPROM will need to be updated. On the back of your device, you will see a label sticker with a serial number (labelled S/N) and a MAC address (labeled MAC). For later use, the MAC address will have to be used in a different format than is on the label. As an example, if the label lists the MAC address as <b>00802F112233</b>, you will need to format it as <b>00:80:2F:11:22:33</b>. +As a final step, the device's EEPROM will need to be updated. On the back of your device, you will see a label sticker with a serial number (labeled S/N) and a MAC address (labeled MAC). For later use, the MAC address will have to be used in a different format than is on the label. As an example, if the label lists the MAC address as <b>00802F112233</b>, you will need to format it as <b>00:80:2F:11:22:33</b>. Update your device's EEPROM with the following command: diff --git a/host/docs/transport.dox b/host/docs/transport.dox index ab163341d..3922efa85 100644 --- a/host/docs/transport.dox +++ b/host/docs/transport.dox @@ -8,7 +8,7 @@ A transport is the layer between the packet interface and a device IO interface. The advanced user can pass optional parameters into the underlying transport layer through the device address. These optional parameters control how the transport object allocates memory, resizes -kernel buffers, spawns threads, etc. When not spcified, the transport +kernel buffers, spawns threads, etc. When not specified, the transport layer will use values for these parameters that are known to perform well on a variety of systems. The transport parameters are defined below for the various transports in the UHD software: @@ -22,14 +22,15 @@ standard Berkeley sockets API using `send()`/`recv()`. The following parameters can be used to alter the transport's default behavior (these options can be passed to a USRP device as arguments -at initialization time, see also \ref config_devaddr, or to a streamer, -see uhd::stream_args_t::args): +at initialization time, see also \ref config_devaddr): - `recv_frame_size:` The size of a single receive buffer in bytes - `num_recv_frames:` The number of receive buffers to allocate - `send_frame_size:` The size of a single send buffer in bytes - `num_send_frames:` The number of send buffers to allocate -- `recv_buff_fullness:` The targetted fullness factor of the the buffer (typically around 90%) +- `recv_buff_fullness:` The targeted fullness factor of the the buffer (typically around 90%) +- `ups_per_sec`: USRP2 only. Flow control ACKs per second on TX. +- `ups_per_fifo`: USRP2 only. Flow control ACKs per total buffer size (in packets) on TX. <b>Notes:</b> - `num_recv_frames` does not affect performance. @@ -78,8 +79,8 @@ proportional to the sample rate. Therefore, to improve receive latency, configure the transport for a smaller frame size. <b>Note2:</b> For overall latency improvements, look for "Interrupt -Coalescing" settings for your OS and ethernet chipset. It seems the -Intel ethernet chipsets offer fine-grained control in Linux. Also, +Coalescing" settings for your OS and Ethernet chipset. It seems the +Intel Ethernet chipsets offer fine-grained control in Linux. Also, consult: - <http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/interrupt_coal.htm> diff --git a/host/docs/usrp2.dox b/host/docs/usrp2.dox index 3f85e45b5..7f8c94b8b 100644 --- a/host/docs/usrp2.dox +++ b/host/docs/usrp2.dox @@ -102,7 +102,7 @@ indirectly to a USRP2 through a Gigabit Ethernet switch. \subsection usrp2_network_setuphost Setup the host interface -The USRP2 communicates at the IP/UDP layer over the gigabit ethernet. +The USRP2 communicates at the IP/UDP layer over the gigabit Ethernet. The default IP address of the USRP2 is **192.168.10.2**. You will need to configure the host's Ethernet interface with a static IP address to enable communication. An address of **192.168.10.1** and a subnet mask @@ -189,7 +189,7 @@ IP address are in the previous section of this documentation. \subsection usrp2_commprob_firewall Firewall issues When the IP address is not specified, the device discovery broadcasts -UDP packets from each ethernet interface. Many firewalls will block the +UDP packets from each Ethernet interface. Many firewalls will block the replies to these broadcast packets. If disabling your system's firewall or specifying the IP address yields a discovered device, then your firewall may be blocking replies to UDP broadcast packets. If this is diff --git a/host/docs/usrp_b200.dox b/host/docs/usrp_b200.dox index 2192ba63e..1d5374b3a 100644 --- a/host/docs/usrp_b200.dox +++ b/host/docs/usrp_b200.dox @@ -42,7 +42,7 @@ images: \section b200_mcr Changing the Master Clock Rate The master clock rate feeds the RF frontends and the DSP chains. Users -may select non-default clock rates to acheive integer decimations or +may select non-default clock rates to achieve integer decimation rates or interpolations in the DSP chains. The clock rate can be set to any value between 5 MHz and 61.44 MHz (or 30.72 MHz for dual-channel mode). Note that rates above 56 MHz are possible, but not recommended. diff --git a/host/docs/usrp_e3x0.dox b/host/docs/usrp_e3x0.dox index fda5c7e1d..470f6a26b 100644 --- a/host/docs/usrp_e3x0.dox +++ b/host/docs/usrp_e3x0.dox @@ -31,8 +31,8 @@ up and running. There are two different methods to connect to the device -- using the onboard serial to usb connector -- using the gigabit ethernet connector and a ssh client on your host computer +- using the onboard Serial to USB connector +- using the gigabit Ethernet connector and a ssh client on your host computer For the first boot, booting with the serial cable connected to the device is recommended, as it allows to review and modify the \ref e3xx_network_configuration @@ -118,7 +118,7 @@ in order to build software for your device open a new shell and type: $ . <yoursdkinstallpath>/environment-setup-armv7ahf-vfp-neon-oe-linux-gnueabi -This will modifiy the PATH, CC, CXX etc, environment variables and allow you to compile software for your USRP E310 device. +This will modify the PATH, CC, CXX etc, environment variables and allow you to compile software for your USRP E310 device. To verify all went well you can try: $ $CC -dumpmachine @@ -223,7 +223,7 @@ From the build directory run: $ sh ../meta-ettus/scripts/build-all.sh \endcode -When the script finishes, the SD ard image files are in ./images and the sdk +When the script finishes, the SD card image files are in ./images and the sdk is in tmp-glibc/deploy/sdk/ . -# Using the environment @@ -237,9 +237,9 @@ again by: \section e3x0_upgrade_sd_card Upgrading / Writing image to sd card In order to upgrade or reinitialize a sd card for the first time, you can use the 'dd' tool. -Make sure that you are using the right block device for your sd card as failing to do so can wipe your harddrive. +Make sure that you are using the right block device for your sd card as failing to do so can wipe your hard drive. -Replace `<yourimage>`.direct with your image file name and yoursdcard with your blockdevice e.g. /dev/mmcblk0 or /dev/sdb. +Replace `<yourimage>`.direct with your image file name and `<yoursdcard>` with your blockdevice e.g. /dev/mmcblk0 or /dev/sdb. $ sudo dd if=<yourimage>.direct of=/dev/<yoursdcard> bs=1M @@ -389,7 +389,7 @@ To test the accelerometer, run: $ RTIMULibDrive -This will print the current acclerometer values on the console. +This will print the current accelerometer values on the console. To launch the IMU calibration procedure, run: @@ -518,7 +518,7 @@ The procedure for calibration is as follows: A faster (less accurate) calibration procedure is as follows: -1. Completly charge battery +1. Completely charge battery 2. Type: $ echo 3200000 > /sys/class/power_supply/BAT/charge_now @@ -573,7 +573,7 @@ Source code related to controlling the filter band and antenna switches resides methods set the switches depending on the state of transmit and receive streams. The following sections provide switch setting tables for antenna and filter selection for frontends A & B receive and transmit paths. -For futher details refer to the schematics. +For further details refer to the schematics. \subsubsection e3x0_dboard_e310_frontend_a_switches Frontend Side A Filter and Antenna Switches diff --git a/host/docs/usrp_x3x0.dox b/host/docs/usrp_x3x0.dox index 5f7284a09..8a3d52a7d 100644 --- a/host/docs/usrp_x3x0.dox +++ b/host/docs/usrp_x3x0.dox @@ -112,7 +112,7 @@ ready for development! - Prior to installing the module, the host PC can remain powered on. - Plug a 1 Gigabit SFP Transceiver into Ethernet Port 0 on the USRP X300/X310 device. -- Use the Ethernet cable to connect the SFP+ transciever on the device to the host computer. For maximum throughput, Ettus Research recommends that you connect each device to its own dedicated Gigabit Ethernet interface on the host computer. +- Use the Ethernet cable to connect the SFP+ transceiver on the device to the host computer. For maximum throughput, Ettus Research recommends that you connect each device to its own dedicated Gigabit Ethernet interface on the host computer. - Connect the AC/DC power supply to the device and plug the supply into a wall outlet. - The OS will automatically recognize the device (e.g. when running `uhd_find_devices`). @@ -157,7 +157,7 @@ We will use the 'MXI' nomenclature for the rest of this manual.</b> ### Installing the PCIe Kernel Drivers In order to use the USRP X-Series on a PCIe-over-MXI connection, you need to -install the NI RIO drivers on your system. Please follow the insructions here: +install the NI RIO drivers on your system. Please follow the instructions here: \ref page_ni_rio_kernel ### Installing the PCI Express Interface Kit @@ -198,7 +198,7 @@ We will use the 'MXI' nomenclature for the rest of this manual.</b> ### Installing the PCIe Kernel Drivers In order to use the USRP X-Series on a PCIe-over-MXI connection, you need to -install the NI RIO drivers on your system. Please follow the insructions here: +install the NI RIO drivers on your system. Please follow the instructions here: \ref page_ni_rio_kernel ### Installing the PCI Express Card @@ -443,7 +443,7 @@ for information specific to certain daughterboards. Not all combinations of daughterboards work within the same device, if daughterboard clock requirements conflict. Note that some daughterboards -(e.g. the UBX) will try and set the daughterboard clock rate themself. +(e.g. the UBX) will try and set the daughterboard clock rate themselves. \section x3x0_addressing Addressing the Device diff --git a/host/docs/vrt_chdr.dox b/host/docs/vrt_chdr.dox index 8ab177b21..560f0b6a3 100644 --- a/host/docs/vrt_chdr.dox +++ b/host/docs/vrt_chdr.dox @@ -6,7 +6,7 @@ Radio transport protocols are used to exchange samples (or other items) between If one were to sniff Ethernet traffic between a USRP and a PC, the packets would conform to a radio transport protocol. -For USRP devices, two radio transport protocols are relevent: VRT (the VITA Radio Transport protocol) +For USRP devices, two radio transport protocols are relevant: VRT (the VITA Radio Transport protocol) and CVITA (compressed VITA), also known as CHDR. Generation-3 devices and the B200 use CHDR, the rest use VRT. @@ -74,7 +74,7 @@ for Ethernet links as well as USB (e.g., for the B210). \section vrt_code Code -Relevent code sections for the radio transport layer are: +Relevant code sections for the radio transport layer are: * uhd::transport::vrt - Namespace for radio transport protocol related functions and definitions * uhd::transport::vrt::chdr - Sub-namespace specifically for CVITA/CHDR * uhd::sid_t - Datatype to represent SIDs diff --git a/host/include/uhd/rfnoc/node_ctrl_base.ipp b/host/include/uhd/rfnoc/node_ctrl_base.ipp index 4ab25c597..d300f72a7 100644 --- a/host/include/uhd/rfnoc/node_ctrl_base.ipp +++ b/host/include/uhd/rfnoc/node_ctrl_base.ipp @@ -59,7 +59,7 @@ namespace uhd { ) { size_t our_port = it->first; if (active_only - and not (downstream ? _tx_streamer_active[our_port] : _tx_streamer_active[our_port] )) { + and not (downstream ? _tx_streamer_active[our_port] : _rx_streamer_active[our_port] )) { continue; } sptr one_next_node = it->second.lock(); diff --git a/host/include/uhd/stream.hpp b/host/include/uhd/stream.hpp index 0dfc94c86..7b6cc79b3 100644 --- a/host/include/uhd/stream.hpp +++ b/host/include/uhd/stream.hpp @@ -134,19 +134,6 @@ struct UHD_API stream_args_t{ * - function: magnitude or phase/magnitude * - units: numeric units like counts or dBm * - * In addition, all the transport-related options explained on \ref page_transport can be set here. - * These options can be set either when creating the device (see also \ref config_devaddr), - * or when creating the streamer (when the options are given both times, the stream args - * take precedence): - * - * - recv_frame_size - * - send_frame_size - * - num_recv_frames - * - num_send_frames - * - ups_per_sec - * - ups_per_fifo - * - recv_buff_fullness - * * Other options are device-specific: * - port, addr: Alternative receiver streamer destination. */ diff --git a/host/lib/experts/expert_nodes.hpp b/host/lib/experts/expert_nodes.hpp index dc5cc934b..a704023a3 100644 --- a/host/lib/experts/expert_nodes.hpp +++ b/host/lib/experts/expert_nodes.hpp @@ -21,6 +21,7 @@ #include <uhd/config.hpp> #include <uhd/exception.hpp> #include <uhd/utils/dirty_tracked.hpp> +#include <uhd/types/time_spec.hpp> #include <boost/function.hpp> #include <boost/foreach.hpp> #include <boost/thread/recursive_mutex.hpp> @@ -98,6 +99,12 @@ namespace uhd { namespace experts { os << int(val); return os.str(); } + + static std::string print(const time_spec_t time) { + std::ostringstream os; + os << time.get_real_secs(); + return os.str(); + } }; /*!--------------------------------------------------------- @@ -387,7 +394,7 @@ namespace uhd { namespace experts { * class worker_node_t * * A node class to implement a function that consumes - * zero or more input data nodes and emits zeroor more output + * zero or more input data nodes and emits zero or more output * data nodes. The worker can also operate on other non-expert * interfaces because worker_node_t is abstract and the client * is required to implement the "resolve" method in a subclass. diff --git a/host/lib/rfnoc/rx_stream_terminator.cpp b/host/lib/rfnoc/rx_stream_terminator.cpp index b2a2d5a64..43b3664fc 100644 --- a/host/lib/rfnoc/rx_stream_terminator.cpp +++ b/host/lib/rfnoc/rx_stream_terminator.cpp @@ -58,6 +58,7 @@ void rx_stream_terminator::set_rx_streamer(bool active, const size_t) get_upstream_port(upstream_node.first) ); } + _rx_streamer_active[upstream_node.first] = active; } } diff --git a/host/lib/rfnoc/tx_stream_terminator.cpp b/host/lib/rfnoc/tx_stream_terminator.cpp index 2746fc4d8..ee856843d 100644 --- a/host/lib/rfnoc/tx_stream_terminator.cpp +++ b/host/lib/rfnoc/tx_stream_terminator.cpp @@ -54,7 +54,9 @@ void tx_stream_terminator::set_tx_streamer(bool active, const size_t /* port */) get_downstream_port(downstream_node.first) ); } + _tx_streamer_active[downstream_node.first] = active; } + } tx_stream_terminator::~tx_stream_terminator() diff --git a/host/lib/transport/nirio/lvbitx/process-lvbitx.py b/host/lib/transport/nirio/lvbitx/process-lvbitx.py index 7887c3997..8b06cb01c 100755 --- a/host/lib/transport/nirio/lvbitx/process-lvbitx.py +++ b/host/lib/transport/nirio/lvbitx/process-lvbitx.py @@ -39,14 +39,14 @@ if (len(args) < 1): sys.exit(1) lvbitx_filename = args[0] -input_filename = os.path.abspath(lvbitx_filename) -autogen_src_path = os.path.abspath(options.output_src_path) if (options.output_src_path is not None) else os.path.dirname(input_filename) +input_filename = os.path.relpath(lvbitx_filename) +autogen_src_path = os.path.relpath(options.output_src_path) if (options.output_src_path is not None) else os.path.dirname(input_filename) class_name = os.path.splitext(os.path.basename(input_filename))[0] if (not os.path.isfile(input_filename)): print('ERROR: FPGA File ' + input_filename + ' could not be accessed or is not a file.') sys.exit(1) -if (options.merge_bin is not None and not os.path.isfile(os.path.abspath(options.merge_bin))): +if (options.merge_bin is not None and not os.path.isfile(os.path.relpath(options.merge_bin))): print('ERROR: FPGA Bin File ' + options.merge_bin + ' could not be accessed or is not a file.') sys.exit(1) if (not os.path.exists(autogen_src_path)): @@ -171,7 +171,7 @@ codegen_transform['in_fifo_list'] = in_fifo_list # Merge bitstream into LVBITX if (options.merge_bin is not None): - with open(os.path.abspath(options.merge_bin), 'rb') as bin_file: + with open(os.path.relpath(options.merge_bin), 'rb') as bin_file: bitstream = bin_file.read() bitstream_md5 = hashlib.md5(bitstream).hexdigest() bitstream_b64 = base64.b64encode(bitstream) @@ -199,12 +199,12 @@ if (options.output_lvbitx_path is not None): tree.write(os.path.join(options.output_lvbitx_path, class_name + '_fpga.lvbitx'), encoding="utf-8", xml_declaration=True, default_namespace=None, method="xml") # Save HPP and CPP -with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'template_lvbitx.hpp'), 'r') as template_file: +with open(os.path.join(os.path.dirname(os.path.relpath(__file__)), 'template_lvbitx.hpp'), 'r') as template_file: template_string = template_file.read() with open(os.path.join(autogen_src_path, class_name + '_lvbitx.hpp'), 'w') as source_file: source_file.write(template_string.format(**codegen_transform)) -with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'template_lvbitx.cpp'), 'r') as template_file: +with open(os.path.join(os.path.dirname(os.path.relpath(__file__)), 'template_lvbitx.cpp'), 'r') as template_file: template_string = template_file.read() with open(os.path.join(autogen_src_path, class_name + '_lvbitx.cpp'), 'w') as source_file: source_file.write(template_string.format(**codegen_transform)) diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp index ee42dcf3e..5d3fa4fed 100644 --- a/host/lib/usrp/x300/x300_impl.hpp +++ b/host/lib/usrp/x300/x300_impl.hpp @@ -54,7 +54,10 @@ static const size_t X300_RX_SW_BUFF_SIZE_ETH_MACOS = 0x100000; //1Mib //where an element is 8 bytes. For best throughput ensure that the data frame fits in these buffers. //Also ensure that the kernel has enough frames to hold buffered TX and RX data static const size_t X300_PCIE_RX_DATA_FRAME_SIZE = 8184; //bytes -static const size_t X300_PCIE_TX_DATA_FRAME_SIZE = 8192; //bytes +//static const size_t X300_PCIE_TX_DATA_FRAME_SIZE = 8192; //bytes +// This is a temporary solution: We're throttling PCIe MTU to avoid +// underruns on Tx. Once we solve it on the FPGA side, need revert this commit. +static const size_t X300_PCIE_TX_DATA_FRAME_SIZE = 3000; //bytes static const size_t X300_PCIE_DATA_NUM_FRAMES = 2048; static const size_t X300_PCIE_MSG_FRAME_SIZE = 256; //bytes static const size_t X300_PCIE_MSG_NUM_FRAMES = 64; diff --git a/host/tests/graph.hpp b/host/tests/graph.hpp index 0c2be0347..894c436b3 100644 --- a/host/tests/graph.hpp +++ b/host/tests/graph.hpp @@ -43,8 +43,10 @@ private: void connect_nodes(uhd::rfnoc::source_node_ctrl::sptr A, uhd::rfnoc::sink_node_ctrl::sptr B) { - A->connect_downstream(B); - B->connect_upstream(A); + const size_t actual_src_port = A->connect_downstream(B); + const size_t actual_dst_port = B->connect_upstream(A); + A->set_downstream_port(actual_src_port, actual_dst_port); + B->set_upstream_port(actual_dst_port, actual_src_port); } #endif /* INCLUDED_TEST_GRAPH_HPP */ diff --git a/host/tests/graph_search_test.cpp b/host/tests/graph_search_test.cpp index 4106d724e..8c96bb954 100644 --- a/host/tests/graph_search_test.cpp +++ b/host/tests/graph_search_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2014 Ettus Research LLC +// Copyright 2014-2016 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 diff --git a/host/tests/tick_node_test.cpp b/host/tests/tick_node_test.cpp index fc1b8c544..6b150953b 100644 --- a/host/tests/tick_node_test.cpp +++ b/host/tests/tick_node_test.cpp @@ -60,6 +60,8 @@ BOOST_AUTO_TEST_CASE(test_simplest_downstream_search) // Simplest possible scenario: Connect B downstream of A and let // it find B connect_nodes(node_A, node_B); + node_A->set_tx_streamer(true, 0); + node_B->set_rx_streamer(true, 0); double result_rate = node_A->get_tick_rate(); BOOST_CHECK_EQUAL(result_rate, test_rate); @@ -72,12 +74,13 @@ BOOST_AUTO_TEST_CASE(test_both_ways_search) MAKE_TICK_NODE(node_B); MAKE_TICK_SETTING_NODE(node_C, test_rate); - std::cout << "a->b" << std::endl; connect_nodes(node_A, node_B); - std::cout << "b->a" << std::endl; connect_nodes(node_B, node_C); + node_A->set_tx_streamer(true, 0); + node_B->set_tx_streamer(true, 0); + node_B->set_rx_streamer(true, 0); + node_C->set_rx_streamer(true, 0); - std::cout << "search" << std::endl; double result_rate = node_B->get_tick_rate(); BOOST_CHECK_EQUAL(result_rate, test_rate); } @@ -91,6 +94,10 @@ BOOST_AUTO_TEST_CASE(test_both_ways_search_reversed) connect_nodes(node_A, node_B); connect_nodes(node_B, node_C); + node_A->set_tx_streamer(true, 0); + node_B->set_tx_streamer(true, 0); + node_B->set_rx_streamer(true, 0); + node_C->set_rx_streamer(true, 0); double result_rate = node_B->get_tick_rate(); BOOST_CHECK_EQUAL(result_rate, test_rate); @@ -105,6 +112,10 @@ BOOST_AUTO_TEST_CASE(test_both_ways_search_fail) connect_nodes(node_A, node_B); connect_nodes(node_B, node_C); + node_A->set_tx_streamer(true, 0); + node_B->set_tx_streamer(true, 0); + node_B->set_rx_streamer(true, 0); + node_C->set_rx_streamer(true, 0); BOOST_CHECK_THROW(node_B->get_tick_rate(), uhd::runtime_error); } |