0% found this document useful (0 votes)
53 views2 pages

VHDL Prac 4 Updated

This document provides instructions for three VHDL design practical assignments: 1) Design a 4-bit comparator circuit that compares two 4-bit inputs A and B and uses sequential statements and a clock/reset. It will output A_GT_B, A_EQ_B, and A_LT_B to indicate if A is greater than, equal to, or less than B. 2) Design a 7-bit Hamming code generator circuit that takes a 4-bit input and outputs a 7-bit code including data and parity bits. It provides example input/output pairs to test the circuit. 3) Design a 7-bit Hamming code checker circuit that takes a 7-bit input

Uploaded by

Tariq Mahmood
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views2 pages

VHDL Prac 4 Updated

This document provides instructions for three VHDL design practical assignments: 1) Design a 4-bit comparator circuit that compares two 4-bit inputs A and B and uses sequential statements and a clock/reset. It will output A_GT_B, A_EQ_B, and A_LT_B to indicate if A is greater than, equal to, or less than B. 2) Design a 7-bit Hamming code generator circuit that takes a 4-bit input and outputs a 7-bit code including data and parity bits. It provides example input/output pairs to test the circuit. 3) Design a 7-bit Hamming code checker circuit that takes a 7-bit input

Uploaded by

Tariq Mahmood
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ELEC343 Basic VHDL Design Practical 4

1
ELEC343 Digital Systems Design
Basic VHDL Design Practical 4
Part I. A Comparator
The code given in the lecture for a comparator is using concurrent statements,
which does not contain the clock and reset signal. You will design this
comparator by using sequential statements so that the two signals can be added
into the design.
Set A and B to 4 bits each. Set the outputs A_GT_B, A_EQ_B and A_LT_B
to active low signals. For example, A_GT_B = 0 when A > B, otherwise
A_GT_B = 1.
Use one of the four pushbuttons at the bottom left corner on FPGA board for
the reset signal. Choose any 3 LEDs and any 2 sets of 4 switches for your
outputs and inputs A and B. Associate your clock with the onboard clock at
pin T9.
Write the test bench.
Show your board with a correct comparing function to your tutor.
ELEC343 Basic VHDL Design Practical 4
2
Part II. A Hamming Code Generator
Design a 7-bit Hamming Code generator using even parity. You need an input
of 4 data bits and an output of 7 bits including both data bits and parity bits.
Complete the following table with your outputs for the listed inputs and use
them to test your circuit.
Input (Data Bits) Output (Hamming Code)
1 0 0 1 1 0 0 1 1 0 0
1 0 1 0
0 1 1 1
0 0 0 0
1 1 1 1
Show your board with correct tests to your tutor.
Part III. A Hamming Code Checker
Design a 7-bit Hamming Code checker using even parity. You need an input
of 7 bits and an output of 4 bits 1 bit for error.
You can use the tests in Part II above. Show your board with correct tests of
error bits to your tutor.
Input Output Error
1 0 0 1 1 0 1
0 1 1 0 1 0 0
0 1 0 1 1 0 1
0 1 1 0 1 1 0
1 1 0 1 1 0 1

You might also like