Home > Community > Forums > RF Design > Interfacing Spectre Parametric analysis result to MATLAB in command.

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Interfacing Spectre Parametric analysis result to MATLAB in command. 

Last post Wed, Jun 27 2012 7:32 AM by RFQuery. 7 replies.
Started by RFQuery 07 May 2012 04:21 AM. Topic has 7 replies and 4898 views
Page 1 of 1 (8 items)
Sort Posts:
  • Mon, May 7 2012 4:21 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 88
    • Points 1,250
    Interfacing Spectre Parametric analysis result to MATLAB in command. Reply

    Dear All,

    I was trying to plot the swept DC operating points of a MOS transitor with changing some parameters of the MOS. Like I swept the Vgs of MOS and did the parametirc run on 'Length' of the MOS. (Prametric run was done by going to Tools-->Parametric Analysis).

    I was able to plot the parametrically swept curves by using Result Browser of ADE like ploting Id vs Vgs for different length of the transistors. But I want to plot them in MATLAB and further process the DC operating point data. I was not able to do this in MATLAB using cdsrr() command.

    However using the way Mr Andrew said in this link  http://www.cadence.com/Community/forums/p/21507/1307561.aspx, I was able to plot in MATLAB. So how one can trnasport the data to MATLAB if he runs parametric analysis in ADE.

    Kind regards

    • Post Points: 20
  • Tue, May 8 2012 3:15 AM

    Re: Interfacing Spectre Parametric analysis result to MATLAB in command. Reply

    You can do this with cds_srr too. I'm pointing at the "psf" dir which is created after the parametric analysis is done - this collates all the individual runs together (using a "runObjFile") - so if I do:

      sig=cds_srr('psf','tran-tran','out')

    I get:

     sig =

        info: {'V'  'V'  'time'  's'  'temp'  'Non'  'CAP'  'Non'}
         CAP: [5.0000e-13 8.7500e-13 1.2500e-12 1.6250e-12 2.0000e-12]
        temp: [25 80]
        time: [55x2x5 double]
           V: [55x2x5 double]

    Looking at sig.temp gives my temperature axis, sig.CAP is the axis of the design variable CAP that I swept, and sig.time and sig.V give me the matrices  versus these two other variables.

    So for example, sig.time(:,1,1) and sig.time(:,1,1) will give me the time sweep at temp=25 and CAP=5e-13)

    Regards,

    Andrew.

    • Post Points: 20
  • Fri, May 11 2012 5:06 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 88
    • Points 1,250
    Re: Interfacing Spectre Parametric analysis result to MATLAB in command. Reply

     I actually did for the DC parametric sweep as shown below but get the error like this:-

     sig=cds_srr('psf','dc-dc','out')
    Error: The directory is not a spectre output diretory.
    ??? One or more output arguments not assigned during call to "cds_innersrr".

    Error in ==> cds_srr at 20
      sig = cds_innersrr(dirname, dataset, signame, verbose);

     

    I am in  the psf directory created by Spectre for that simulation

    • Post Points: 20
  • Fri, May 11 2012 5:10 AM

    Re: Interfacing Spectre Parametric analysis result to MATLAB in command. Reply

     If you're "in the psf directory", then it won't work... You need to be in the directory containing the psf directory...

    Try doing:

    cds_srr('psf')

    or 

    cds_srr('/path/to/psf')

    first.

    Andrew.

    • Post Points: 20
  • Thu, May 17 2012 2:09 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 88
    • Points 1,250
    Re: Interfacing Spectre Parametric analysis result to MATLAB in command. Reply

    Yes that was the problem. But when I ran the 'cds_srr' comnad in the direcrotry containing the psf directory I got the following as shown at the end .

    I swept the Length in the parametriuc analysis. It did the simulation and also It created folder ( 10 folders) corresponding to each length including the 'psf' folder inside 'schematic' directory.  But I am NOT getting the 'length (l)' as  swept variable as you have metioned for Capacitor 'C' in the previous mail.

    Why is that ?

    Kind regards,

     

     

    cds_srr('/home/username/simulation/NMOS_CHAR/spectre/schematic/psf','dc-dc')
    Total: 26 properties
         'PSFversion'      'BINPSF creation time'      'PSF style'      'PSF types'      'PSF sweeps'      'PSF sweep points'      'PSF sweep min'      'PSF sweep max'      'PSF groups'      'PSF traces'      'simulator'      'version'      'date'      'design'      'analysis type'      'analysis name'      'analysis description'      'xVecSorted'      'tolerance.relative'      'reltol'      'abstol(V)'      'abstol(I)'      'temp'      'tnom'      'tempeffects'      'gmindc'

    Total: 11 type(s) of signals
    Signal type: F    Data type: Real
         'M1:cjd'      'M1:cjs'      'M1:cgg'      'M1:cgd'      'M1:cgs'      'M1:cgb'      'M1:cdg'      'M1:cdd'      'M1:cds'      'M1:cdb'      'M1:csg'      'M1:csd'      'M1:css'      'M1:csb'      'M1:cbg'      'M1:cbd'      'M1:cbs'      'M1:cbb'      'M1:cgsovl'      'M1:cgdovl'      'M1:cgbovl'      'M1:cddbi'      'M1:cssbi'      'M1:cggbi'      'M1:cgsbi'      'M1:cgdbi'      'M1:cbdbi'      'M1:cbsbi'
    Signal type: V    Data type: Real
         'M1:vgs'      'M1:vds'      'M1:vbs'      'M1:vgb'      'M1:vdb'      'M1:vgd'      'M1:vth'      'M1:vdsat'      'M1:vgsteff'      'net1'      'net3'      'net7'
    Signal type: I    Data type: Real
         'V0:p'      'V1:p'      'V2:p'
    Signal type: enum    Data type: Real
         'M1:region'      'M1:reversed'
    Signal type: A    Data type: Real
         'M1:ids'      'M1:isub'      'M1:id'      'M1:is'      'M1:ibulk'      'M1:ibs'      'M1:ibd'      'M1:i1'      'M1:i3'      'M1:i4'      'M1:igd'      'M1:igs'      'M1:igb'      'M1:igcs'      'M1:igcd'      'M1:igidl'      'M1:igisl'
    Signal type: S    Data type: Real
         'M1:gm'      'M1:gds'      'M1:gmbs'      'M1:gbd'      'M1:gbs'
    Signal type: A_V_2    Data type: Real
         'M1:betaeff'
    Signal type: Coul    Data type: Real
         'M1:qb'      'M1:qg'      'M1:qd'      'M1:qbd'      'M1:qbs'      'M1:qinv'      'M1:qgi'      'M1:qsi'      'M1:qdi'      'M1:qbi'      'M1:qsrco'
    Signal type: Ohm    Data type: Real
         'M1:ron'
    Signal type: W    Data type: Real
         'M1:pwr'
    Signal type: V    Data type: Real
         'M1:gmoverid'


    ans =

        signal_info: {1x24 cell}
               prop: {26x1 cell}
                  F: {28x1 cell}
                  V: {'M1:gmoverid'}
                  I: {3x1 cell}
               enum: {2x1 cell}
                  A: {17x1 cell}
                  S: {5x1 cell}
              A_V_2: {'M1:betaeff'}
               Coul: {11x1 cell}
                Ohm: {'M1:ron'}
                  W: {'M1:pwr'}

    • Post Points: 20
  • Wed, Jun 27 2012 6:08 AM

    Re: Interfacing Spectre Parametric analysis result to MATLAB in command. Reply

    That's because you didn't give enough arguments to cds_srr. With only two arguments, the output is the names of the signals (effectively - it's really a structure with all the types). If you gave one of the output names as the third argument to cds_srr (e.g. 'net3') you'd see the structure containing the swept variable.

    Andrew.

    • Post Points: 35
  • Wed, Jun 27 2012 7:32 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 88
    • Points 1,250
    Re: Interfacing Spectre Parametric analysis result to MATLAB in command. Reply

     Thanks alot Andrew.

    Kind Regards

    • Post Points: 5
  • Wed, Jun 27 2012 7:32 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 88
    • Points 1,250
    Re: Interfacing Spectre Parametric analysis result to MATLAB in command. Reply

     Thanks a lot Andrew.

    Kind Regards

    • Post Points: 5
Page 1 of 1 (8 items)
Sort Posts:
Started by RFQuery at 07 May 2012 04:21 AM. Topic has 7 replies.