Altera_Forum
Honored Contributor
12 years agoAdvantages of LPM_COMPARE vs. LPM_XOR vs. XOR when comparing two 32 bit numbers
Hi,
I need to compare two numbers in a combinational circuit. The inputs are two 32 bit numbers. The output is a single bit and should be "1" when both inputs are equal and 0 when they are not. I am using Verilog in my project There are many ways in which this can be accomplished but at this time I think I can do this in the following forms:- Using LPM_COMPARE (using the a=b output port),
- Using LPM_XOR (size 2 width 32) with its 32 bit output connected to 32 input NOR
- or with 32 XOR primitives followed by a 32 input NOR