On Thu, 25 Jun 2015 17:49:02 -0700 (PDT), Lasse Langwadt Christensen
<
lang...@fonz.dk> wrote:
>Den fredag den 26. juni 2015 kl. 02.37.32 UTC+2 skrev John Larkin:
>> On Thu, 25 Jun 2015 17:21:17 -0700 (PDT), Lasse Langwadt Christensen
>> <
lang...@fonz.dk> wrote:
>>
>> >Den fredag den 26. juni 2015 kl. 02.04.29 UTC+2 skrev John Larkin:
>> >> If I say
>> >>
>> >> .PARAM RR=50 MX=20 RD=5000/(1.000001-1/MX)
>> >>
>> >> it executes from left to right.
>> >>
>> >> But what if I have multiple .PARAM statements, and one calculates a
>> >> value that another one uses. What order are they executed in?
>> >>
>> >
>> >does it matter?, isn't everything just expanded and substituted or what
>> >ever you want to call it?
>> >
>> >-Lasse
>>
>> Well, I could do
>>
>> .PARAM KK=4
>>
>> .PARAM JJ=KK/7
>>
>> .PARAM KK=14*(KK+MM)
>>
>> so the order matters.
>>
>
>I doubt that KK can be two values at the same time or depend on itself
>
>-Lasse
I can certainly do those equations in c or any other procedural
language, but in c the order of execution is obvious.
I assume that LT Spice compiles those expressions and executes them
often. Since I can include a node voltage or current in an expression,
it has to evaluate such equations every sim tick. It might be smart
enough to execute invariant expressions just once at startup.
I can also make a chain of behavioral voltage sources with equations
that depend on one another, and the order in which they are executed
could matter.
Some interesting experiments are suggested. I was just hoping that
someone here knew about this issue.
--
John Larkin Highland Technology, Inc
picosecond timing laser drivers and controllers