I am simulating a circuit block with SKILL
I wrote Desvar.il, mystimuli.scs, Simsetup.il but i do not know how to proceed with main simulation body can anybody help me?
i want power data to be displayed
Are you using ocean?
Writing SKILL code to simulatre a circuit can be done using an ocean script.
And in Analog Artist, it can generate an ocean script for you to run the simulation.
yes i am using ocean script but still you have to give stimuli and design variables as an input.
my circuit block is with 32 input i do not want to write all of them again and again in to the stimuli i think it can be done by just changing the script, i need different simulation results at different input something like 3-4 iteration you can have at a time.
I think you might need to supply a bit more detail, for example what do the files Desvar.il, mystimuli.scs, Simsetup.il contain?
You can mix core SKILL code with OCEAN code, for example using for loops and foreach or while statements. If your design is parameterized with appropriate design variables, you can change these with desVar() statements, effectively creating your own sweeps.
desVar( "Vdd" 1.0 )desVar( "Gnd" 0.0 )desVar( "Twwid" SimSetup->Twwid )desVar( "Twper" SimSetup->Twper )desVar( "A1" A1) desVar( "A2" A2)...... desVar( "A16" A16)
simulator lang=spectrevA1 (A1 0) vsouce type=pulse val0=0 val1=1.0 width=2n period=4n.....vA16 (A16 0) vsouce type=pulse val0=0 val1=...
_vVdd (Vdd! 0) vsouce type=dc dc=1.0_vGnd (Gnd! 0) vsouce type=dc dc=0.0
procedure(LogTestSetup() prog((SimSetup) SimSetup = lost(nil) SimSetup->LibName = "EXP" SimSetup->ViewName = "schematic" SimSetup->CellNameList = '("mul") SimSetup->StimFileList = '("mystimuli.scs") SimSetup->VariablesFile = "/home/../simexp/mydesvars.il" SimSetup->StimFileDir "/home/.../simexp/stimuli/" SimSetup->SpectreSimDir = "/home/.../simexp/simulation/" SimSetup->ResultsDir = "/home/.../simexp/results/" SimSetup->LogFileName = "log.txt" SimSetup->OutputFileName = "simexper_logblock.txt" SimSetup->LogFileName = strcat(SimSetup->ResultsFileDir SimSetup->LogFileName) SimSetup->OutputFileName = strcat(SimSetup->ResultsFileDir SimSetup->OutputFileName) SimSetup->PlotWaves = 0 SimSetup->Renetlist = 1 SimSetup->ParametricAnalysis = 0 SimSetup->SimStop = 50n SimSetup->A1 = '(0 1 0 1 ....) SimSetup->Twwid = 2n SimSetup->Twper = 4n return(SimSetup)))
I hope i am going in right direction from here i dont know how to create main simulation body the one with iteration and how to call above mentioned files in main body.
Aside from the typos ("lost" in SimSetup.il and, "vsouce" in mystimuli.scs) it looks as though you have some pieces of the puzzle.
You just need the core of the OCEAN script now, something like:
;; load the intialization code and call it
SimSetup = LogTestSetup()
;; setup a simulation session using OCEAN commands
simulator( 'spectre )
design( SimSetup->LibName SimSetup->CellName SimSetup->ViewName)
resultsDir( SimSetup->ResultsDir )
load( SimSetup->VariablesFile )
analysis('tran ?stop SimSetup->SimStop )
The main problem I see is that the design does not appear to be parameterized with Twwid, Twper, A1, A2 etc. I would expect to see a "parameters" statement in the spectre netlist which declares them, and later on actually see them being used in place of fixed values, e.g.
You may also want to perform your own sort of sweep or parametric analysis, e.g. use a for() or a foreach() looping construct to iterate over different values of one or more parameters.
I hope that the above helps.