[More typos: should have said "certainty" instead of "driven"]
I'd also like to add inheritance so that related types are identifiable. E.g. you can start with bool and add detail -
nettype (bool /* value */,,) bool_drv;
// 1,0 (strength: normal, certainty: known)
<various methods>
endnettype
nettype (,bool /* strength */,) bool_net extends bool_drv;
// adds 'Z' (bool for strength => normal or undriven)
<various methods/overrides>
endnettype
nettype (,,bool /* certainty */) logic extends bool_net;
// adds 'X' (bool for certainty => known/unknown)
<various methods/overrides>
endnettype
nettype (,enum strength,) slogic extends logic;
// adds a range of strengths (replacing bool)
<various methods/overrides>
endnettype
In this case you would expect bool_drv & bool_net to have no resolution function, but logic would have one. slogic would have a resolution function which overrides the logic one.
For wreal -
nettype (real /* value */,) real_drv;
// real-value (strength: normal, certainty: known)
<various methods>
endnettype
nettype (,bool /* strength */,) wreal extends real_drv;
// adds 'Z'
<various methods/overrides>
endnettype
nettype (,,bool certainty) wrealx extends wreal;
// adds 'X'
<various methods/overrides>
endnettype
- real_drv/wreal would not have a resolution function, wrealx would.
In a module you would use (say) bool_drv as an output, then if multiple outputs are tied together you can search up the type hierarchy for something with a resolution function (logic).
Kev.
On 03/09/2011 11:28 AM, Kevin Cameron wrote:
> typo: didn't mean to use "logic" as the second/third nettype names,
> assume "slogic" and "wreal" instead.
>
> Kev.
>
> On 03/09/2011 10:22 AM, Kevin Cameron wrote:
>> If you look back to 3-D discussions, my take on where we should go is
>> that the following kind of declaration would work -
>>
>> nettype (bool value,bool strength,bool driven) logic;
>> <various methods>
>> endnettype
>>
>> The various methods are the things that are currently implicit, e.g. the
>> default resolution function, posedge, negedge etc. You can view at as a
>> special template class, strength and driven being optional.
>>
>> The strength type would be -
>>
>> nettype (bool value,enum strength,bool driven) logic;
>> <various methods>
>> endnettype
>>
>> wreal -
>>
>> nettype (real val,,bool driven) logic; // no strength
>> <various methods>
>> endnettype
>>
>>
>> Any problems with that approach?
>>
>> Kev.
>>
>>
>>
>>
>>
>
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Mar 9 17:03:12 2011
This archive was generated by hypermail 2.1.8 : Wed Mar 09 2011 - 17:03:15 PST