0% found this document useful (0 votes)
102 views4 pages

Experiment #6 Design A 8-Bit Comparator With VHDL Comparator and Code Converter (Chapter 8)

This document describes an experiment to design an 8-bit comparator using VHDL, including: 1) Using IF-THEN-ELSE statements to determine if input A is equal, greater than, or less than input B. 2) Implementing the IF-THEN-ELSE logic within a VHDL process. 3) Simulating the design and displaying the output on a 7-segment display on a DE2 board.

Uploaded by

dknw
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)
102 views4 pages

Experiment #6 Design A 8-Bit Comparator With VHDL Comparator and Code Converter (Chapter 8)

This document describes an experiment to design an 8-bit comparator using VHDL, including: 1) Using IF-THEN-ELSE statements to determine if input A is equal, greater than, or less than input B. 2) Implementing the IF-THEN-ELSE logic within a VHDL process. 3) Simulating the design and displaying the output on a 7-segment display on a DE2 board.

Uploaded by

dknw
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/ 4

Experiment #6 Design a 8-bit Comparator with VHDL

Comparator and Code Converter (chapter 8)


1. VHDL Design - Comparator Using IF-THEN-ELSE statement
2. VHDL Design PROCESS
3. Vector Waveform File Design

1. VHDL Design - Comparator Using IF-THEN-ELSE statement


1.a) The IC magnitude comparator can determines if A equals B, A is greater than B, and A is
less than B.

The magnitude comparison of two 8-bit binary strings by using two IC 7485s
1.b) VHDL program for an 8-bit comparator with IF_THEN_ELSE statement
VHDL Design Part:
The entity section declares a and b as 8-bit vector.
Three separate outputs are declared:
alb - a less than b;
aeb - a equal b;
agb - a greater than b.
Using internal Interconnection signal in the body part (architecture implementation part)
SIGNAL result : std)logic_vector (2 DOWNTO 0); -- 3 bit internal SIGNAL result
result[2] result[1] result[0]= =001: represent alb
result[2] result[1] result[0]= =010: represent aeb
result[2] result[1] result[0]= =100: represent agb

2.VHDL Design - PROCESS


The IF-THEN-ELSE statement is sequential and need to put inside of a PROCESS

Flowchart showing the sequential execution within the PROCESS

Figure 6-3 VHDL program for an 8-bit comparator

3. Vector Waveform File Design

Include the simulation result in the report.


4. Display the simulation results on the DE-2 board

And continue to work on the VHDL so that:


1) 1 is displayed on 7-Segment Output on the DE2 board if a is greater than b.
2) -1 is displayed on 7-Segment Output on the DE2 board if a is less than b.
3) 0 is displayed on 7-Segment Output on the DE2 board if a is equal to b.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy