Bit Unstuffer (bit_unstuffer_b)

Zero insertion bit unstuffer.

Design

Bit unstuffing is the removal of non‑information bits from a binary data stream that were inserted by a bit‑stuffing process. These non‑information bits were added to satisfy protocol requirements such as limiting the number of consecutive bits of the same value, aiding receiver synchronisation, and preventing reserved bit sequences from appearing in the data.

The component identifies when consecutive_ones ones are received and removes the following zero. If the bit following the threshold is a one, the internal counter resets but the bit is retained.

Interface

<?xml version="1.0"?>
<componentspec>
  <property name="consecutive_ones" type="uchar" parameter="true" default="5"
    description="Number of consecutive ones after which a zero will be removed."/>
  <port name="input" producer="false" protocol="bool_timed_sample-prot"/>
  <port name="output" producer="true" protocol="bool_timed_sample-prot"/>
</componentspec>

Ports

Inputs:

  • input: Primary input samples port.

    • Protocol: bool_timed_sample-prot

    • Optional: False

Outputs:

  • output: Primary output samples port.

    • Protocol: bool_timed_sample-prot

    • Optional: False

Opcode Handling

When a discontinuity or flush opcode is received this acts to reset the component, and clears the internal count of received consecutive ones. Once this is completed the opcode is forwarded on.

All other non-sample messages are passed through the component without any effect.

Properties

  • consecutive_ones: Number of consecutive ones after which a zero will be removed.

    • Type: uchar

    • Access:

      • Parameter: True

      • Writable: False

      • Initial: False

      • Volatile: False

    • Default value: 5

Implementations

Example Application

<?xml version="1.0"?>
<application done="file_write">
  <instance component="ocpi.core.file_read" connect="bit_unstuffer_b">
    <property name="filename" value="input.bin"/>
  </instance>
  <instance component="ocpi.comp.sdr.communication.bit_unstuffer_b" connect="file_write">
    <property name="consecutive_ones" value="5"/>
  </instance>
  <instance component="ocpi.core.file_write">
    <property name="filename" value="output.bin"/>
  </instance>
</application>

Dependencies

The dependencies to other elements in OpenCPI are:

There is also a dependency on:

  • ieee.std_logic_1164

Limitations

Limitations of bit_unstuffer_b are:

  • consecutive_ones cannot be set to zero.

Testing

Tested platforms: None

Component testing not completed.