Re: problem with numeric_bit


Subject: Re: problem with numeric_bit
From: Tim McBrayer (tmcbraye@innoveda.com)
Date: Thu Oct 18 2001 - 08:48:02 MDT


On Thu, Oct 18, 2001 at 04:28:03PM +0200, Colin Marquardt wrote:
> Tim McBrayer <tmcbraye@innoveda.com> writes:
>
> > On Thu, Oct 18, 2001 at 04:50:14PM +0300, Tuukka Toivonen wrote:
> > > On Thu, 18 Oct 2001, Colin Marquardt wrote:
> >>
> >> >Tuukka Toivonen <tuukkat@ees2.oulu.fi> writes:
> >> >> It looks I finally found the exact line which causes this, it is
> >> >> constant NAU: UNSIGNED(0 downto 1) := (others => '0');
> >> >
> >> >You probably wanted
> >> > constant NAU: UNSIGNED(1 downto 0) := (others => '0');
> >>
> >> No, I didn't. That code is *official* from IEEE, not written by me.
> >> It is *standard*.
> >
> > Right. This is the standard's definition for a null range for an UNSIGNED
> > vector. It's that way on purpose, and is legal VHDL.
>
> Ah, I didn't realize this was from a package (numeric_bit?)...

Yes, sorry. For completeness, NAS and NAU are defined in IEEE
1076.3-1997, IEEE Standard VHDL Synthesis Packages. They exist
independently in the package body for both NUMERIC_BIT and NUMERIC_STD,
and are defined as follows (although copyrighted, I believe this excerpt
should fall under 'fair use'):

  -- null range array constants

  constant NAU: UNSIGNED(0 downto 1) := (others => '0');
  constant NAS: SIGNED(0 downto 1) := (others => '0');

These constants are used as return values from the functions included in
these packages (e.g. function "+"), if the user passes in a null range
vector.

-- 
Tim McBrayer                                          (508) 303-5333
Engineering Manager, Simulation            contact me for my PGP key
Innoveda Inc.                                 tmcbrayer@innoveda.com



This archive was generated by hypermail 2b25 : Mon Mar 18 2002 - 13:00:02 MST