vhdl test bench for hamming code generator
#1

Please I need help on how to go about building a testbench for hamming code generator in VHDL. Thank you
Reply
#2
The Hamming code is useful in error correction in the linear lock code. This code will encode four data bits and generate seven code bits by adding three bits as parity bits. It was introduced by Richard W. Hamming. This algorithm can detect one- and two-bit errors and can correct a bit error. Given below the code will generate (7.4) Systematic Hamming Encoder. This encoder will use 4 less significant bits as data inputs and most 3 significant bits as parity bits.

The equations of the parity bits are given below

P0 = datain (0) xor datain (1) xor datain (3)
P1 = datain (0) xor datain (2) xor datain (3)
P2 = datain (1) xor datain (2) xor datain (3)

Quote:library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

ENTITY hamming_encoder IS
PORT(datain : IN BIT_VECTOR(0 TO 3); --d0 d1 d2 d3
 hamout : OUT BIT_VECTOR(0 TO 6)); --d0 d1 d2 d3 p0 p1 p2
END hamming_encoder;

ARCHITECTURE beh OF hamming_encoder IS
SIGNAL p0, p1, p2 : BIT; --check bits
BEGIN
--generate check bits
p0 <= (datain(0) XOR datain(1)) XOR datain(3);
p1 <= (datain(0) XOR datain(2)) XOR datain(3);
p2 <= (datain(1) XOR datain(2)) XOR datain(3);

--connect up outputs
hamout(4 TO 6) <= (p0, p1, p2);
hamout(0 TO 3) <= datain(0 TO 3);

END beh;
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: hamming code in digital image processing, hamming code error detection using matlab program, advantages of hamming code over parity, working principle of mechanical bench vice, advantage of hamming code over parity code, frequency meter in microwave test bench working, hamming code matlab program,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  flying windmills or flying electric generator feg technology ppt 4 3,153 02-10-2018, 01:13 AM
Last Post: [email protected]
  integration test scenarios gmail 5 2,936 11-09-2017, 11:16 AM
Last Post: jaseela123d
Wink online aptitude test code in asp net 1 1,864 07-09-2017, 01:21 PM
Last Post: [email protected]
  car alarm system in vhdl 1 1,516 28-04-2017, 01:05 AM
Last Post: abdullah saad
  integration test scenarios for gmail login page 1 1,598 15-04-2017, 02:15 PM
Last Post: jaseela123d
  vhdl code for 128 bit carry select adder 1 853 15-04-2017, 12:19 PM
Last Post: jaseela123d
  sat fee waiver code generator 1 868 13-04-2017, 01:55 PM
Last Post: jaseela123d
  test cases for transport management system 1 927 12-04-2017, 04:12 PM
Last Post: jaseela123d
  schlumberger aptitude test questions and answers 1 935 10-04-2017, 02:52 PM
Last Post: jaseela123d
  integration test scenarios for gmail login page 1 1,266 10-04-2017, 12:54 PM
Last Post: jaseela123d

Forum Jump: