ECC Generator problem

Thread Starter

en1gma

Joined Feb 6, 2013
19
you are speaking of a decoder??? I assume i need a 4-16 decoder. is 4-12 a possibility? I have the ingredients I need, but I am clueless on how to use the data, through a decoder, to identify and correct the appropriate bit... in other words, how does this index, through the calculation of C1,C2,C3,C4 , help me? Can you guide me in the right direction?
 

WBahn

Joined Mar 31, 2012
33,187
A 4-to-16 decoder will take your four bit location result, assuming you calculated it according to the proper rules for a Hamming Code, and procude the error vector. You just need to XOR the output of the decoder with your received vector. They will need to be offset by one because the decoder starts counting bits with bit 0 whereas your codeword starts count bits with bit 1.
 
Hey, I'm working on the same circuit

So after the decoder we need to XOR 24 bits? Similar to how we XOR to find the 4 checkbits?

Also how would we go about displaying the error status?

Thanks,
 

Thread Starter

en1gma

Joined Feb 6, 2013
19
I was under the impression we only had to XOR a total of 16 bits after the decoder, the 8 original bits and the 8 bits after the decoder. I have yet to get to the error status portion..

Have you got a working decoder? I am making one out of 5, 2-4 decoders... I assume the decoder boxes in logicworks implement the same logic without having to map everything out at gate level??
 

WBahn

Joined Mar 31, 2012
33,187
What kind of decoders are those 2-4 decoders? A basic decoder would have two inputs and four outputs and exactly one of the four outputs would be high. Some decoders have an additional Output Enable input. If disabled, then all of the outputs are LO.

What you can do with them depends on what kind they are.
 

Thread Starter

en1gma

Joined Feb 6, 2013
19
my parity bits, check bits, and 12 bit data vector calculates perfectly. So basically my only problem is a working decoder. I am doing SOMETHING wrong at this step. What are you having issues with? perhaps we can help eachother out heh heh....
 

Thread Starter

en1gma

Joined Feb 6, 2013
19
@en1gma:
What's your email? I'll show you how I did the decoder.

@Wbahn:
Would you know how we would go about displaying the error status? ie when no error, the hex data will display "0". Also in another status, the error will display C if there is a single transmission error. What kind of circuit are we looking at for these two displays?
 

WBahn

Joined Mar 31, 2012
33,187
So let's recap what you've done so far.

Your eight data bits are labeled {a,b,c,d,e,f,g,h}
Your four parity bits are labeled {w,x,y,z}

They are positioned into a twelve bit codeword in which the bit positions are numbred 1 through 12. The parity bits are placed at the positions in which the binary representation for the position has but a single bit set. The data bits are, therefore, placed at positions in which the binary representation for that position has at least two bits set. Each parity bit is the even parity of all of the codeword bits for which their positions within the codeword have the same bit set as that parity bit. The consequence is that, given a single bit error, the position in which the error occurred is given by the binary value indicated by the parity bits that fail parity. If that binary value is applied to a 4-16 decoder, then you end up with the error vector that can be applied to the received vector to correct it to a legitimate codeword.

I don't think your bit assignments are correct in your decoder, but I can't tell for sure because you have indicated, in Post #15, which positions the four parity bits named {P1,P2,P3,P4} are located in the codeword, but you haven't indicated where the bits named {w,x,y,z} are located. You need to get in the habit of being explicit and consistent with your nomenclature.

I'm going to assume that they are mapped in the same order. Since I just accidentally posted this, I'll continue in the next post to show the mappings.
 

WBahn

Joined Mar 31, 2012
33,187
Okay, continuing:

Your eight data bits are labeled {a,b,c,d,e,f,g,h}
Your four parity bits are labeled {w,x,y,z}

They are positioned into a twelve bit codeword in which the bit positions are numbred 1 through 12. The parity bits are placed at the positions in which the binary representation for the position has but a single bit set. The data bits are, therefore, placed at positions in which the binary representation for that position has at least two bits set.

The mapping is therefore:

Rich (BB code):
wxaybcdzefgh
------------
123456789ABC (Bit position in HEX)
------------
000000011111 (Binary coding of bit position)
000111100001
011001100110
101010101010
------------
So the four rows of the binary codeings give you the maps for which bits to XOR for each bit in the 4-bit error position value (msb in top row and lsb in bottom row).

When you apply those to your 4-16 decoder, if no bit is in error then all four parity bits will pass and the value applied to the decoder will be 0000. This will turn on channel 0, which is your indication that no error occured. But this also means that this is NOT one of the bits in your error vector. Instead, your error vector is made up of the twelve channels numbered 1 through 12 (just like your codeword bits were numbered).

Now, you don't HAVE to XOR all 12 bits. You can just pull out the eight bits that map to data bits and XOR those with the corresponding eight bits from the received vector to get the corrected vector.

As for how to drive the 3 displays, that depends on what the problem specifies should be displayed under the various conditions.
 
I made a 4 to 16 line decoder, but I have trouble using the decoder. What do I have to do to correct the bits if there is an error?

Also for the displays, the assignments are as follows,

Construct an ECC Detector at Main Memory that corrects for single bit errors. We will use 3 Hex displays, 2 for data and 1 for an error status, for diagnostic purposes:
. In the event that no error has occurred, your design must display the data transferred using the 2 Hex data displays and a “0” as an error status.
. For single bit transmission errors, your system must correct the error and display the data along with “C” in the 3rd Hex Display.
How would we go about doing the error status?

Thanks for your help.
 

Thread Starter

en1gma

Joined Feb 6, 2013
19
I also have a decoder I believe to be working.

Using the 4 check-bits as input, Lets say I flip bit 3, the 4-16 decoder should display..

0001000000000000

or bit 5

0000010000000000

The 1 set indicating which bit will be flipped once pushed through XOR gate. That is the output I get. It seems to be offset by one as you said. Is this what I am supposed to recieve from my decoder???
 
Top