Re: Proposal for two additional environment parameter functions

From: Geoffrey.Coram <geoffrey.coram_at_.....>
Date: Tue Jul 10 2007 - 08:18:25 PDT
I don't think this will work:
    if($freq > 1M) ... else

The dc op pt will be computed with $freq=0, and then the ac analysis is
performed by linearizing the circuit at the operating point, and the
if() statement does not get re-evaluated during the ac sweep.

I think Ken Kundert had some significant objections to the idea
of $freq, as well.  I've never used VPI, so I don't know anything
about vpi_get_analog_freq().

-Geoffrey


David Miller wrote:
> Hi Geoffrey,
> well yes that doesn't make a lot of sense to do that. But I can do 
> similar strange things like:
> V(out) <+ analysis("ac");
> 
> I use $freq, similar to how I use $abstime, mostly in an 'if' condition.
>   if($freq > 1M) ... else
> 
> I have also used it in $fwrite() where if I am writing out noise_table 
> values to a file I can also write out the freq that they represented.
> 
> I guess it could raise an error if used in anything other than a small 
> signal analysis, I don't really mind either way.
> 
> I also noticed that in the LRM in the "VPI routine definitions" section 
> we have a VPI routine: vpi_get_analog_freq() and thought it was useful 
> to also have a behavioural statement in $freq to do a similar thing.
> 
> Cheers...
> Dave
> 
> Geoffrey.Coram wrote:
>> David Miller wrote:
>>> Hello,
>>> I would like to propose two new environment parameter functions for 
>>> LRM 2.3
>>>
>>> 1. $freq
>>> Similar to $abstime, this function will simply return the current 
>>> frequency
>>> when doing a small-signal analysis.
>>>
>>> [LRM TEXT]
>>> $freq shall return the current frequency used of a small-signal 
>>> analysis. The
>>> function shall return zero (0) during DC or transient analysis.
>>
>> Does this make sense?  What if I did:
>>
>> V(out) <+ $freq;
>>
>> Then, during dc, I get zero, but during the ac analysis, I get 
>> something else.
>>
>> What are you really trying to do with this function?
>>
>> -Geoffrey
>>
> 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Jul 10 08:21:39 2007

This archive was generated by hypermail 2.1.8 : Tue Jul 10 2007 - 08:21:51 PDT