Golay Decoder (golay_decoder_ul_us)

Takes a Golay codeword and decodes it into the original data.

Tested platforms include xsim, e31x.

Design

A Golay code is an error correcting code used for forward error correction in digital communications.

Given a codeword that is a complex long, the Golay decoder component looks at the LSB bits (24 LSB bits if the extended Golay code is implemented or 23 LSB bits if the perfect Golay code is implemented) and attempts to correct (if there are any bit errors) and decode the original data using a Golay correction and decoding algorithm.

A block diagram representation of Golay [24,12,8] is given in Figure 259:.

Block diagram outlining Golay [24,12,8].

Figure 259: Block diagram outlining Golay [24,12,8].

Interface

<?xml version="1.0"?>
<!-- This file is protected by Copyright. Please refer to the COPYRIGHT file
     distributed with this source distribution.

     This file is part of OpenCPI <http://www.opencpi.org>

     OpenCPI is free software: you can redistribute it and/or modify it under
     the terms of the GNU Lesser General Public License as published by the Free
     Software Foundation, either version 3 of the License, or (at your option)
     any later version.

     OpenCPI is distributed in the hope that it will be useful, but WITHOUT ANY
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
     more details.

     You should have received a copy of the GNU Lesser General Public License
     along with this program. If not, see <http://www.gnu.org/licenses/>. -->
<componentspec>
  <port name="input" producer="false" protocol="ulong_timed_sample-prot"/>
  <port name="output" producer="true" protocol="ushort_timed_sample-prot"/>
</componentspec>

Ports

Inputs:

  • input: Primary input samples port.

    • Protocol: ulong_timed_sample-prot

    • Optional: False

Outputs:

  • output: Primary output samples port.

    • Protocol: ushort_timed_sample-prot

    • Optional: False

Opcode Handling

The Golay decoder decodes data with sample opcodes only.

All other opcodes pass through this component without any effect.

Properties

None.

Implementations

  • golay_decoder_ul_us (HDL)

    Implementation of a Golay decoder that decodes Golay [24,12,8] codewords.

Example Application

<?xml version="1.0"?>
<!-- This file is protected by Copyright. Please refer to the COPYRIGHT file
     distributed with this source distribution.

     This file is part of OpenCPI <http://www.opencpi.org>

     OpenCPI is free software: you can redistribute it and/or modify it under
     the terms of the GNU Lesser General Public License as published by the Free
     Software Foundation, either version 3 of the License, or (at your option)
     any later version.

     OpenCPI is distributed in the hope that it will be useful, but WITHOUT ANY
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
     more details.

     You should have received a copy of the GNU Lesser General Public License
     along with this program. If not, see <http://www.gnu.org/licenses/>. -->
<application done="file_write">
  <instance component="ocpi.core.file_read" connect="golay_decoder_ul_us">
    <property name="filename" value="input.bin"/>
  </instance>
  <instance component="ocpi.comp.sdr.coding.golay_decoder_ul_us" connect="file_write">
    <property name="checkbits_mask" value="15"/>
  </instance>
  <instance component="ocpi.core.file_write">
    <property name="filename" value="output.bin"/>
  </instance>
</application>

Dependencies

The dependency (generated via gen_golay_error_patterns_rom.py) for this worker is:

  • golay_error_patterns_rom.vhd

There is also a dependency on:

  • ieee.std_logic_1164

  • ieee.numeric_std

Limitations

Limitations of golay_decoder_ul_us are:

  • None.

Testing

This component test suite uses the OpenCPI unit test framework. The unit test sends all possible Golay codewords with and without errors and checks that output data is the expected original data prior to encoding.

Tested platforms: None

Component testing not completed.