Forum Discussion
Altera_Forum
Honored Contributor
13 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....
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- I will try to keep my code simple, well organized and documented and I will just trust the tool will give the optimal code. --- Quote End --- The most important part of this sentence is the "well organized and documented", along with the design fits in the device and meets timing. The "optimal code" comment is ultimately irrelevant. Who cares if your design uses 10 more logic cells than optimal? The design works and you got it complete on time - that is ultimately what people (bosses, customers, etc) will care about. I make this comment to help you focus on the important stuff :) Cheers, Dave