aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* host: test: Add UHD_UNITTEST_LOG_LEVEL overrideLane Kolbly2022-03-113-21/+55
|
* docs: stream_args: Clarify usage of stream_args_t::channelsMartin Braun2022-03-111-15/+23
| | | | | This vector is no longer used with RFNoC devices. We remove references to X300 from the example, and instead use B210 as an example.
* rfnoc: Remove UHD3-API usagesMartin Braun2022-03-112-14/+0
| | | | | | | - rfnoc_replay_samples_from_file still had UHD3-vestiges for selecting block port and ID - The documentation for stream_args_t also included block port and ID examples
* images: Update manifest and compat number for X410Aaron Rossetto2022-03-102-2/+2
|
* fpga: rfnoc: Fix PPS edge detectionmichael-west2022-03-091-1/+1
| | | | | | | Make timekeeper module sample rising edge instead of falling edge of PPS signal. Signed-off-by: michael-west <michael.west@ettus.com>
* docs: n3xx: Add info on customizable band edges and gain profilesMartin Braun2022-03-091-0/+45
|
* fpga: rfnoc: Make Replay packet length independent of burst sizeWade Fife2022-03-092-106/+158
| | | | | | | | | | | | | Before this change, the packet size output by the Replay block during playback was limited to length of a full memory burst transaction. This led to relatively small packets during playback (typically 2 KiB) and had other side effects, such as simultaneous playback from two different memory locations using different packet sizes because of differences in memory alignment. With this change, the configured packet size, as set by the register REG_PLAY_WORDS_PER_PKT, is used for all packets except the last packet of playback, which can of course be smaller.
* fgpa: rfnoc: Set Replay memory transactions to 2 KiBWade Fife2022-03-092-7/+15
| | | | | | | This sets the Replay block's counter width so that memory bursts are up to 2 KiB. Previously, the counter width was fixed, which meant that wide memories would require especially large buffers and could exceed the 4 KiB limit imposed by AXI.
* fpga: Add SPDX license identifierAaron Rossetto2022-03-091-0/+2
|
* rfnoc: radio: Explicitly set MTU forwarding policy to DROPMartin Braun2022-03-081-0/+1
| | | | | | | | | | | This is a follow-up to 930fa39, where we set the MTU property explicitly for several blocks. The radio block should also receive this treatment, as the IQ data going into its inputs is not forwarded to its outputs. This patch will remove spurious log messages like these: [INFO] [0/Radio#0] Setting default MTU forward policy. [INFO] [0/Radio#1] Setting default MTU forward policy.
* tests: Apply clang-format to convert_testAaron Rossetto2022-03-081-177/+259
|
* tests: Fix converter benchmark disable on Boost <1.68Aaron Rossetto2022-03-081-0/+80
| | | | | | | | | | | | | | | | Boost versions prior to 1.68 appear to have a bug where a decorator to denote a test as disabled is not honored when affixed to a data-driven test case, which is how the benchmarks in convert_test are skipped when the unit test is run. (The tests take some time to complete and we don't want them running with every CI pass.) This commit adds an alternative benchmark skipping mechanism when Boost <1.68 is used. The benchmark test cases perform a runtime check for the user-provided `--benchmark` command-line option. If not found, the test case returns prematurely. If found, the test case will execute. Note that because `--benchmark` is a command-line option specific to this test, and not to Boost, the options must follow `--` in the command line in order to take effect: `convert_test -- --benchmark`.
* tests: Atomicize counters in benchmark_rateAaron Rossetto2022-03-071-10/+10
| | | | | | | | The counters that keep track of overruns, underruns, number of samples transferred, etc., were not atomic. Thus, running benchmark_rate with multiple threads would result in inaccurate statistics being reported at the end of the run. This commit makes those counters atomic variables so that they are updated properly.
* docs: x4xx: Add new FPGA image descriptionsWade Fife2022-03-041-20/+44
|
* fpga: x400: Cleanup FPGA MakefileWade Fife2022-03-041-40/+61
|
* fpga: x400: Add support for DRAM with 400 MHz BWWade Fife2022-03-042-22/+24
|
* fpga: x400: Change AXI XB for DRAM to 512-bitWade Fife2022-03-041-106/+17
| | | | | | Change the width of the crossbar in the AXI Interconnect IP from 256-bit to 512-bit to match the DRAM memory controller width and to give better performance.
* fpga: rfnoc: Fix strobe probability in radio simulatorWade Fife2022-03-041-7/+7
|
* fpga: rfnoc: Regenerate noc_shellsWade Fife2022-03-0419-30/+49
|
* rfnoc: Fix block buffer sizes referring to MTUWade Fife2022-03-048-17/+23
| | | | | | | In the HDL, the parameter named 'MTU' is clog2 of the size of the desired MTU. For example, when the 'MTU' parameter is 10, that means the actual MTU setting is 2**MTU or 1024. So we need to set our buffers to 2**MTU if we want them to be one MTU in size.
* utils: Fix comment in noc_shell Mako templateWade Fife2022-03-041-0/+1
|
* fpga: x400: Add SPI Controller Info registerJavier Valenzuela2022-03-046-11/+156
| | | | | | Include a register that contains SPI controller information. Currently, it only provides the number of slaves addressable by the SPI engine.
* fpga: x400: Adjust SPI engine strobes alignmentJavier Valenzuela2022-03-044-9/+14
| | | | | | Modify behavior of clock crossing between radio_clk and radio_clk_2x. This ensures strobe signals are always asserted for a single radio_clk_2x cycle and when radio_clk is low.
* examples: benchmark_rate improvementsmichael-west2022-03-031-95/+124
| | | | | | | - Added support for tx_spb and rx_spb arguments - Fixed TX thread timestamp for single channel Signed-off-by: michael-west <michael.west@ettus.com>
* rfnoc: Refactor ctrlport_endpoint; fix MT issuesAaron Rossetto2022-03-031-121/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit refactors ctrlport_endpoint and fixes several issues related to multiple threads sending and receiving control transfers. First, it refactors the change that Martin Braun implemented in 0caed5529 by adding a tracking mechanism for control requests where clients have explicitly asked to receive an ACK when the corresponding control response is received. When a client wants to wait for an ACK associated with a control request, a combination of that request's opcode, address, and sequence number is added to a set when the request is sent. When a control response is received, the set is consulted to see if the corresponding request is there by matching the packet field data listed above. If so, the control response is added to the response queue, thus notifying all threads waiting in `wait_for_ack()` that there is a response that the thread may be waiting on. If the request is not in the set, the request is never added to the response queue. This prevents the initial problem that 0caed5529 was addressing of the response queue growing infinitely large with control responses that would never be popped from the queue. Secondly, it addresses issues when multiple threads have sent a request packet and are waiting in `wait_for_ack()` on the corresponding response. Originally, the function contained a loop which would sleep the calling thread until the control response queue had at least one element in it. When awakened, the thread would pop the frontmost control response off the queue to see if it matches the corresponding control request (i.e., has the same sequence number, opcode, and address elements). If so, the response would be handled appropriately, which may include signalling an error if the response indicates an exceptional status, and the function would return. If the response is not a matching one, the function would return to the top of the loop. If the corresponding response is not found within a specified period, the function would throw an op_timeout exception. However, there is a subtle issue with this algorithm when two different calling threads submit control requests and end up calling `wait_for_ack()` nearly simultaneously. Consider two threads issuing a control request. Thread T1 issues a request with sequence number 1 and thread T2 issues a request with sequence number 2. The two threads then call `wait_for_ack()`. Let's assume that neither of the control reponses have arrived yet. Both threads sleep, waiting to be notified of a response. Now the response for sequence number 1 arrives and is pushed to the front the response queue. This generates a signal that awakes one of the waiting threads, but which one is awakened is completely at the mercy of the scheduler. If T1 is awakened first, it pops the response from the queue, finds that it matches the request, and handles it as expected. Later, when the reponse for sequence number 2 is pushed onto the queue, the still-sleeping T2 will be awakened. It pops the response, finds it to be matching, and all is well. But if the scheduler decides to wake T2 first, T2 ends up popping the response with sequence number 1 off the front of the queue, but it doesn't match the request that T2 sent with sequence number 2, so T2 goes back to the top of the loop. At this point, it doesn't matter if T2 or T1 is awakened next; because the control response for sequence number 1 was already popped off the queue, T1 never sees the control response it expects, and will throw uhd::op_timeout back up the stack. This commit modifies the `wait_for_ack()` algorithm to search the queue for a matching response rather than indiscriminately popping the frontmost element from the queue and throwing it away if it doesn't match. That way, the order in which threads are awakened no longer matters as they will be able to find the corresponding response regardless. Furthermore, when a response is pushed onto the response queue, all waiting threads are notified of the condition via `notify_all()`, rather than just waking one thread at random (`notify_one()`). This gives all waiting threads the opportunity to check the queue for a response. Finally, the `wait_for_ack()` loop has been modified such that the thread waits to be signalled regardless of whether the queue has elements in it or not. (Prior to this change, the thread would only wait to be signalled if the queue was empty.) This effectively implements the behavior that all threads are awakened when a new control response is pushed into the queue, and combined with the changes above, ensures that all threads get a chance to react and check the queue when the queue is modified.
* mpm: fix ref_locked sensor on n320David Raeman2022-03-031-0/+15
| | | | | | | | | | | | | | | | The ref_locked mboard sensor on the n320 always returned true without querying hardware. On this device family, mboard sensor callback in n3xx.py returns the "and" of its daughterboard LMK PLLs by querying the get_ref_lock() function on each dboard manager. However, that function only existed for the Magnesium daughterbaord. For the Rhodium daughterboard, the function didn't exist and so a true value was automatically returned. This commit adds the get_ref_lock() implementations for Rhodium and EISCAT daughterboards, which are identical to the implementation already present for Magnesium. Co-authored-by: Martin Braun <martin.braun@ettus.com>
* mpm: rh: Minor linter cleanupMartin Braun2022-03-031-8/+5
|
* N310: Deactivate frontend components on radio shutdownmattprost2022-03-033-0/+35
| | | | | | | | Make sure no active components are connected to the TX frontend during next boot. This avoids configurations that could generate unwanted tones during operations such as the Mykonos init cals. Signed-off-by: mattprost <matt.prost@ni.com>
* rfnoc: window: Set window size register after loading coefficientsJonathon Pendlum2022-03-022-0/+11
|
* host: test: Add GPIO DDR register to x4xx mockLane Kolbly2022-03-021-0/+6
| | | | | | | | | This is useful for unit testing certain code which operates the DDR registers, in particular code which performs a read-modify-write operation on that register. Conceivably we could add more registers here, but I'm just doing one at a time.
* mpm: Use receiving socket for sending responsePhilipp Homann2022-03-021-5/+3
| | | | | The receiving socket can be used to send responses. This allows setting firewall rules for USRP detection.
* examples: replay: Improve rfnoc_replay_samples_from_fileMartin Braun2022-03-021-127/+87
| | | | | | | | | | - Use connect_through_blocks() to create connections - Remove check for spp being an integer multiple of the word size, the atomic item size feature will do that for us now - When using --nsamps, automatically terminate application after samples have been tx'd. - Added sleep statements to throttle empty while loops - Minor formatting changes
* rfnoc: replay: Add atomic item size propertyMartin Braun2022-03-021-0/+37
| | | | | | | This adds the atomic item size property to the replay block, which was originally introduced in 3e5e4eb. The effect is that it enforces streaming data to and from the block that is an integer multiple of the word size.
* uhd: fix negligible copy/paste typos in rhodium radio controlDavid Raeman2022-02-282-4/+4
|
* tests: Add saturating test casesAaron Rossetto2022-02-281-0/+137
| | | | | This commit adds test cases to convert_test to specifically test the saturating behavior of the fc32/fc64-to-sc16 conversions.
* convert: Make narrowing conversions saturateAaron Rossetto2022-02-282-14/+24
| | | | | This commit modifies the explicitly written narrowing conversions to clamp the results to the limits of the signed integer type.
* tests: Add conversion benchmarking testsAaron Rossetto2022-02-281-38/+571
| | | | | | | | | | | | | This commit adds Boost test cases for benchmarking each of the existing conversions that are tested in convert_test. The benchmarks do take some time, and we do not want to run they as part of every CI run, so they are marked with a test decorator that disables the benchmark by default. To run the benchmarks, invoke convert_test with `--run-test=+benchmark*` to explicitly enable all disabled tests that begin with the word 'benchmark'. Individual benchmark test cases can be enabled by specifying the full name of the benchmark test or by crafting a wildcard that includes all benchmark test cases of interest.
* convert: Add benchmarking abilitiesAaron Rossetto2022-02-281-10/+97
| | | | | This commit adds code to the convert tests to support the ability to benchmark individual conversion test cases.
* tests: Force converter tests to be run with all available priosMartin Braun2022-02-281-49/+91
|
* convert: Minor cleanupAaron Rossetto2022-02-282-115/+38
| | | | | | | | | | | | | | | | | | | This commit implements some minor cleanup of various converter- and convert test-related code: * Improves the log messages regarding which converter was returned for a request. * Modifies the result checking code in the converter tests to only report an out-of-range sample error once, rather than reporting every out-of-range sample encountered during the test. This vastly cuts down on the output when a conversion has failed. * Adds a function `reverse_converter()` which, given a `convert::id_type` describing a conversion from C1 to C2, returns a `convert::id_type` describing the reverse conversion (C2 to C1). * Removes two redundant test cases from the converter test.
* conversion: Saturate transmit IQ levels on NEON architectures.Ron Economos2022-02-281-4/+4
| | | | Signed-off-by: Ron Economos <w6rz@comcast.net>
* fpga: x400: Set replay SEP buffers to twice MTUWade Fife2022-02-242-8/+8
|
* mpm: eeprom: Fix default values in EEPROM utilitiesMartin Braun2022-02-245-34/+113
| | | | | | | | | | | | | | | | | | | | | | | | When executing eeprom-init on E320 (which was originally written for N310), it would use defaults from N310, potentially causing issues. These issues would have arisen if we letter-revved the E320 one more time (because at rev 5, N310 had a compatibility cutover). Summary of changes: - eeprom-init will now read values *not* given on the command line from the existing content of the EEPROM, if it contains valid data. This means that DT, MCU, and rev compat values will no longer get auto-derived if the EEPROM already contained "good" values. - If the EEPROM is empty or corrupted, eeprom-init will no longer run if the pid value is not provided. This is to avoid N310 defaults being written to E320 EEPROMs. - A README is added to explain which devices use which utilities. - PID checks are more strict now. It is unlikely we'll build new devices using the old EEPROM format (prior to TLV), so we can check specifically for E320, N3x0. - The hard-coded list of PIDs for the EEPROM tools are moved to a central location (eeprom-pids.h). - The code to derive values for DT/MCU/rev compat from the rev is now pid-specific and no longer device-agnostic.
* Build uhd_test library as static when `-DBUILD_SHARED_LIBS=ON`David Seifert2022-02-241-1/+1
| | | | | * A uhd_test.so lacks the necessary symbols for testing due to default visibility set to hidden.
* ci: Set continue on error and reduce timeout to 60Steven Koo2022-02-241-6/+13
| | | | | | | Instead of squashing errors, set continue on error so that warnings propagate up. Also reset timeout to default 60 minutes. Signed-off-by: Steven Koo <steven.koo@ni.com>
* docs: Improve documentation for replay blockMartin Braun2022-02-241-15/+73
| | | | | | | - Add notes on playback and record behaviour - Improve docs for play() Co-authored-by: Wade Fife <wade.fife@ettus.com>
* rfnoc: replay: Add action handler for stream commandsMartin Braun2022-02-241-0/+26
| | | | | | | | When connecting an Rx streamer to a replay block, this now allows requesting data from the replay block using a stream command. This will automatically request data from all ports the streamer is connected to, and even if there are blocks in between (depending on their action forwarding policies).
* python: rfnoc: Add connect_through_blocks() and get_block_chain()Martin Braun2022-02-242-2/+16
| | | | These RFNoC C++ API calls were previously not exported into Python.
* rfnoc: graph_utils: Add ability to declare back-edgesMartin Braun2022-02-242-4/+13
| | | | | | | rfnoc::connect_through_blocks(), unlike rfnoc_graph::connect(), did not have an argument to declare a back-edge. This patch remedies this situation by adding a skip_property_propagation argument that works exactly as with rfnoc_graph::connect().
* docs: Remove superfluous stylesheetMartin Braun2022-02-241-102/+0
| | | | | This was left over from when the manual was ported to Doxygen in a74919c2. It is not used by Doxygen.