sev and asi functions

Discussion in 'Cadence' started by JonDole, Nov 5, 2004.

  1. JonDole

    JonDole Guest

    Greetings everyone,

    Has anyone in this forum used the "sev" and "asi" functions to set up
    and submit a simulation to Spectre?. I was able to open a schematic, started
    Analog Artist and do some simple setup for a transient simulation. When I
    tried to shut Analog Artist down via SKILL script (sevQuit), I get the
    following error,

    *Error* slotValue: no such slot - sevSession
    *Error* slotValue: no such slot - schematic

    I am also having a difficult time trying to get to the form to turn on a
    simulation type (enable it). I have search Openbook and SourceLink and I
    could not find a way to get the value of "r_form" variable to feed to the
    following function,

    asiSetFormFieldVal( r_form s_fieldName g_value )

    I know Ocean could be used to setup a simulation but it is command prompt
    based. I would like to drive things through the GUI. Is this proposal even
    feasible?.

    Thanks in advance

    Jon
     
    JonDole, Nov 5, 2004
    #1
  2. Hello Jon,
    I have done a lot with asi functions... but I used them just to
    query all the settings of the Artist session and used it, together
    with informations from my own GUI's to write special Ocean scripts...

    It is not too difficult - 100..200 lines of code and you have your own
    ocean script compiler ;-))

    Huge advantage - Oceanscrips could be dispatched on other machines or started
    in background - your Artist session not.

    But Oceanscrips could also be loaded from icfb... just the design() command
    needs then (lib cell view) arguments...

    Greetings,
    Sylvio
     
    Sylvio Triebel, Nov 5, 2004
    #2
  3. JonDole

    Erik Wanta Guest

    Jon:
    sevQuit() is not looking for the asiSession but rather the sevSession.

    sevQuit(hiGetCurrentWindow()~>sevSession) when the ADE window is
    active seems to work.

    Note that if you have the sevSession you can get the asiSession with:
    sevEnvironment(sevSession)

    Why is there no way to to get the sevSession from the asiSession?
     
    Erik Wanta, Nov 5, 2004
    #3
  4. JonDole

    Zhiheng Cao Guest

    Could you give us some sample code to run ocean from icfb?
    All I want to do is to run simulation from schematics window in one
    step, without first creating netlist and then load a ocean script.

    Thanks.
     
    Zhiheng Cao, Nov 6, 2004
    #4
  5. JonDole

    JonDole Guest

    Erik,

    I am new to the "sev" and "asi" functions and I can't say I can
    differentiate an asiSession from a sevSession. It actually took me a while
    to figure out the difference between a "dd" object versus a "db" object.
    Cadence, unfortunately, has not include much information or examples on how
    to utilize the "asi" and "sev" functions in their documentation. It seems to
    me that these functions are, perhaps, obscure and not many people include
    them in their scripts. Using "asi" and "sev" as keyword in search engines
    reveals only minscule amount of useful information. Does anyone know other
    web links that provide more detail and perhaps sample code of these
    functions. I have tried Cadence's SourceLink and it is not much better
    there.

    Jon
     
    JonDole, Nov 6, 2004
    #5
  6. Instead of using design("/path/to/netlist") use:

    design("libName" "cellName" "viewName")

    This will renetlist as needed. Note, this only works in DFII, an dnot
    in the standalone "ocean" executable.

    Regards,

    Andrew.
     
    Andrew Beckett, Nov 8, 2004
    #6
  7. Have you looked in the Analog Design Environment SKILL manual? (can't
    remember exactly what it is called off the top of my head).

    Mind you, these functions are mainly intended for simulator
    integrators, not as a means of scripting simulations. That is what
    OCEAN is for. Is there a good reason why you can't use OCEAN?
     
    Andrew Beckett, Nov 8, 2004
    #7
  8. JonDole

    fogh Guest

    Andrew,
    Simulator integrators do not use sourcelink ? What kind of documentation comes
    with oasis ?

    It is also interesting for the end user to know how netlisting occurs. There are
    so many of these "se" "ise" "oss" "sev" "asi" "hnl" "fnl", oasis, aucore, the
    cdf matters, the distinction between sockets and direct netlisting ...
    Whenever there are documents that give an overview of how this all interacts, I
    am interested.
     
    fogh, Nov 8, 2004
    #8
  9. Hi Jon,
    to run an ocean script
    just load("/path/oceanScript")

    To create a script look at the sample code
    It is not complete (I should not put complete solutions here ;-),
    but it contains the most important parts to transfer the
    analysis setup to Ocean script.
    missing: model/input files, saveOptions, inital conditions envOptions...
    There are asi functions to query all of them.

    Greetings,
    Sylvio

    code example to generate ocean scripts:

    session = asiGetSession( mySchematicWindow )

    fprintf(oceanScript "simulator( '%s )\n\n" asiGetSimName(session))
    fprintf(oceanScript "design( %L %L %L )\n" form->libName->value form->cellName->value form->viewName->value )

    enabledAnalysisL = setof( ana asiGetAnalysisNameList(session) asiGetAnalysis(session ana)->enable)
    foreach( analysisSymb enabledAnalysisL
    analysis = asiGetAnalysis(session analysisSymb)

    cmdArgs = list(analysisSymb)

    ;;analysis field values
    foreach( item asiGetAnalysisFieldList(analysis)
    name = item~>name
    value = item~>value

    if( or( type(value) == 'string && value != ""
    value == t || value == nil
    ) then
    cmdArgs = append( cmdArgs list(concat("?" name) value) )
    )
    )

    ;;analysis option values
    foreach( option asiGetAnalysisOptionList(analysis)
    name = option->name
    value = option->value

    if( or( type(value) == 'string && value != ""
    value == t || value == nil
    ) then
    cmdArgs = append( cmdArgs list(concat("?" name) value) )
    ) ; ** if or **
    )

    tmp = substring(sprintf(nil "%L" cdr(cmdArgs)) 2)
    fprintf(oceanScript "analysis( '%s %s\n" car(cmdArgs) tmp)
    )

    ;;################ initialize design variables
    foreach( item asiGetDesignVarList(session)
    name = car(item)
    value = cadr(item)

    fprintf(oceanScript "\ndesVar( %L %L )\n" name value)
    )

    ...
     
    Sylvio Triebel, Nov 8, 2004
    #9
  10. JonDole

    JonDole Guest

    Hi Sylvio,

    Thanks for the code snipplet !. I'll start with what you have listed
    below and tailor it for my own usage. Even if I cannot get the "sev" and
    "asi" functions to do 100% of what I want, I'll make-do with whatever I can
    get. I am wondering if Cadence is considering ways for users to drive Analog
    Artist via SKILL or the Spectre simulator with Perl/shell/Tcl/Python/etc...
    scripts?. From my limited experience with Ocean, it appears to lack the kind
    of flexibility that more power scripting languages such as Perl has to
    offers (IMHO, of course).

    Jon



    form->cellName->value form->viewName->value )
    asiGetAnalysis(session ana)->enable)
     
    JonDole, Nov 9, 2004
    #10
  11. When I was looking for a way to bind netlist and run to a bindkey, my
    first stop was cdsFinder. Searched for functions containing the word
    "netlist". I then went to cdsdoc and searched for the function name,
    and in the skartistref.pdf there was not very much information on how
    to use the functions.

    As Andrew says, these functions are for integrators, but integrators
    are not users, at least not in large companies. There is a central CAD
    department somewhere that writes integration packages, but these guys
    don'f have to use their own tools. I have gathered a bit of experience
    in SKILL over the years and I find it useful to write my own snippets
    of code to make my work easier. But I find it very much frustrating
    finding the pieces of information that I need about some of the
    functions, as they are scattered across many documents.

    How about having a wiki on SKILL programming? Then some of the
    questions and answers showing up here could be gathered in a searchable
    environment with possiblitites for extensions as users get more "warm"
    on programming. I have had very good experience with wikis regarding
    knowledge sharing. It won't remove the need for comp.cad.cadence as a
    central place for questions and answers.
     
    Svenn Are Bjerkem, Nov 13, 2004
    #11
  12. JonDole

    fogh Guest

    I would be very enthusiastic about a wiki. Especially if it has the goal
    you mention: SKILL programming with an interest in
    productivity/usability improvements. But we would need some indications
    about what is OK there and what is frowned upon by CDS. It would be a
    shame to put effort in something that is not well seen because it is too
    much out of control.
    There was an initiative of a SKILL website with subscription in this
    group before. I don t know how well it worked.
     
    fogh, Nov 14, 2004
    #12
  13. The best thing would be if Cadence hosted it or arranged that one of the
    more stable designer sites out there started one.

    And more important: What implementation should be used in order to keep
    people coming back to contribute. There are so many different brands out
    there.
     
    Svenn Are Bjerkem, Nov 16, 2004
    #13
  14. Jon,

    OCEAN _is_ SKILL. It's just an API, with a set of simply named functions
    for controlling and analysing simulations. There is nothing to stop you using
    the OCEAN API in conjunction with other SKILL code. SKILL is a very rich
    and powerful language, certainly far more powerful than other scripting
    languages such as Tcl and Bourne shell, and it's a proper language rather
    than just a "scripting" language. Now Tcl and Bourne shell have their place,
    as does perl, but I would say that SKILL offers a lot of flexibility. Note, I
    don't want this to be a religous language war when I say these things; I
    program in lots of different langauges, including those you mention, and I
    recognise that some are good for particular tasks.

    The one area where perl wins over SKILL is in ascii file I/O and pattern
    matching (which is what perl was for originally, to be honest), but I do have
    a PCR in to improve the pattern matching in SKILL.

    Regards,

    Andrew.
     
    Andrew Beckett, Nov 24, 2004
    #14
  15. JonDole

    Rob W Guest

    Hey Erik,

    You probably know this already, but you can find the sevSession from
    an asiSession indirectly with the following:

    procedure( GimmeSevSessionForASISession(asiSession)
    prog( nil
    foreach( sevSession GimmeAllSevSessions()
    when( sevEnvironment(sevSession) == asiSession
    return(sevSession)
    )
    )
    return(nil)
    )
    )

    procedure( GimmeAllSevSessions()
    let( (winList sevSession sessionList)
    winList = hiGetWindowList()

    foreach( win winList

    sevSession = sevSession(win)
    when( sevSession
    sessionList = cons(sevSession sessionList)
    )
    )
    reverse(sessionList)
    )
    )


    Rob
     
    Rob W, Dec 1, 2004
    #15
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.