Depuncture: Difference between revisions
(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...") |
No edit summary |
||
Line 1: | Line 1: | ||
[[Category:Block Docs]] | [[Category:Block Docs]] | ||
Depuncture a given block of input samples of . The items produced is based on the pattern. Basically, if: | |||
k = 0 | |||
if _puncpat[i] == 1: | |||
out[i] = input[k++] | |||
else: | |||
out[i] = symbol # default sym=127 | |||
This block is designed for unpacked bits - that is, every input sample is a bit, either a 1 or 0. It's possible to use packed bits as symbols, but the depuncturing will be done on the symbol level, not the bit level. | |||
puncpat is specified as a 32-bit integer that we can convert into the vector _puncpat used in the algorithm above: | |||
_puncpat = [0,...] | |||
for i in puncsize: | |||
_puncpat[i] = puncpat >> (puncsize-1-i) | |||
Example: | |||
puncsize = 8 | |||
puncpat = 0xEF --> [1,1,1,0,1,1,1,1] | |||
input = [a, b, c, d, e, f, g, h] | |||
output = [a, b, c, 127, e, f, g, h] | |||
The gr.fec Python module provides a read_bitlist function that can turn a string of a puncture pattern into the correct integer form. The pattern of 0xEF could be specified as fec.readbitlist("11101111"). Also, this allows us to use puncsize=len("11101111") to make sure that our sizes are set up correctly for the pattern we want. | |||
The fec.extended_decoder takes in the puncture pattern directly as a string and uses the readbitlist inside to do the conversion. | |||
The parameter delays the application of the puncture pattern. This is equivalent to circularly rotating the by . Note that because of the circular shift, the delay should be between 0 and , but this is not enforced; the effective delay will simply be mod . A negative value here is ignored. | |||
== Parameters == | == Parameters == | ||
; Puncture Size | |||
: Size of block of bits to puncture | |||
; Puncture Pattern | |||
: The puncturing pattern | |||
; | ; Delay | ||
: | : Delayed the puncturing pattern by shifting it | ||
; | ; Symbol | ||
: | : The symbol to reinsert into the stream (def=127) | ||
== Example Flowgraph == | == Example Flowgraph == |
Latest revision as of 00:21, 18 August 2019
Depuncture a given block of input samples of . The items produced is based on the pattern. Basically, if:
k = 0 if _puncpat[i] == 1: out[i] = input[k++] else: out[i] = symbol # default sym=127
This block is designed for unpacked bits - that is, every input sample is a bit, either a 1 or 0. It's possible to use packed bits as symbols, but the depuncturing will be done on the symbol level, not the bit level.
puncpat is specified as a 32-bit integer that we can convert into the vector _puncpat used in the algorithm above:
_puncpat = [0,...] for i in puncsize: _puncpat[i] = puncpat >> (puncsize-1-i)
Example:
puncsize = 8 puncpat = 0xEF --> [1,1,1,0,1,1,1,1] input = [a, b, c, d, e, f, g, h] output = [a, b, c, 127, e, f, g, h]
The gr.fec Python module provides a read_bitlist function that can turn a string of a puncture pattern into the correct integer form. The pattern of 0xEF could be specified as fec.readbitlist("11101111"). Also, this allows us to use puncsize=len("11101111") to make sure that our sizes are set up correctly for the pattern we want.
The fec.extended_decoder takes in the puncture pattern directly as a string and uses the readbitlist inside to do the conversion.
The parameter delays the application of the puncture pattern. This is equivalent to circularly rotating the by . Note that because of the circular shift, the delay should be between 0 and , but this is not enforced; the effective delay will simply be mod . A negative value here is ignored.
Parameters
- Puncture Size
- Size of block of bits to puncture
- Puncture Pattern
- The puncturing pattern
- Delay
- Delayed the puncturing pattern by shifting it
- Symbol
- The symbol to reinsert into the stream (def=127)
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.
Source Files
- C++ files
- TODO
- Header files
- TODO
- Public header files
- TODO
- Block definition
- TODO