Patterned Interleaver: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(Created page with "Category:Block Docs Category:Stub Docs This is the template for the "Page-per-block Docs". This first section should describe what the block...")
 
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Block Docs]]
[[Category:Block Docs]]
[[Category:Stub Docs]]
Interleave items from multiple streams based on a provided pattern (given as a vector).
This is the template for the [[:Category:Block_Docs|"Page-per-block Docs"]].  This first section should describe what the block does and how to use it, using however many paragraphs necessary.  Note that the title of the wiki page should match the block's name in GRC, i.e. the one defined in the block's .grc file.  Look at the [[FFT]] Block for a good example.


As this is a basic template, it's also in the [[:Category:Stub_Docs|"Stub Docs category"]]. Please improve it.
== Parameters ==


== Parameters ==
; IO Type
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span>
: Supported types are: complex, float, int, short, and byte


; Param 1 (''R'')
; Pattern
: Description of parameter, provide any tips or recommended values. Note that the name of the parameter above should match the param's label that shows up in grc (e.g. Sample Rate).
: Vector that represents the interleaving pattern. 
: For example, the pattern <code>[ 0, 0, 1, 2 ]</code> means to pass one item of data from port 0 twice, then from port 1 once, then from port 2 once, then repeat.
: The number of inputs is set by max(pattern,0) + 1.  
: Note, all inputs must be connected even if all are not used in the pattern. For example, the pattern <code>[0, 0, 1, 2, 4]</code> would create 5 inputs. The fourth input (pattern val 3) is unused but the flowgraph will not run.


; Param 2
; Vector Length
: blah blah blah
: The vector length for the input stream(s).


== Example Flowgraph ==
== Example Flowgraph ==


Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.
'''Example 1'''
 
An example flowgraph using the default pattern with vector length 1 streams:
 
[[File:Patterned_interleaver_example_flowgraph.png|600px]]
 
 
An example of the settings field:
 
[[File:Patterned_interleaver_example_settings.png|600px]]
 
 
An example of the beginning of the output sequence:
 
[[File:Patterned_interleaver_example_output.png|600px]]
 
 
The output pattern begins with: <code>0, 1, 10, 20, 2, 3, 11, 21, 4, 0, 12, 22, ....</code>
 
 
'''Example 2'''
 
This example shows a vector length 2 example:
 
[[File:Patterned_interleaver_flowgraph_example_two.png|600px]]
 
 
An example of the beginning of the output sequence:
 
[[File:Patterned_interleaver_output_example_two.png|600px]]
 
 
The output pattern for the first stream begins with: <code>0, 1, 10, 20, 2, 3, 11, 21, 4, 0, 12, 22, ....</code>
 
The output pattern for the second stream begins with: <code>1, 2, 11, 21, 3, 4, 12, 22, 5, 0, 13, 23, ....</code>


== Source Files ==
== Source Files ==


; C++ files
; C++ files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/patterned_interleaver_impl.cc]


; Header files
; Header files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/patterned_interleaver_impl.h]


; Public header files
; Public header files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/patterned_interleaver.h]


; Block definition
; Block definition
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_patterned_interleaver.block.yml]

Latest revision as of 18:20, 30 July 2023

Interleave items from multiple streams based on a provided pattern (given as a vector).

Parameters

IO Type
Supported types are: complex, float, int, short, and byte
Pattern
Vector that represents the interleaving pattern.
For example, the pattern [ 0, 0, 1, 2 ] means to pass one item of data from port 0 twice, then from port 1 once, then from port 2 once, then repeat.
The number of inputs is set by max(pattern,0) + 1.
Note, all inputs must be connected even if all are not used in the pattern. For example, the pattern [0, 0, 1, 2, 4] would create 5 inputs. The fourth input (pattern val 3) is unused but the flowgraph will not run.
Vector Length
The vector length for the input stream(s).

Example Flowgraph

Example 1

An example flowgraph using the default pattern with vector length 1 streams:

Patterned interleaver example flowgraph.png


An example of the settings field:

Patterned interleaver example settings.png


An example of the beginning of the output sequence:

Patterned interleaver example output.png


The output pattern begins with: 0, 1, 10, 20, 2, 3, 11, 21, 4, 0, 12, 22, ....


Example 2

This example shows a vector length 2 example:

Patterned interleaver flowgraph example two.png


An example of the beginning of the output sequence:

Patterned interleaver output example two.png


The output pattern for the first stream begins with: 0, 1, 10, 20, 2, 3, 11, 21, 4, 0, 12, 22, ....

The output pattern for the second stream begins with: 1, 2, 11, 21, 3, 4, 12, 22, 5, 0, 13, 23, ....

Source Files

C++ files
[1]
Header files
[2]
Public header files
[3]
Block definition
[4]