Subject: RE: [vhdl-200x] Corrections to Minutes for VHDL-200X-FT meeting,S an Jose Dec 4, 2003
From: Bailey, Stephen (SBailey@model.com)
Date: Wed Dec 17 2003 - 15:59:18 PST
Steve,
I believe you're correct in that the implicit calling/application of the conversion function is a key aspect of what makes people uncomfortable. But, it also seems that subjective opinion of what is readable and what isn't are probably the biggest problems.
We considered using a special attribute specification, but under the assumption that the conversion would still be implicitly called. For example:
type std_ulogic is ('U', ...);
attribute bool of std_ulogic:type is "FALSE, ...";
Either approach accomplishes the same thing. However, overloadable operators / functions are more general purpose as it would allow arbitrarily complex conversion algorithms. Attributes would be limited to straight-forward mappings. Therefore, the overloaded operator/function idea won the day.
If the application of the conversion is not implicit, then there is no benefit. To take the simple case:
if sl = '1' then
if std_ulogic'bool(sl) then
As you can see, this is actually a negative from the perspective of typing efficiency. Subjectively (e.g. IMHO), it also seems less readable than what we have today. So what would be the benefit?
-Steve Bailey
-----Original Message-----
From: owner-vhdl-200x@eda.org [mailto:owner-vhdl-200x@eda.org]On Behalf Of Steve Casselman
Sent: Wednesday, December 17, 2003 10:45 AM
To: vhdl-200x@eda.org
Subject: Re: [vhdl-200x] Corrections to Minutes for VHDL-200X-FT meeting,San Jose Dec 4, 2003
Isn't the problem that this conversion is an implicit one? Why not have it be explicet with a bool attribute? H'bool for example. The 'bool attribute could be defined for each type.
Steve
----- Original Message -----
From: Andy D <mailto:andy.d.jones@lmco.com> Jones
To: Jim Lewis <mailto:Jim@synthworks.com>
Cc: vhdl-200x@eda.org <mailto:vhdl-200x@eda.org>
Sent: Wednesday, December 17, 2003 7:03 AM
Subject: Re: [vhdl-200x] Corrections to Minutes for VHDL-200X-FT meeting,San Jose Dec 4, 2003
This slope is getting slippery...! First we said this would only be in conditionals, now we're going to extend it to expressions? Where will it be next? Why not just abandon strong typing altogether and "let the compiler figure out what we meant"?
This perfectly illustrates why I think it is a bad idea: when users start to ask "Why can I get away with this here, but not there?" and we don't have a good answer, then we'll be chipping more and more out of the guts of vhdl 'till it looks and functions like verilog.
Wrong direction guys!
Andy Jones
Lockheed Martin
Missiles & Fire Control
Dallas TX
andy.d.jones@lmco.com <mailto:andy.d.jones@lmco.com>
Jim Lewis wrote:
Marcus,
If we limit boolean conversion to being only applied
at the top most level then we need to provide the following
overloading to logic operators to make it generally useful:
L R return
sul bool bool
bool sul bool
bit bool bool
bool bit bool
Cheers,
Jim
Marcus Harnisch wrote:
Jim,
Jim Lewis writes:
> 2) if clk and clk'event then -- W/ the implicit boolean conversion
Did I miss anything? I was under the impression that the implicit
boolean conversion will only be wrapped around the condition. Here you
are giving an example where an implicit conversion is applied on the
left argument to "and".
Best regards,
Marcus
This archive was generated by hypermail 2b28 : Wed Dec 17 2003 - 16:01:15 PST