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.

== vs >= : area wise

Status
Not open for further replies.

suquid29

Junior Member level 2
Junior Member level 2
Joined
May 2, 2008
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,437
Hi
I was wondering what is the different, area wise, between >= and ==.

Lets say I want to start switch state in FSM (verilog, asic) with the condition cntr_t >= 4'h8.
(the counting is with a bit faster clock, so in the edge I'm checking it, it sometimes will be 8 and sometimes 9; there is sync).

Isn't it better to check only one bit with == ? (e.g cntr_t[3]==1'b1)

In general, how can I estimate area of different implementation of verilog code?
Is there some online tool?

I have synthesis tools, but its a big core ...

Thanks!
 

'==' can be implemented with an XOR gate between each corresponding bit of two values we are comparing. If we are comparing 3-bit values . Then we can do that by 3 (2 input XOR) and 1 (3 input NOR). If the output of the NOR is 1 means, those two 3-bit values are equal else not equal.

'>=' implementation need more gate than the implementation for '==' I described above. As the implementation output needs to be true for both '==' and '>' condition.
 
A synthesis tool can be expected to remove redundant bits from a comparison. In so far both expressions (cntr_t >= 4'h8) and (cntr_t[3] == 1'b1) should end up in the same gate level logic. I would prefer the comparison for it's better readability.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top