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.
a**2 is the same as a*a. You need a multiplier. You cannot avoid it. writing a*a in code will instantiate a multiplier for you, whether its a hard multipler or a logic one.
Unless you're trying to build a multiplier yourself?
Here is a way which i saw somewhere
00001 + 0 = 00010 (2)
00010 + 2 (0+2) = 00100 (4)
00010 + 6 (2+4) = 01001 (9)
00100 + 12 (4+8) = 10000 (16)
00101 + 20 (8+16) = 11001 (25) ...........
Iam not saying that this can be efficiently be implemented in digital logic........(may be let the experts comment on this).......but just saw it somewhere (long back) dont remember now
so a**2 = a*a?
i see, sorry, i'm still newbie on VHDL, so i'm still learning
so basically to get a^2 i 'must' use a multiplier and there no other way to do it right?
to get the result, i've tried to use the wallace method from my senior, the result is ok, but need to improve the delay
---------- Post added at 15:46 ---------- Previous post was at 15:45 ----------
@manojkhandelwal
for the 5^2
is 00101 + 20 (4+16)?
if so, the formula for 6^2 is not right i think...
Hi,
yeah! you are right ....but multiplication of higher widths (a*a) will also have larger delays (multiplier delays also depend on the widths as far as i know).
But again iam not sure .........may be multiplication is the only best way, because all FPGA tools will synthesize it into a multiplier.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.