• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. RF Design
  3. Interfacing Spectre Parametric analysis result to MATLAB...

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 63
  • Views 16757
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Interfacing Spectre Parametric analysis result to MATLAB in command.

RFQuery
RFQuery over 13 years ago

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  www.cadence.com/.../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

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFQuery
    RFQuery over 13 years ago

     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

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

     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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFQuery
    RFQuery over 13 years ago

    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'}

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFQuery
    RFQuery over 13 years ago

     Thanks alot Andrew.

    Kind Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFQuery
    RFQuery over 13 years ago

     Thanks a lot Andrew.

    Kind Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information