Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Anonymous
Not applicable
119 Views

How to rectify This error?

I am designing 4-bit comparator using 2-bit comparator and made a circuit .

After running RTL stimulation Error occurs.

I don't know why this error occurs as most of the output is correct but few are wrong.

I attached the screenshot of 2-bit comparator  code and the circuit diagram of 4-bit if you find something wrong then please guide me regarding that issue.

0 Kudos
4 Replies
Highlighted
Moderator
110 Views

You have a typo in your equals logic for the 2-bit comparator.  The first term is using ~A1 when it should be ~B1.

0 Kudos
Highlighted
Anonymous
Not applicable
100 Views

Can you please rephrase and explain what you said?
0 Kudos
Highlighted
Moderator
97 Views

Not sure how to rephrase it any clearer.  Your Equal logic assignment should be:

assign Equal = (~A1)&(~A0)&(~B1)&(~B0)....etc.

0 Kudos
Highlighted
Anonymous
Not applicable
68 Views

I made correction in code as you said and now more output are correct but 2-3 are wrong still.

Please Guide me.

0 Kudos