Forum Discussion
Altera_Forum
Honored Contributor
17 years agoImplementing Power operator
Hi, The power operator available with Verilog takes the base value 2 only !! i.e it will only perform operation: Result = 2 ** exponent. But, say if I want to take the base val...
Altera_Forum
Honored Contributor
17 years agoI would be surprised if that's possible. The power of 2 is trivial, but everything else is far from it. In general, even a simple multiply is pipelined to meet useful speeds(although many designs don't do that). A power operator would be extremely large and slow without any pipelining or feedback. And if your exponent is the variable, there's really no way build enough multipliers in parallel for whatever values that exponent could take.