RFNoC Keep One in N Block: Difference between revisions
Jump to navigation
Jump to search
(Updated/Completed description for the keep1 block) |
m (remove Stub Docs) |
||
Line 53: | Line 53: | ||
: [https://github.com/gnuradio/gnuradio/blob/main/gr-uhd/grc/uhd_rfnoc_keep_one_in_n.block.yml uhd_rfnoc_keep_one_in_n.block.yml] | : [https://github.com/gnuradio/gnuradio/blob/main/gr-uhd/grc/uhd_rfnoc_keep_one_in_n.block.yml uhd_rfnoc_keep_one_in_n.block.yml] | ||
[[Category:Block Docs]] | [[Category:Block Docs]] |
Latest revision as of 17:54, 24 May 2025
The Keep one in N block Decimates a stream, keeping the first item out of every N items.
Parameters
(R): Run-time adjustable
- Device Select / Instance Select
- Default: -1 / Default: -1
- These properties specify the device and instance to be used. It is best practice to always explicitly specify both. This is crucial because many USRP setups involve multiple instances of different blocks, and GNU Radio tends to select the first device or instance it finds, which may not be the most suitable choice. Explicit specification helps to prevent errors and ensures the correct setup is used.
- - Use uhd_usrp_probe to determine the correct device and instance numbers.
- - Always specify the device and instance explicitly to avoid automatic mismatches by GNU Radio.
- Even with a single device with multiple instances:
- - 0/Radio#0 → Device 0, Instance 0
- - 0/Radio#1 → Device 0, Instance 1
- Specification with multiple devices:
- - 0/Radio#1 → Device 0, Instance 1
- - 1/Radio#1 → Device 1, Instance 1
- By consistently specifying the device and instance, you ensure that the most appropriate settings are applied and avoid potential issues caused by automatic selection.
- N
- default: 1
- Block size, in items/samples. Acts as decimation rate.
- Mode
- default: 'SAMPLE'
- options: ['Drop Samples', 'Drop Packets']
- In sample mode, the first sample is kept and then N-1 samples are dropped.
- Packet mode is similar to sample mode, except the first packet of samples is kept and then N-1 packets are dropped.
Example Flowgraph
You can find this example at rfnoc_keep1.grc
A simple flowgraph showing Keep 1 in N using a Saw Tooth Signal.
Example Output
Source Files
- C++ files
- NA
- Header files
- NA
- Public header files
- NA
- Block definition
- uhd_rfnoc_keep_one_in_n.block.yml