OCEAN Scripting : Basic SKILL Functions


Following are some of the basic SKILL functions, that are extensively used during scripting.

ocnWaveformTool()

  • Sets the specified tool as the waveform tool for the current session
  • Syntax:
     ocnWaveformTool(s_waveformTool)

    s_waveformTool: awd or wavescan

  • Example:
     ocnWaveformTool('awd)

 


simulator()

  • Starts an OCEAN session and sets the simulator for that session
  • Syntax:
     simulator(s_simulator)

    s_simulator: spectre, spectreS, spectreVerilog, etc.,

  • Example:
     simulator('spectre)

 


design()

  • Specifies the name of the design to be simulated
  • Syntax:
     design( t_cktFile )

    t_cktFile: path-for-design-netlist

  • The name must end in netlist. Note that the netlistHeader and netlistFooter files are also needed in the same directory

Note: If you are running OCEAN within icfb or icms, you can specify lib, cell and view of the design instead of netlist.

 


resultsDir()

  • Specifies the directory where the PSF files (results) are stored
  • Syntax:
     resultsDir( t_dirName)

    t_dirName: “/home/username/simulation/design_name/spectre/schematic”

  • If you do not specify a directory with this command, the PSF files are placed in ../psf to the netlist directory
  • Example:
     resultsDir( t_dirName)

modelFile()

  • Specifies model files to be included in the simulator input file. Use of full paths for the model file is recommended by Cadence
  • Syntax:
     modelFile([g_modelFile1])

    g_modelFile1: ‘(“model-file-path” “tt”)


desVar()

  • Sets the values of design variables used in your design
  • Syntax:
     desVar( t_desVar1 f_value1 . . . [t_desVarN f_valueN])

    t_desVarN : Name of the design variable
    f_valueN : value of the design variable


    analysis()

  • Specifies the analysis to be simulated
  • Syntax:
     analysis( s_analysisType )

    s_analysisType: ‘dc, ‘tran,’ac, ‘noise , etc., [more info…]

  • For quick help type ocnHelp( 'analysis ) in ocean environment


run()

  • Starts the simulation or specifies a time after which an analysis should start
  • Syntax:
     run([analysisList])

    analysisList : ‘dc , ‘ac , ‘tran , etc,.. analyses that are possible with run command.

  • Analysis options vary, depending on the simulator you are using and analysis type you have chosen
  • Note: Use the following commands for the corresponding analysis and don’t use run().
    paramRun for parametric analyses
    cornerRun for corners analyses
    monteRun for Monte Carlo analyses
    optimizeRun for optimizations


 paramAnalysis()

 paramRun()

selectResult()

  • Selects the results from a particular analysis whose data you want to examine
  • Syntax:
     selectResult( s_resultsName [n_sweepValue] )

    s_resultName: Results from an analysis.
    n_sweepValue: The sweep value you wish to select for an analysis

  • Example :
    selectResult( ‘tran ) ; In parametric sweep, this select entire family of parametric data
    selectResult(“tran” “3.33”) ; this selects tran data corresponding to sweep value of 3.33

  • selectResult()

    • Specifies the circuit temperature
    •  temp( f_tempValue )

      f_tempValue: Temperature for the circuit


    selectResult()

    • Prints the waveforms data specified in the list of waveforms
    • Syntax:
      ocnPrint( [?output t_filename ] o_waveform1])

      If you provide a filename as the ?output argument, the ocnPrint command opens the file and writes the information to it

    • Example: ocnPrint( ?output “./myOutputFile” v(“net1”) ?precision 16 ?numberNotation ‘scientific ?from 0 ?to 0.5n ?step 0.1n )

     printf()
     fprintf()

    To print outputs on CIW window or writing to a file

Leave a Comment