Forum Discussion
Altera_Forum
Honored Contributor
15 years agoNumber Scaling
Hi, What is the most efficient way to scale numbers into the range of -1, 1 in Verilog using Cyclone II? That is the fastest code with least resources? are there any free IP cores from Altera o...
Altera_Forum
Honored Contributor
15 years agofor 10 bit fraction use this:
y = x * (2^11-1)/579 - 2^10 the term (2^11-1)/579 = 3.53540..... to reduce error multiply this fraction by 2^13 => 28962 then discard 13 lsb and then subtract 1024 from result