Experiment #6 Design A 8-Bit Comparator With VHDL Comparator and Code Converter (Chapter 8)
Experiment #6 Design A 8-Bit Comparator With VHDL Comparator and Code Converter (Chapter 8)
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