Multiplicative Scrambler (multiplicative_scrambler_b)

Multiplicative (self-synchronising) scrambler.

Design

A scrambler (also referred to as a randomiser) is a device that manipulates a data stream before transmitting. The scrambled data stream can be reversed by a descrambler at the receiver end to recover the original data stream. The purpose of scrambling is to reduce the length of consecutive zeros or ones in a transmitted data stream, which facilitates accurate timing recovery at the receiver. Their designs are usually based on linear feedback shift registers (LFSRs) due to their good statistical properties and ease of implementation in hardware. Note that there are still sequences of ones and zeros that can yield all ones or zeros, or other undesirable periodic output data.

Interface

<?xml version="1.0"?>
<componentspec>
  <property name="polynomial_taps" type="uchar" arraylength="64" writable="false" parameter="true" default="4,2,1"
    description="Polynomial taps."/>
  <property name="seed" type="ulonglong" writable="true" default="0" description="Initial seed used."/>
  <property name="flush_length" type="uchar" writable="true" default="0"
    description="Number of zero samples that should be inserted into the scrambler on receipt of a flush opcode."/>
  <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 opcode message is received a reset like behaviour is triggered in the component and sets the LFSRs to the seed property value. Once this is done the discontinuity opcode message is forwarded on.

When a flush opcode message is received, flush_length zeros are injected into the input whilst applying backpressure. Once this is done the flush opcode message is forwarded on.

All other non-sample opcode messages pass through this component without any effect on its operation.

Properties

  • polynomial_taps: Polynomial taps. An array of up to 64 unsigned characters, meaning a maximum of 64 taps can be specified. If the desired polynomial is \(x^4+x^2+x+1\) then polynomial_taps should be set to “4,2,1”. There is no need to specify the \(x^0\) term, this is implied.

    • Type: uchar

      • Array dimensions: ['64']

    • Access:

      • Parameter: True

      • Writable: False

      • Initial: False

      • Volatile: False

    • Default value: 4,2,1

  • seed: Initial seed used.

    • Type: ulonglong

    • Access:

      • Parameter: False

      • Writable: True

      • Initial: False

      • Volatile: False

    • Default value: 0

  • flush_length: Number of zero samples that should be inserted into the scrambler on receipt of a flush opcode.

    • Type: uchar

    • Access:

      • Parameter: False

      • Writable: True

      • Initial: False

      • Volatile: False

    • Default value: 0

A table listing the default polynomials the component is built for is shown below.

Polynomial

polynomial_taps

\(x^3+x^2+1\)

3,2

\(x^4+x^2+x+1\)

4,2,1

\(x^7+x^4+1\)

7,4

\(x^7+x^6+1\)

7,6

\(x^8+x^5+x+1\)

8,5,1

\(x^8+x^6+1\)

8,6

\(x^9+x^5+1\)

9,5

\(x^{10}+x+1\)

10,1

\(x^{15}+x^{14}+1\)

15,14

\(x^{16}+x^{14}+x^{13}+x^{11}+1\)

16,14,13,11

\(x^{16}+x^{15}+x^{13}+x^4+1\)

16,15,13,4

\(x^{17}+x^{12}+1\)

17,12

\(x^{18}+x^7+1\)

18,7

\(x^{18}+x^{10}+x^7+x^5+1\)

18,10,7,5

\(x^{23}+x^4+1\)

23,4

\(x^{23}+x^{18}+1\)

23,18

\(x^{23}+x^{21}+x^{16}+x^8+x^5+x^2+1\)

23,21,16,8,5,2

\(x^{43}+1\)

43

Implementations

  • multiplicative_scrambler_b (HDL)

  • multiplicative_scrambler_b (RCC)

Example Application

<?xml version="1.0"?>
<application done="file_write">
  <instance component="ocpi.core.file_read" connect="multiplicative_scrambler_b">
    <property name="filename" value="input.bin"/>
  </instance>
  <instance component="ocpi.comp.sdr.communication.multiplicative_scrambler_b" connect="file_write">
    <property name="polynomial_taps" value="4,2,1"/>
    <property name="seed" value="0"/>
    <property name="flush_length" value="4"/>
  </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

  • ieee.numeric_std

  • ieee.math_real

Limitations

Limitations of multiplicative_scrambler_b are:

  • Polynomial orders greater than 64 are not supported.

Testing

Tested platforms: None

Component testing not completed.