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 agoHi,
Sorry for late reply .. got busy with another HW problem! Well, the data represents the number of black pixels in certain zones in a binary image .. The data is an input to a neural network for classification which requires a normalized input in the range of -1 to 1! Well, i tried Kaz's method in C, the fixed point representation as displayed in hex format doesn't match the value!! What I did is multiply the floating point number by 1024 (10 bit fraction accuracy) and cast to integer .. it didn't match :S Thanks