loading ADE state from skill

  • Thread starter Jonno loves Apple Pie
  • Start date
J

Jonno loves Apple Pie

Guest
I am writing a cadence addon tool (for internal use) that runs corner
simulations in ADE and plots to an excel format -> I intend this tool
to be much like Parametric Analysis... tool with the addition of being
able to load states (containing model information).

sevLoadState() will bring up a dialog window, so is not applicable
here. The internal functions sevLoadStateFromName() and
sevLoadStateFromField() return nil without any error messages. I
believe the required inputs are: sevLoadStateFromName(session
allComponentDefs lib cell simulator name loadComponentFunct). Is this
correct?

If I change the value to a cell which does not exist I get an error
message saying the cell does not exist, so I believe my formatting is
correct... Can anyone help with this issue? Is there an easier way to
load ADE state information from skill?

Thanks in advance.
Jonathan
 
On Dec 19, 11:27 am, Jonno loves Apple Pie <jonathantomp...@gmail.com>
wrote:
I am writing a cadence addon tool (for internal use) that runs corner
simulations in ADE and plots to an excel format -> I intend this tool
to be much like Parametric Analysis... tool with the addition of being
able to load states (containing model information).

sevLoadState() will bring up a dialog window, so is not applicable
here. The internal functions sevLoadStateFromName() and
sevLoadStateFromField() return nil without any error messages. I
believe the required inputs are: sevLoadStateFromName(session
allComponentDefs lib cell simulator name loadComponentFunct). Is this
correct?

If I change the value to a cell which does not exist I get an error
message saying the cell does not exist, so I believe my formatting is
correct... Can anyone help with this issue? Is there an easier way to
load ADE state information from skill?

Thanks in advance.
Jonathan
I have not worked with the functions you mention, but as far as I know
you do have to get a bit hacky (though I think V6 has a SKILL function
to load a state).

If you save states as cell views you can open an ADE session with a
state loaded by using ddsServOpen(library cell state "edit").

If you want to load a state into your current ADE session you can try
manipulating the load state form object. Here is an example. It is
fairly unstable, but hopefully it gives you some ideas and you will be
able to do what you need to do.

procedure(myHackLoadState(session state)
;; session -> sev session object - example, sevSession
(hiGetCurrentWindow())
;; state -> String of a state name saved as a cell view.
let(( form)
form = sevForm(session 'load)
when( null(form)
;; Form does not exist, so create it by opening and immediately
closing
;; the form. The form object remains accessible so this only
executes once
;; per ADE session.
hiRegTimer( sprintf(nil "hiFormCancel(sevLoadForm%d)" session-
number) 0)
sevLoadState(session)
form = sevForm(session 'load)
)
;; Chose state from cell view
form->optionCellView->value = "Cellview"
form->stateName->value = state
hiFormDone( form )
) ; ** let **
)

Joel
 
Joel,

Thank you for the reply. I had issues with using the sev functions
"asynchronously"; that is on some icfb builds I could call sevLoadState
() and then code after this call would execute. However, on some
builds the skill code would pause until the load form was closed.
Because of this I can't rely on 90% of the sev functions.

The load form is built only once and then exists in the sev_session-
loadForm thereafter. I considered making it mandatory for the user
to run the load form at least once and then the above code would
execute from then on, but I found this janky.

Here's what I did instead:

-----------------------------------------------------------------------

curDes = asiGetDesignCellName(session)
curLib = asiGetDesignLibName(session)
desiredState = symbolToString('mystate)
curStateID = ddGetObj(curLib curDes desiredState)
curStatePath = ddGetObjReadPath(curStateID)
curStatePath = strcat(curStatePath "/modelSetup.state")
curModels = pvtGetModelInfo(curStatePath)
asiSetEnvOptionVal(session "modelFiles" curModels)


Then:

/***************************************************************
* pvtGetModelInfo() *
* Debug Function *
***************************************************************/
procedure(pvtGetModelInfo(file)
prog((filep rdLine string modelFiles)

when(!isFile(file)
error("unable to open %s" file)
) ; when

;get input file port
filep=infile(file)

;error out if can't open file port
when(!filep
error("unable to open %s" file)
) ; when

string="modelFiles = '"
while(gets(rdLine filep)
string=strcat(string rdLine)
) ; while

loadstring(string)

return(modelFiles)

);end prog
);end procedure


-----------------------------------------------------------------------

So I never actually load the state but instead replace the current
session's model info with what I found in the saved file. It's a
little crappy but as long as you check for the file beforehand it
works ok...

Looking forward to V6 cadence and when vendors get compatible model
libraries!

Cheers mate,
Jonathan
 

Welcome to EDABoard.com

Sponsor

Back
Top