If we were to add an extension to integer to handle metavalue inputs, the extension should also be metavalues. I would propose using values similar to those already in use for numeric_std: 'U' for unitialized and 'X' for unknown. I'm not convinced the others ('Z','H','L') have any application here. That would be the cleanest and would not break existing integer code, and would not change behavior in a detrimental way if a vendor chooses not to implement. It does put an additional processing burden on a simulator since you would have a tag that had to go with the integer indicating a metavalue, and additional checking to determine if that flag is set (and additional storage since a 32 bit register/memory location is completely occupied by the integer already. Perhaps it might make sense to introduce resolved and unresolved integer types. In order to work correctly, the 'X' would have its metavalue tag set and have a number field equal to 0 and 'U' would have the tag set and the number field equal to -2^31 so as to make an unresolved input resolve as it currently does when connected to the resolved integer type. Coffee is over-rated.....unless I haven't had mine yet. On 10/29/2014 4:34 AM, Martin.J Thompson wrote: > > Python (sorry to use it as an example again!) has the concept of > “None” which is a metavalue used for this sort of purpose. > > We could use None, Nothing, Invalid_Value, Undefined or some other > similar phrase (obviously, there’s the risk of collision with > historically code). > > The phrase “Undefined” would have some correspondence with ‘U’ in > std_logic. Hmm. Would we then make these numerical type initialise to > “Undefined” rather than type’low?? > > These are just “thoughts out loud” - typed before the first cup of tea > of the day – I’d be interested to hear comments! > > > Cheers, > Martin > > *From:* owner-vhdl-200x@eda.org [mailto:owner-vhdl-200x@eda.org] *On > Behalf Of *Daniel Kho > *Sent:* 29 October 2014 08:10 > *To:* vhdl-200x@eda.org > *Subject:* Re: EXTERNAL: Re: [vhdl-200x] Update to proposal for > arbitrary integers > > YG, Ray, all, > > On 28 October 2014 07:22, <whygee@f-cpu.org <mailto:whygee@f-cpu.org>> > wrote: > > Furthermore NaN is not the same as "X" or "U" or "Z"... > so they could create semantic problems. > > > On 28 October 2014 06:44, Ray Andraka, Andraka Consulting Group, Inc > <ray@andraka.com <mailto:ray@andraka.com>> wrote: > As such, I have a lot of heartburn calling this NaN. I think that > what you really want is the addition of metavalues to the integer type. > > Okay, I was using the term NaN just to illustrate a problem (or > problems) I have been facing again and again. It's not that I am > recommending use of this term for this purpose. I am receptive to the > use of any other suitable term (NAI - not-an-integer, perhaps) as long > as it solves this problem. > > Cheers, dan > > > -- > This message has been scanned for viruses and > dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is > believed to be clean. > > > -- > This message has been scanned for viruses and > dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is > believed to be clean. -- --Ray Andraka, P.E. President, the Andraka Consulting Group, Inc. 401/884-7930 Fax 401/884-7950 email ray@andraka.com http://www.andraka.com "They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, 1759 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Oct 29 03:53:49 2014
This archive was generated by hypermail 2.1.8 : Wed Oct 29 2014 - 03:54:03 PDT