The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Simulators >> Circuit Simulators >> Loops in Spectre MDL https://designers-guide.org/forum/YaBB.pl?num=1208799887 Message started by newbspec on Apr 21st, 2008, 10:44am |
Title: Loops in Spectre MDL Post by newbspec on Apr 21st, 2008, 10:44am I'm new to Spectre and want to do a binary search using MDL. I'd like change a the input period on each call to trans. Can I do this in Spectre MDL? Are statements like for, while and until available in MDL? The following flags the "for" as an invalid statement in MDL. for (insig=500; insig<800; insig=insig+100) { run timedelay as theparms } Thank you. |
Title: Re: Loops in Spectre MDL Post by Scott Flinchbaugh on Apr 21st, 2008, 3:37pm newbspec, You should read the SpectreMDL User Guide to get more familiar with the SpectreMDL syntax. The for, while and until are not supported. To iterate over a variable using MDL there is a "foreach" statement. To implement your for loop you should do the following: foreach insig from swp( start=500, stop=800, step=100 ) { run timedelay as theparms } Alternatively, you can also explicitly state the parameter values as follows: foreach insig from { 500, 600, 700, 800 } { run timedelay as theparms } There is also a binary search and multiple variable search (optimization) capability in SpectreMDL, please review the reference manual for more information on them. Examples are provided. Thanks, sflinch |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |