
HammingDecoder |
ptolemy.actor.lib.comm.HammingDecoder |
Decode a (<i>n</i>, <i>k</i>) Hamming code, where <i>n</i> is specified by
parameter <i>codedRate</i> and <i>k</i> is specified by parameter
<i>uncodedRate</i>.
<p>
The Hamming code can correct one-bit error.
To encode a Hamming code, the HammingCoder consumes <i>k</i> information bits
during each firing and consider them as a row vector <i><u>X</u></i>. Its
Hamming code is <i><u>Y</u></i> = <i><u>X</u></i> * G.
<p>
If there is no error in <i><u>Y</u></i>,
<i><u>Y</u></i> * H<sup>T</sup> should be a zero vector of length <i>n - k</i>.
Otherwise <i><u>S</u></i> = <i><u>Y</u></i> * H<sup>T</sup> is called the
syndrome. Let <i><u>S</u></i> be the i-th column of H. The HammingDecoder
declares there is an error at the i-th element of <i><u>Y</u></i>.
<p>
For more information on Hamming codes, see HammingCoder and Proakis, Digital
Communications, Fourth Edition, McGraw-Hill, 2001, pp. 448-450.
<p>
Author(s): Ye Zhou
Version:$Id: HammingDecoder.doc.html,v 1.1 2006/02/22 18:40:27 mangal Exp $
Pt.Proposed Rating:Red (eal)
Pt.Accepted Rating:Red (cxh)
uncodedRate
Integer defining the uncode block size. It should be a positive
integer. Its default value is the integer 4.
codedRate
Integer defining the Hamming code block size.
This parameter should be a non-negative integer.
Its default value is the integer 7.