script for automatic spectre netlist

Discussion in 'Cadence' started by Jos, Apr 7, 2005.

  1. Jos

    Jos Guest

    Hi,

    is it possible to write a script (in skill?) which will start the
    spectre netlister?
    I would like to have a script which starts the netlister instead of
    going through the menus.

    Is it possible to force the execution of a skill script inside Cadence
    from the linux/unix command prompt? This would allow an external
    program to take 'control' over Cadence. Can this be done? When can I
    find more information on this?

    Thanks
    Jos
     
    Jos, Apr 7, 2005
    #1
  2. Jos

    S. Badel Guest

    Funny, i was thinking of doing such a thing also...
    I'm joining a script which i quickly did at the bottom of this post.
    I didn't test it toroughly, though. feel free to post comment/corrections/improvements.
    Feel free to code a gui also :)
    One way i can see i using ipcSkillProcess() to start an external process.
    when launched this way, file handles 3 and 4 of the newly created process
    are open for SKILL communication, that is, the process can send SKILL command
    to port 3 and get the output from port 4.

    in this way however, the execution is triggered from inside cadence. to do the opposite
    one has to run a "daemon" SKILL script which opens a socket, waits for commands and executes them.
    this has been discussed previously, and Andrew even posted the code to do it. see
    http://groups.google.ch/groups?selm=&rnum=3

    stéphane
    -

    this is the spectre netlist code:
    ----------------------------------------------------------------------
    procedure(
    SSNetlistSpectre(
    ;; parameters
    lib ; library name
    cell ; cell name
    view ; view name
    @key
    ( output nil ) ; file name for output netlist
    ( models nil ) ; override list of model files
    ( definitions nil ) ; override list of definition files
    ( includes nil ) ; override list of include files
    ( includePath nil ) ; override include file path
    ( stimuli nil ) ; override list of stimulus files
    ( options nil ) ; list of options to set ex: '("temp" 27 )
    ( switchViewList nil ) ; override switch view list ex: '( "spectre schematic cmos_sch ahdl" )
    ( stopViewList nil ) ; override stop view list ex: '( "spectre" "ahdl" )
    ( analyses nil ) ; list of analyses / options ex: '( dc ?saveOppoint t )
    ( variables nil ) ; list of design variables ex: '( "vdd" 1.8 "vin" "vdd/2" )
    )

    let( (fileName fileIn fileOut str)

    simulator( 'spectre )

    ;; open design
    when( !design( lib cell view )
    printf("Couldn't open design")
    return(nil)
    ) ; when

    ;; setup model files
    when( models
    apply( 'modelFile models )
    ) ; when

    ;; setup definition files
    when( definitions
    apply( 'definitionFile definitions )
    ) ; when

    ;; setup include files
    when( includes
    apply( 'definitionFile includes )
    ) ; when
    when( includePath
    apply( 'path includePath )
    ) ; when

    ;; setup stimulus files
    when( includes
    apply( 'stimulusFile stimuli )
    ) ; when

    ;; setup switch/stop view lists
    when( switchViewList
    envSetVal( "spectre.envOpts" "switchViewList" "string" switchViewList )
    ) ; when
    when( stopViewList
    envSetVal( "spectre.envOpts" "stopViewList" "string" stopViewList )
    ) ; when

    ;; setup options
    when( options
    apply( 'option options )
    ) ; when

    ;; setup analyses
    foreach( analyse analyses
    apply( 'analysis analyse )
    ) ; foreach

    ;; setup design variables, or try to get them from the cell
    if( variables
    then
    apply( 'desVar variables )
    else
    apply( 'desVar apply( 'nconc dbFindProp( ddGetObj(lib cell) "designVarList" )~>value) )
    ) ; when

    ;; create netlist
    when( fileName=createNetlist( ?display nil )
    if( output
    then
    ;; copy netlist to specified file
    fileIn = infile( fileName )
    fileOut = outfile( output )
    while( gets( str fileIn ) fprintf( fileOut "%s" str ) )
    close( fileIn )
    close( fileOut )
    view( output )
    else
    view(fileName)
    ) ; if
    ) ; when


    fileName
    ) ; let
    ) ; procedure
    ----------------------------------------------------------------------
     
    S. Badel, Apr 7, 2005
    #2
  3. Jos

    Jos Guest

    thanks for the info. Looks like exactly what I was looking for. I'll
    try it out, but don't put your hope up to much for the GUI ;--)

    Jos
     
    Jos, Apr 8, 2005
    #3
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.