Re: Contributions (was Re: disallow distributed switch branches)

From: Kevin Cameron <kevin_at_.....>
Date: Fri Apr 27 2007 - 09:58:15 PDT
To back up a bit in the discussion, I'd agree "<+" is a bit odd, but 
it's not that dissimilar to "+=" in C. The only objection I had was to 
extending the summing semantic to OOMRs and between analog blocks for 
potentials, which is why I suggested using "<++" to make that case 
explicit. Likewise I would have no problem with introducing a 
non-summing operator (say "<=") if that makes it clearer to users what 
is going on, that would then probably require another operator to match 
the "<++" (say "<=+") for symmetry. Given that modelers then use "<=" 
instead of "<+", why would they expect any summing of potential 
contributions for OOMRs or between blocks when using "<="?

I think re-using operators from other languages would be a bad idea 
unless they do exactly the same thing.

Kev.

Geoffrey.Coram wrote:
> Marq -
> In most cases, though, the distinction doesn't matter:
> if you don't expect the contributions to accumulate,
> then you write your model with a single contrib and
> everything works fine; or you have multiple contribs
> of complicated expressions, and for efficienct, you
> don't want to compute the complicated expressions that
> you don't need.  It'd be odd to have
>
>   I(br) <+ (some complicated expression);
>   if (off)
>     I(br) <+ 0; //does not set branch current to zero!
>
> If it's off (the idea is that the user wanted to turn
> the current off), it seems that the user would have
> wanted to bypass the complicated expression:
>   if (off)
>     I(br) <+ 0;
>   else
>     I(br) <+ (some complicated expression);
>
>
> The curious nature of the contrib is mentioned explicitly
> in my tutorials for writing Verilog-A compact models ...
>
> -Geoffrey
>
>
>
> Marq Kole wrote:
>   
>> All,
>>
>> I would even say that most users starting to write models for Verilog-AMS are quite unaware of this. They write their models as though it were a simple assignment - only in rare cases or when they start to work on more complicated models will they start looking at the actual LRM text and discover the contribution behavior. The same goes for the implicit equations for that matter...
>>
>> Just my $0.02.
>>
>>     
>
>   


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Apr 27 09:58:31 2007

This archive was generated by hypermail 2.1.8 : Fri Apr 27 2007 - 09:58:42 PDT