The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> Insert and evaluate equations in Spectre.
https://designers-guide.org/forum/YaBB.pl?num=1182170876

Message started by Mosieur_Oiso on Jun 18th, 2007, 5:47am

Title: Insert and evaluate equations in Spectre.
Post by Mosieur_Oiso on Jun 18th, 2007, 5:47am

Hi all,
Is there a way to insert measurement equations in Spectre? (equations based on signals or parameters from a schematic, like MeasEqn of ADS)
To illustrate my problem, let me show you the following very basic example I tried:
1/ I wrote a simple equation in a text file, saved as function_1.scs:

simulator lang=spectre
real f_1(real a) {
   return 2*a;
}

2/ I included and enabled /home/.../function_1.scs in ADE->Setup->Model Libraries...

3/ I added the following in ADE Outputs:
      Name: p_f_1
      Expression: p_f_1 = f_1(VF("/V_1"))      [ V_1 is a net in my schematic ]
   and set Plotted/Evaluated

4/ I launched an analysis (ac in this case)

The simulation completes normally but I cannot get the p_f_1 output, and in the icfb window, I get the following errors:
*Error*   Evaluating expression ((p_f_1 = (f_1 VF("/V_1")))). [the syntax of the expression in Outputs is then changed to what is displayed here]
*Error* ("eval" 164 t nil ("*Error* eval: undefined function" f_1))

Where am I wrong?
Again, this is a very simple example I take to show the problem. Actually, I am an ADS user switching to Spectre, and I basically want to know if I can define equations in Spectre like I used to do in ADS.
Thanks for help,
Mosieur_Oiso.

Title: Re: Insert and evaluate equations in Spectre.
Post by Marq Kole on Jul 26th, 2007, 8:06am

This looks like a case where Spectre MDL might be more appropriate. I don't think what you are trying to do is possible in Spectre itself.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.