CMOS Gate Array Design Exercise 1998

Design Specification


Hamming Encoder/Decoder


Introduction

This year's exercise is to design an encoder or a decoder for an (8,4) Hamming error correcting code.

(8,4) Hamming Error Correction Code

Simple parity checks can be used to detect errors in a communications link. When an error is discovered the data is discarded and must be re-transmitted.

In certain systems it is desired not only to detect the error but also to correct it without re-transmission. There are a number of different error correcting codes which could be used, but we shall only consider a simple block code which is used by Teletext.

The code has four data bits and four parity bits and is capable of correcting a single error, and detecting certain combinations of multiple errors.

Coding the data

Before transmission, the four bit data word is converted to an eight bit code word by interleaving it with four parity bits.

The four original data bits are b7(=d3), b5(=d2), b3(=d1) and b1(=d0).

The four parity bits are b6, b4, b2 and b0.

     Data Word         Code Word
      d     d      b                b
       3     0      7                0
        0000         0 0 0 1 0 1 0 1
        0001         0 0 0 0 0 0 1 0
        0010         0 1 0 0 1 0 0 1
        0011         0 1 0 1 1 1 1 0
        0100         0 1 1 0 0 1 0 0
        0101         0 1 1 1 0 0 1 1
        0110         0 0 1 1 1 0 0 0
        0111         0 0 1 0 1 1 1 1
        1000         1 1 0 1 0 0 0 0
        1001         1 1 0 0 0 1 1 1
        1010         1 0 0 0 1 1 0 0
        1011         1 0 0 1 1 0 1 1
        1100         1 0 1 0 0 0 0 1
        1101         1 0 1 1 0 1 1 0
        1110         1 1 1 1 1 1 0 1
        1111         1 1 1 0 1 0 1 0

The code word is then transmitted bit serially starting with bit b0.

Decoding the data

Detection and correction of errors

When the potentially corrupted data is received, the Syndrome {A,B,C,D} is calculated using the following rules: (n.b. `+' here is modulo 2 addition i.e. exclusive-or)

The table below shows how the syndrome can be interpreted.

The system when fully completed will be connected as shown:

Detailed Specification

As mentioned above, you must implement either a Hamming encoder or a Hamming decoder on the ULA. Once the designs have been fabricated, a full system will be built using an encoder from one team and a decoder from another team.

General Information

Encoder Specification

Decoder Specification

Encoder or Decoder?

The choice of a circuit for implementation will be one of your most important design decisions for this exercise. In the initial stages you may like to produce outline designs for both an encoder and a decoder. It is certainly possible that one or more of your initial designs will need more than the 67 available gate sites.

In choosing between designs, the key points to consider are:

  1. You will get more marks for a simple functional design than for an ambitious design that doesn't quite work.
  2. As you use more of the ULA the wiring becomes harder. Thus a design which uses all 67 available gate sites may take twice as long to route as one that uses only 57.

A good decoder design will be slightly larger than a good encoder design.

A hint for teams who are struggling: A simple implementation of the encoder circuit which doesn't meet the specification for rejecting multiple START signals within eight clock cycles will fit easily onto the ULA and will receive a reasonable mark (if designed and implemented well).

Note that if you chose to relax the specification such as described above you must document this in both your interim and your final reports.


Iain McNally

25-11-98