Re: [vhdl-200x] [RFC] Rounding functions proposal

From: David Bishop <dbishop@eda.org>
Date: Mon May 20 2013 - 07:16:19 PDT
On 05/20/2013 10:05 AM, ryan.w.hinton@L-3com.com wrote:
> Nikolaos:
>
> I believe the resize function in fixed_pkg already provides the
> beginning of the rounding capabilities you describe.  I would rather
> expand the fixed_round_style options and then add some or all of the
> functions you describe to call resize with the appropriate
> fixed_round_style.
True.  I find that I need to use several different rounding styles in 
the same design.   I set the one I use most often as the default, then 
specify it directly in the "resize" command.
Note that all of the functions in the fixed point package expand the 
number, and thus do no rounding.
> The current enumeration handles two of the eight possibilities.  Matlab
> doesn't (directly) offer two of the eight.
>
> Floor-like functions
> CEIL         --
> FLOOR        -- fixed_round_style => fixed_truncate
> FIX          --
> toward inf   --
>
> Rounding functions
> NEAREST      --
> CONVERGENT   -- fixed_round_style => fixed_round
> ROUND        --
> toward zero  --
>
My plan was to implement the new rounding functions as described int 
IEEE-754-2008 in both fixed and floating point.    Options were made in 
the original packages to allow for more rounding modes.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon May 20 07:16:45 2013

This archive was generated by hypermail 2.1.8 : Mon May 20 2013 - 07:16:51 PDT