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 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] > 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 Wed Jun 23 23:18:08 2004
This archive was generated by hypermail 2.1.8 : Wed Jun 23 2004 - 23:18:15 PDT