Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Help me with 1 bit comparator

Status
Not open for further replies.

jianhuachews

Member level 2
Member level 2
Joined
Jun 7, 2011
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,662
[Solved] Help me with 1 bit comparator

Dear,

I want to design a 1-bit comparator using VHDL where agtb_in, aeqb_in, a and b produces bits G,E.

E =1 when aeqb_i =1 and (a=b) , else 0
G=1 when agtb_i =1 or (aeqb_i =1 and a =1 and b=0) , else 0

Could aone help me in finding a program for this design,
regards
 
Last edited:

Will this help?

Code:
entity comparator is
port (aeqb_i, agtb_i, a, b : in  STD_LOGIC;
        E, G               : out STD_LOGIC
);
end;

architecture A of comparator is 
begin
   E <='1' when aeqb_i ='1' and a=b else '0';
   G <='1' when agtb_i ='1' or (aeqb_i = '1' and a = '1' and b = '0') else '0';
end architecture
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top