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.

64 bit binary comparator

Status
Not open for further replies.

Esandeep

Newbie level 4
Newbie level 4
Joined
Feb 4, 2014
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
41
can any give send me the verilog code for 64 bit binary comparator....i am doing project...
 

you want to compare what?
Code:
reg [63:0] r64bits;
assign a = h"0000000000000000"=r64bits ? 1'b1 : 1'b0; // comparator versus value 0x00;
 

can u send me detailed verilog code....i want compare A=B OR A>B OR A<B
 

Sounds like a homework question.

Are your operands signed or unsigned?

Hint: Subtract one number from the other.
 

my operands are unsigned.Actually i am doing project on "low power high performance single cycle tree based 64 bit binary comparator"...i am also having doubt that weather i should do this project in 'xilinx' or 'tanner EDA tools'.
 

So, if you subtract one number from the other, what will the result be if they are equal?

What will the carry be if one is greater than the other?
 

If,A is greater tha B than result will show AgtB will be high or A is less than B than result will shown as AltB will be high and if A is equal to B than result will show AeqB will be high...here A is compared with B.:|
 

You should read a verilog or vhdl book. Or download the verilog lrm.


Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
reg [63:0] a, b;
wire AgtB, AltB, AeqB;
 
// then the following does the comparison for A > B
assign AgtB = a > b ? 1'b1 : 1'b0;
// this compares A < B
assign AltB = a < b ? 1'b1 : 1'b0;
// this compares A = B
assign AeqB = a == b ? 1'b1 : 1'b0;



If you can't come up with the syntax for some simple compares in Verilog or even VHDL using Google, then you might as well quit school and give someone who wants to learn a chance to go to school in your place. :p
 

I had drawn schematic of comparator in tanner EDA tool .But how can i give inputs to 64bit binary comparator...
 

Tree based 64 bit binary comparator:
My tree based 64bit binary comparator will compare two binary numbers and gives us the answere which one is "bigger or equal or less" .i had drawn schematic of 8 bit comparator in tanner eda tool .by using instance of 8 bit comparator i had drawn 64 bit binary comparator.....but "my doubt is how to give inputs to 64 bit comparator" .
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top