On Sep 5, 10:50*am, blackpadme <rando...@gmail.com> wrote:
> Hi, i'm working with fixed point numbers which have two bits for no-
> fractional part (in two complement) and eight bits for fractional
> (i.e. pi/2 = *0.5703 => 00.10010010). But, what happen if i need
> signed representation for the fractional part ? 11.10010010 = -1.5703.
> What can i do if a need to represent -pi/2 and i need to work across
> division, add, multiplicacion etc. ?
>
Google for "Fixed_pkg_c.vhdl" (I think it's at vhdl.org somewhere).
This relatively new package nicely handles all the bit fiddlings
required to work with fixed point numbers...saves you the trouble of
re-inventing the wheel.
KJ
|