The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 18th, 2024, 1:14am
Pages: 1
Send Topic Print
Loops in Spectre MDL (Read 3412 times)
newbspec
New Member
*
Offline



Posts: 1

Loops in Spectre MDL
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.
Back to top
 
 
View Profile   IP Logged
Scott Flinchbaugh
Junior Member
**
Offline



Posts: 14

Re: Loops in Spectre MDL
Reply #1 - 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
Back to top
 
 
View Profile flinchba   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.