ad1

Showing posts with label Cadence. Show all posts
Showing posts with label Cadence. Show all posts

Tuesday, December 29, 2015

Sunday, December 27, 2015

OCEAN Script Template

;; initialization
(setq designName "./spectre/schematic/netlist/netlist")
(setq resultPath "./spectre/result")
(setq modelName "model.lib")
(setq saveFile "save.scs")
(setq corners list("ss" "ff" "tt"))


;; run script
ocnWaveformTool('wavescan )
simulator('spectre )
design(designName)
analysis(
        'tran
        ?stop "8.814u"
        ?errpreset "conservative"
)
desVar(  "VRP" 1.2 )
desVar(  "VRN" 0 )
desVar(  "AVDD12" 1.2 )
envOption(
'userCmdLineOption  "+aps +parasitics +mt=20"
)
option(
        'nthreads  "30"
        'multithread  "on"
        'temp  "85"
)
saveOption('nestlvl "1")
saveOption('save "selected")

foreach(corner corners
        resultsDir(sprintf(nil "%s/%s" resultPath corner))
        modelFile(
                list(modelName sprintf(nil "%s" corner))
                list(modelName sprintf(nil "res_%s" corner))
                list(modelName sprintf(nil "mom_%s" corner))
                list(saveFile)
        )
        paramAnalysis(
                "temp"
                ?values '(-40 -20 0 55 85 125)
        )
        paramRun()
)

winID=newWindow()
clearAll()
graphicsOff()
foreach(
        corner corners
        openResults(sprintf(nil "%s/%s" resultPath corner))
        selectResults('tran)
        (setq V VT("OUT"))
        plot(V)
)
graphicsOn()


Friday, December 25, 2015

Draw Waveform From Corner Simulation Result

winID=newWindow()
corners = list("ss" "ff" "tt")
resultPath="./opamp_stb_tb/spectre/PVT"

clearAll()

; Note: 
; graphicsOff()/graphicsOn() helps eliminates the redraw for each plot.
; When graphicsOn() is called, the completed plot appears.
graphicsOff()
foreach
        var  
        corners
        openResults(sprintf(nil "%s/%s" resultPath var))
        selectResults('stb_margin)
        plot(getData("phaseMargin"))
)
graphicsOn()

_adeCreateROF

_adeCreateROF("~")

Corner Simulation Using OCEAN

designName="blahblah/spectre/schematic/netlist/netlist"
resultPath="blahblah/spectre/PVT"
modelFileName="blahblah/model.lib"

ocnWaveformTool('wavescan )
simulator('spectre )
design(designName)
analysis(
        'stb
        ?start "1"
        ?stop "1T"
        ?dec "100"
        ?probe "/V0"
)
desVar("AVDD15" 1.5)
foreach(corner '("ss" "ff" "tt")
        resultsDir(sprintf(nil "%s/%s" resultPath corner))
        modelFile(
                list(modelFileName sprintf(nil "%s" corner))
                list(modelFileName sprintf(nil "bjt_%s" corner))
                list(modelFileName sprintf(nil "dio_%s" corner))
                list(modelFileName sprintf(nil "res_%s" corner))
        )      
        paramAnalysis(
                "temp"
                ?values '(-45 -20 60 85 125)
                paramAnalysis(
                        "AVDD15"
                        ?values '(1.35 1.5 1.65)
                )
        )
        paramRun()
)

Generate Netlist Using SKILL

simulator('spectre)
design("libName" "cellName" "schematic")
createNetlist()

Thursday, December 24, 2015

input.scs & netlist

In netlist directory, there are two files called input.scs and netlist respectively, input.scs is used by runSimulation, while the netlist file can be used in ocean script in design command
ocnWaveformTool( 'wavescan )
simulator( 'spectre )
design("xxxxxxx/spectre/schematic/netlist/netlist")
resultsDir("../prj/pll_xxxxx/spectre/schematic" )

"paMaster" Directory in simulation result directory

This directory is used from Parameter Analysis purpose. It contains an runObjFile file:
HEADER
"PSFversion" "1.00"
"Run Generator" "drlRun rev. 1.0"
"Run Time Stamp" "Dec 24 11:46:49 2015"
"date" "Dec 24 11:46:49 2015"
"simulator" "spectre"
"netlistDir" "../netlist"
"tranSST2Data" "TRUE"
TYPE
"runObject" STRUCT(
"logName" ARRAY( * ) STRING *
"parent" STRING *
"sweepVariable" ARRAY( * ) STRING *
) PROP( "key" "runObject" )
VALUE
"Root" "runObject" (
("")
""
("temp")
)
"temp=-40/psf" "runObject" (
(
"../temp=-40/psf/logFile"
"../temp=-40/psf/artistLogFile"
)
"Root"
()
) PROP(
"netlistDir" "../netlist"
"dataDir" "../temp=-40"
 "temp" -40
)
"temp=60/psf" "runObject" (
(
"../temp=60/psf/logFile"
"../temp=60/psf/artistLogFile"
)
"Root"
()
) PROP(
"netlistDir" "../netlist"
"dataDir" "../temp=60"
 "temp" 60
)
"temp=125/psf" "runObject" (
(
"../temp=125/psf/logFile"
"../temp=125/psf/artistLogFile"
)
"Root"
()
) PROP(
"netlistDir" "../netlist"
"dataDir" "../temp=125"
 "temp" 125
)

Wednesday, December 23, 2015

*Error* Could not select results from xxxx

Put runObjFile into your psf directory will solve this issue.

A sample runObjFile is like
"Run Time Stamp" "Dec 22 21:03:14 2015"
"simulator" "spectre"
"date" "Dec 22 21:03:14 2015"
"tranSST2Data" "TRUE"
"netlistDir" "../netlist"
TYPE
"runObject" STRUCT(
"logName" ARRAY( * ) STRING *
"parent" STRING *
"sweepVariable" ARRAY( * ) STRING *
) PROP( "key" "runObject" )
VALUE
"Run1" "runObject" (
(
"logFile"
"artistLogFile"
)
""
()
)
END

Tuesday, December 22, 2015

Wavescan Mode

Wavescan has two modes:

  • SKILL mode
  • SpectreMDL mode

To use SpectreMDL mode:
wavesan -expr MDL


Thursday, December 17, 2015

Circumvent "cdsinit" Calling -- use "nocdsinit" and "restore" options

You could revert to "icfb -nocdsinit -restore myInit" and then have myInit contain:

load(".cdsinit") ; get the path right
envSetVal("asimenv.startup" "simulator" 'string "spectre")

Set ADE Default Simulator

envSetVal("asimenv.startup" "simulator" 'string  "spectre")
or
envSetVal("asimenv.startup" "simulator" 'string  "ams")

Current Direction Of Spectre Simulation Result

into source or component:  positive
out of source or component: negative 

Saturday, December 12, 2015

Add Shortcut To "Unzoom" Command

Inside your .cdsinit file, add:
hiSetBindKeys("wavescan" list(
  list("None<Key>u" "graph.zoom.unzoom")
))