RE: [vhdl-200x-ft] RE: Problem with FT04

From: Bailey, Stephen <SBailey@model.com>
Date: Thu Jun 24 2004 - 08:12:23 PDT

Minimum and Maximum seem a bit overkill, but if there's no other acceptable option then they'll do.

As an option, how about a single letter prefix or suffix? Suggestions:

  - minm, maxm
  - mmin, mmax

-Steve Bailey

> -----Original Message-----
> From: owner-vhdl-200x-ft@eda.org
> [mailto:owner-vhdl-200x-ft@eda.org <mailto:owner-vhdl-200x-ft@eda.org> ] On Behalf Of Peter Ashenden
> Sent: Thursday, June 24, 2004 12:18 AM
> To: dbishop@vhdl.org; 'Jim Lewis'
> Cc: vhdl-200x-ft@eda.org
> Subject: [vhdl-200x-ft] RE: Problem with FT04
>
> David,
>
> Aargh! I forgot about that. Actually, min is not a reserved
> word; it is a declared name. Hence, it is a homograph of the
> function named min. That's why you get the used-name
> conflict error: one use from std.standard and the other from
> ieee.numeric_std.
>
> I'd suggest the resolution is to choose different names for
> min and max.
> Maybe minimum and maximum, though they're harder to type.
> Any other suggestions?
>
> Cheers,
>
> PA
>
> --
> Dr. Peter J. Ashenden peter@ashenden.com.au
> Ashenden Designs Pty. Ltd. www.ashenden.com.au <www.ashenden.com.au>
> PO Box 640 Ph: +61 8 8339 7532
> Stirling, SA 5152 Fax: +61 8 8339 2616
> Australia Mobile: +61 414 70 9106
>
>
> > -----Original Message-----
> > From: David Bishop [mailto:dbishop@vhdl.org <mailto:dbishop@vhdl.org> ]
> > Sent: Thursday, 24 June 2004 02:20
> > To: Jim Lewis; Peter Ashenden
> > Subject: Problem with FT04
> >
> >
> > In testing I hit the following:
> >
> > Part of the FT04 proposal is the following function:
> >
> > function min (L, R: T) return T;
> >
> > Seems simple enough. In numeric_std I overload these for
> "signed" and
> > "unsigned". Then I hit this
> >
> > In package standard:
> >
> > type time is range -2147483647 to 2147483647
> > units
> > fs;
> > ps = 1000 fs;
> > ns = 1000 ps;
> > us = 1000 ns;
> > ms = 1000 us;
> > sec = 1000 ms;
> > min = 60 sec;
> > hr = 60 min;
> > end units;
> >
> > Making "min" a reserved word! So, I tried the following:
> >
> > constant delay : time := 1 min; -- one minute delay
> > begin
> > z := min (x,y)
> >
> > and it gave me the following:
> >
> > WARNING: test_minmax.vhd(19): Making two objects with the
> name "min"
> > directly visible via use clauses results in a conflict,
> neither object
> > is made directly visible.(LRM Section 10.4)
> > ** Error: test_minmax.vhd(19): Bad physical unit
> > ** Error: test_minmax.vhd(19): Type conflict in integer
> literal. Type
> > time versus integer.
> > WARNING: test_minmax.vhd(27): Making two objects with the
> name "min"
> > directly visible via use clauses results in a conflict,
> neither object
> > is made directly visible.(LRM Section 10.4)
> >
> >
> > --
> > David W. Bishop dbishop@vhdl.org All standard
> disclaimers apply.
> >
>
>
Received on Thu Jun 24 08:12:31 2004

This archive was generated by hypermail 2.1.8 : Thu Jun 24 2004 - 08:12:33 PDT