Presumed you represent log (2) by a 8-Bit number (natural or decadic logarithm, by the way?), the product of 8-Bit exponent and and log(2) will be a 16-Bit number.I need to represent the values of the above equation in vhdl (256 entries) using 8 bits only.
Besides other ambiguities in your post, what does this mean:
Presumed you represent log (2) by a 8-Bit number (natural or decadic logarithm, by the way?), the product of 8-Bit exponent and and log(2) will be a 16-Bit number.
A fixed point representaion isn't but applying an arbitrary binary shift. E.g. log10(2)=0.30103. You get the best fixed point representation by a 9-Bit shift:
to_unsigned(to_integer(0.30103*2.0**9),8) = 154
As in what I meant was, if a=(log(2) * exponent) than a will be having 256 different values as the exponent varies from 0 to 255..and the log(2) is constant.
So for example when exponent is 1 than a=0.3010299957 this value needs to be represented in 8 bits I.e. 0.01001101000... Hence if you cut it down to 8 bits you get 0.0100110..now how can I represent this value? On top of that the value will be changing for example when exponent is 10, a=3.010299957 I.e. 11.000000..again this would not agree with specified no bits for a e.g. (-3 to 4)
Hope that makes it clearer.
You don't necessarily need a text file. All constants that can be represented by arithmetic functions, e.g. log(), can be calculated in VHDL at compile time using ieee.math_real.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?