Difference between revisions of "Packed to Unpacked"

From GNU Radio
Jump to: navigation, search
 
(6 intermediate revisions by the same user not shown)
Line 9: Line 9:
  
 
== Parameters ==  
 
== Parameters ==  
# '''bits_per_chunk''':
+
; Bits per Chunk
# '''endianness''':
+
: How many bits to include in each output byte/short
# '''Number of Ports''': Number of input and output ports, in case you need multiple parallel streams
 
  
Example:
+
; Endianness
 +
: Whether to start with the MSB or LSB when processing the input bits
  
If bits_per_chunk = 1
+
; Number of Ports
 +
: Number of input and output ports, in case you need multiple parallel streams
  
in 0b11110000
+
== Example Flowgraph ==
  
out 0b00000001 0b00000001 0b00000001 0b00000001 0b00000000 0b00000000 0b00000000 0b00000000
+
(This is not actually a flowgraph, it's just an example of the block being used)
 +
 
 +
If bits_per_chunk = 1 and MSB is selected,
 +
 
 +
input :  0b11110000
 +
 
 +
output : 0b00000001 0b00000001 0b00000001 0b00000001 0b00000000 0b00000000 0b00000000 0b00000000

Latest revision as of 04:40, 20 July 2019

Converts a stream of packed bytes or shorts to stream of unpacked bytes or shorts

This is the inverse of Unpacked to Packed

The bits in the bytes or shorts input stream are grouped into chunks of bits and each resulting chunk is written right-justified to the output stream of bytes or shorts. All 8 or 16 bits of the each input byte or short are processed.

The combination of this block followed by Chunks to Symbols handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.

Parameters[edit]

Bits per Chunk
How many bits to include in each output byte/short
Endianness
Whether to start with the MSB or LSB when processing the input bits
Number of Ports
Number of input and output ports, in case you need multiple parallel streams

Example Flowgraph[edit]

(This is not actually a flowgraph, it's just an example of the block being used)

If bits_per_chunk = 1 and MSB is selected,

input : 0b11110000

output : 0b00000001 0b00000001 0b00000001 0b00000001 0b00000000 0b00000000 0b00000000 0b00000000