How to write all dc operating point data from the simulation

Hi Raid,

Thank you for your help, the loop work great! However, I still have a
minor model path problem in the loop, my spice models are as
following:

"/data/........./Spectre/L35_33.scs" "tt" ;(for MOS)
"/data/ ........./Spectre/Res.scs" "typ" ;(for resistor)
"/data/ ........./Spectre/...... ;(for caps)


I follow you code, then I write:

mySpiceMoelsPath="/data/........./Spectre/L35_33.scs"
myCornersList=list("typ" "FF" "SS" "FS" "SF")
.....

foreach( myCorner myCornersList
sprintf( myModel "%s%s" mySpiceMoelsPath myCorner )
path(myModel)


after that, the MOS model library cannot be found during simulation.
What's wong is it ? Thank you again!

On Mar 1, 12:56 am, Riad KACED <riad.ka...@gmail.com> wrote:
Hi Eric,

I'm pretty sure there is a clever way to do this job.
I'm proposing a solution here but I can't guarantee it is the best
one.

The idea is to create lists for each thing you want to sweep and the
run it within nested foreach instructions.
Skill works very well with lists.

these are bits of codes you can use in your script.
You can find lots of examples about ocean scripting in your Cadence
install dir :
your_install_dir/tools/dfII/samples/artist/OCEAN

mySpiceMoelsPath="YOUR_PATH/"
myCornersList=list("typ" "FF" "SS" "FS" "SF")
myVinList=list(2.7 3 3.6)
myTempList=(105 27 -25)

and then run your design with netsed foreach loops, something like

; 1st loop for temprature sweep
foreach( myTemp myTempList
   temp( myTemp )
   ;; Add what you want to add

   ; 2nd loop for corner sweep
   foreach( myCorner myCornersList
      sprintf( myModel "%s%s" mySpiceMoelsPath myCorner ) ; This is an
example
      path(mymodel) ; This is an example
      ;; Add what you want to add

      ; 3rd loop for voltage sweep
      foreach( myVin myVinList
         desVar("vin" myVin) ; This is an example
         ;; Your core functions
         run() ; This is an example
         ;; Other stuffs if needed
      ); myTemp
   ); myCorner
); myVin

Good luck and enjoy your Week End !

Riad.
 
Hi,

I put my proposal in a separate post:
Please look at :
http://groups.google.com/group/comp.cad.cadence/browse_thread/thread/b22fbdb40d339b2b/

Riad.
 
Hi Riad,

It is really helpful to look at the examples in the Cadence stream.
Thank you for your reply and recommendation.

On the other hand, I would like to have some example for the skill
script. I want to modify the width of all pmos and nmos cell to their
double in the opened schematic. How could it be done ?

Thank you again!
Eric


On Mar 6, 2:18 am, Riad KACED <riad.ka...@gmail.com> wrote:
Hi Eric,

Yes indeed, it does not work since my corner file is slightly
different from yours.
In your case, I would advice the use of the corner analysis commands :
cornerDesVar/cornerMeas/cornerRun ...
Please look at the Cadence ocean documentation, Chapter 11 Advanced
Analysis.
As I mentioned above, a good example of using these functions is given
in your Cadence install dir :
your_install_dir/tools/dfII/samples/artist/OCEAN/cornersTool.

1. You have to define the "modelFile" in your main ocean script :
modelFile(
    '("/data/........./Spectre/L35_33.scs" "tt")
   '("/data/ ........./Spectre/Res.scs" "typ")
....
)
2. Create a corner analysis set in a .pcf file, something like (That's
an example of the .pcf file from the Cadence Examples):
; File starts here
corAddProcess( "multipleModelLib" "./CORNERS/multipleModelLib"
'multipleModelLib )
corAddProcessVar( "multipleModelLib" "vdd" )
corAddProcessVar( "multipleModelLib" "vss" )
corAddDesignVar( "Cload" )
corAddGroupAndVariantChoices( "multipleModelLib" "pmosLib.scs"
'("slow" "nom" "fast") )
corAddGroupAndVariantChoices( "multipleModelLib" "nmosLib.scs"
'("slow" "nom" "fast") )

corAddCorner( "multipleModelLib" "slowslow" )
corSetCornerGroupVariant( "multipleModelLib" "slowslow" "nmosLib.scs"
"slow" )
corSetCornerGroupVariant( "multipleModelLib" "slowslow" "pmosLib.scs"
"slow" )
corSetCornerNomTempVal( "multipleModelLib" "slowslow" 27 )
corSetCornerRunTempVal( "multipleModelLib" "slowslow" 125 )
corSetCornerVarVal( "multipleModelLib" "slowslow" "Cload" "260f" )
corSetCornerVarVal( "multipleModelLib" "slowslow" "vss" "-2.7" )
corSetCornerVarVal( "multipleModelLib" "slowslow" "vdd" "2.7" )
....
.....
; File ends here

FYI, file nmosLib.scs looks like :
; File starts here
library pmosLib
section nom
include "../pmos/typ/pmos.scs"
endsection
section fast
include "../pmos/fast/pmos.scs"
endsection
endlibrary
; File ends here

2. You have then to load your .pcf file into your main ocean script :
loadPcf( "myPath/myPcfFile.pcf" )

3. Run the corner analysis from your main ocean script:
cornerRun()

Give it a try like this and it should work.
Please look at the examples in your Cadence stream, they are very
helpful !

Riad.
 
Hi Eric,

Yes indeed, it does not work since my corner file is slightly
different from yours.
In your case, I would advice the use of the corner analysis commands :
cornerDesVar/cornerMeas/cornerRun ...
Please look at the Cadence ocean documentation, Chapter 11 Advanced
Analysis.
As I mentioned above, a good example of using these functions is given
in your Cadence install dir :
your_install_dir/tools/dfII/samples/artist/OCEAN/cornersTool.

1. You have to define the "modelFile" in your main ocean script :
modelFile(
'("/data/........./Spectre/L35_33.scs" "tt")
'("/data/ ........./Spectre/Res.scs" "typ")
.....
)
2. Create a corner analysis set in a .pcf file, something like (That's
an example of the .pcf file from the Cadence Examples):
; File starts here
corAddProcess( "multipleModelLib" "./CORNERS/multipleModelLib"
'multipleModelLib )
corAddProcessVar( "multipleModelLib" "vdd" )
corAddProcessVar( "multipleModelLib" "vss" )
corAddDesignVar( "Cload" )
corAddGroupAndVariantChoices( "multipleModelLib" "pmosLib.scs"
'("slow" "nom" "fast") )
corAddGroupAndVariantChoices( "multipleModelLib" "nmosLib.scs"
'("slow" "nom" "fast") )

corAddCorner( "multipleModelLib" "slowslow" )
corSetCornerGroupVariant( "multipleModelLib" "slowslow" "nmosLib.scs"
"slow" )
corSetCornerGroupVariant( "multipleModelLib" "slowslow" "pmosLib.scs"
"slow" )
corSetCornerNomTempVal( "multipleModelLib" "slowslow" 27 )
corSetCornerRunTempVal( "multipleModelLib" "slowslow" 125 )
corSetCornerVarVal( "multipleModelLib" "slowslow" "Cload" "260f" )
corSetCornerVarVal( "multipleModelLib" "slowslow" "vss" "-2.7" )
corSetCornerVarVal( "multipleModelLib" "slowslow" "vdd" "2.7" )
.....
......
; File ends here

FYI, file nmosLib.scs looks like :
; File starts here
library pmosLib
section nom
include "../pmos/typ/pmos.scs"
endsection
section fast
include "../pmos/fast/pmos.scs"
endsection
endlibrary
; File ends here

2. You have then to load your .pcf file into your main ocean script :
loadPcf( "myPath/myPcfFile.pcf" )

3. Run the corner analysis from your main ocean script:
cornerRun()

Give it a try like this and it should work.
Please look at the examples in your Cadence stream, they are very
helpful !

Riad.
 

Guest
Hi!

How do you print dc operating point data of all components (Mxx) from
the simulation result ?

for example :
the output of

temp = pv("/I0/M0" "vds" ?result "dcOpInfo-info")
printf("The vds is %3.6f\n" temp)

only print the vds of /I0/M0

How can I write a loop to display all /Ixx/Mxx ?

Thanks, Eric
 
Hi Eric,

These are some examples I have already experienced with ocean :

selectResults('tranOp)
dataTypes()
==> It will print the following in my case :
("bsim3v3" "capacitor" "inductor" "isource" "resistor" "vsource")

Which means that my design contains devices of type "bsim3v3"
"capacitor" "inductor" ....
That's the same info you get from spectre within the 'Circuit
Inventory' in the Log file:

If I type the following :

outPort = outfile("./MyRkResults.txt")
report(?output outPort ?type "bsim3v3" )
this will dump all the OP points for all the bsim3v3 devices into the
file MyRkResults.txt. The outputs looks like :

Type : bsim3v3
/I0/M0
ids = 818.7p isub =
144.4z vgs = 531.8m
vds = 1.268 vbs =
-923.4m vgb = 1.455
vdb = 2.191 vgd =
-735.7m vth = 1.004
vdsat = 59.27m vfbeff =
nan gm = 22.59n
gds = 522.9p gmbs =
4.665n betaeff = 40.94m
cjd = 82.67f cjs =
99.04f qb = -115.3f
qg = 113f qd =
11.8f qbd = -216.5f
qbs = -102.6f cgg =
66.55f cgd = -15.77f
cgs = -19.47f cgb =
-31.31f cdg = -16.91f
cdd = 15.78f cds =
1.361f cdb = -232.9a
csg = -19.15f csd =
-27.21a css = 19.53f
csb = -349.3a cbg =
-30.49f cbd = 18.93a
cbs = -1.419f cbb =
31.89f ron = 1.548G
id = 818.7p is =
-818.7p ibulk = -616.6a
ibs = -308.2a ibd =
-308.4a pwr = 1.038n
gmoverid = 27.6 cgsovl =
17.49f cgdovl = 15.8f
cgbovl = 93.2a i1 =
818.7p i3 = -818.7p
i4 = -616.6a gbd =
3.129a gbs = 0
vgsteff = 452.2n qinv =
254.3u igd = 0
igs = 0 igb =
0 igcs = 0
igcd = 0 region =
0 reversed = 0
type = 0

/I0/M1 .....
..............

If for example you are interested in a given parameter for all
devices, you can try something like

report(?output outPort ?type "bsim3v3" ?param "vth")

Will print :

Type : bsim3v3

/I0/M0 : vth = 1.004
/I0/M1 : vth = 1.014
/I0/M2 : vth = 836.7m
/I0/M3 : vth = 836.7m

I think you can even use : report(?output outPort ?type "bsim3v3" ?
param '("vth" "vgs" "ids")) if you want to print a list of parameters.

Hope this will Help ....

Any other ideas folks ?

Riad KACED.

chankamh...@gmail.com wrote:
Hi!

How do you print dc operating point data of all components (Mxx) from
the simulation result ?

for example :
the output of

temp = pv("/I0/M0" "vds" ?result "dcOpInfo-info")
printf("The vds is %3.6f\n" temp)

only print the vds of /I0/M0

How can I write a loop to display all /Ixx/Mxx ?

Thanks, Eric
 
Hi Riad,

Thank you for for great help !

I would also like to ask if I want to do some calculate becore
printing out the result, what should I do ?
What I want to do is calculate (vgs-vth) and (vds-vdsat) then check
them >100mV or not,
I want to print the device that without enough margin only.

Also, I am doing the simulation with different corners. I need to copy
the code again and again in the ocean file for all that corner.
For example: (ss tt ff) x (2.7V 3V 3.6V) x (105oC 27oC -25oC) they
are 27 pieces of code, any other clever way to do so ?

Thanks again!

On Feb 28, 9:28 pm, Riad KACED <riad.ka...@gmail.com> wrote:
Hi Eric,

These are some examples I have already experienced with ocean :

selectResults('tranOp)
dataTypes()
==> It will print the following in my case :
("bsim3v3" "capacitor" "inductor" "isource" "resistor" "vsource")

Which means that my design contains devices of type "bsim3v3"
"capacitor" "inductor" ....
That's the same info you get from spectre within the 'Circuit
Inventory' in the Log file:

If I type the following :

outPort = outfile("./MyRkResults.txt")
report(?output outPort ?type "bsim3v3" )
 this will dump all the OP points for all the bsim3v3 devices into the
file MyRkResults.txt. The outputs looks like :

Type : bsim3v3
/I0/M0
         ids    = 818.7p                  isub    > 144.4z                   vgs    = 531.8m
         vds    = 1.268                    vbs    > -923.4m                  vgb    = 1.455
         vdb    = 2.191                    vgd    > -735.7m                  vth    = 1.004
       vdsat    = 59.27m                vfbeff    > nan                       gm    = 22.59n
         gds    = 522.9p                  gmbs    > 4.665n               betaeff    = 40.94m
         cjd    = 82.67f                   cjs    > 99.04f                    qb    = -115.3f
          qg    = 113f                      qd    > 11.8f                    qbd    = -216.5f
         qbs    = -102.6f                  cgg    > 66.55f                   cgd    = -15.77f
         cgs    = -19.47f                  cgb    > -31.31f                  cdg    = -16.91f
         cdd    = 15.78f                   cds    > 1.361f                   cdb    = -232.9a
         csg    = -19.15f                  csd    > -27.21a                  css    = 19.53f
         csb    = -349.3a                  cbg    > -30.49f                  cbd    = 18.93a
         cbs    = -1.419f                  cbb    > 31.89f                   ron    = 1.548G
          id    = 818.7p                    is    > -818.7p                ibulk    = -616.6a
         ibs    = -308.2a                  ibd    > -308.4a                  pwr    = 1.038n
    gmoverid    = 27.6                  cgsovl    > 17.49f                cgdovl    = 15.8f
      cgbovl    = 93.2a                     i1    > 818.7p                    i3    = -818.7p
          i4    = -616.6a                  gbd    > 3.129a                   gbs    = 0
     vgsteff    = 452.2n                  qinv    > 254.3u                   igd    = 0
         igs    = 0                        igb    > 0                       igcs    = 0
        igcd    = 0                     region    > 0                   reversed    = 0
        type    = 0

/I0/M1 .....
.............

If for example you are interested in a given parameter for all
devices, you can try something like

report(?output outPort ?type "bsim3v3" ?param "vth")

Will print :

Type : bsim3v3

/I0/M0 : vth    = 1.004
/I0/M1 : vth    = 1.014
/I0/M2 : vth    = 836.7m
/I0/M3 : vth    = 836.7m

I think you can even use : report(?output outPort ?type "bsim3v3" ?
param '("vth" "vgs" "ids")) if you want to print a list of parameters.

Hope this will Help ....

Any other ideas folks ?

Riad KACED.



chankamh...@gmail.com wrote:
Hi!

How do you print dc operating point data of all components (Mxx) from
the simulation result ?

for example :
the output of

temp = pv("/I0/M0" "vds" ?result "dcOpInfo-info")
printf("The vds is %3.6f\n" temp)

only print the vds of /I0/M0

How can I write a loop to display all /Ixx/Mxx ?

Thanks, Eric- Hide quoted text -

- Show quoted text -
 
Hi Riad,

Thank you for for great help !

I would also like to ask if I want to do some calculate becore
printing out the result, what should I do ?
What I want to do is calculate (vgs-vth) and (vds-vdsat) then check
them >100mV or not,
I want to print the device that without enough margin only.

Also, I am doing the simulation with different corners. I need to copy
the code again and again in the ocean file for all that corner.
For example: (ss tt ff) x (2.7V 3V 3.6V) x (105oC 27oC -25oC) they
are 27 pieces of code, any other clever way to do so ?
You can easily iterate using the outputs() function, as in

foreach( device outputs(?result "dcOpInfo")
vgs_vth = OP(device "vgs") - OP(device "vth")
;; etc...
)



Stéphane
 
Hi Eric,

I'm pretty sure there is a clever way to do this job.
I'm proposing a solution here but I can't guarantee it is the best
one.

The idea is to create lists for each thing you want to sweep and the
run it within nested foreach instructions.
Skill works very well with lists.

these are bits of codes you can use in your script.
You can find lots of examples about ocean scripting in your Cadence
install dir :
your_install_dir/tools/dfII/samples/artist/OCEAN

mySpiceMoelsPath="YOUR_PATH/"
myCornersList=list("typ" "FF" "SS" "FS" "SF")
myVinList=list(2.7 3 3.6)
myTempList=(105 27 -25)

and then run your design with netsed foreach loops, something like

; 1st loop for temprature sweep
foreach( myTemp myTempList
temp( myTemp )
;; Add what you want to add

; 2nd loop for corner sweep
foreach( myCorner myCornersList
sprintf( myModel "%s%s" mySpiceMoelsPath myCorner ) ; This is an
example
path(mymodel) ; This is an example
;; Add what you want to add

; 3rd loop for voltage sweep
foreach( myVin myVinList
desVar("vin" myVin) ; This is an example
;; Your core functions
run() ; This is an example
;; Other stuffs if needed
); myTemp
); myCorner
); myVin


Good luck and enjoy your Week End !

Riad.
 

Welcome to EDABoard.com

Sponsor

Back
Top