• 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. Custom IC SKILL
  3. CDS_SRR doesn't

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 3414
  • 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

CDS_SRR doesn't

wgtkan
wgtkan over 6 years ago

Hello:

My MMSIM version is MMSIM151

Spectre version is spectre181

sub-version  18.1.0.235.isr3

The Linux operation system is: Red Hat Enterprise Linux Workstation release 6.7 (Santiago)

My Matlab version is R2018B.  I have read all the previous posting regarding interfacing Matlab with Spectre. I have RF toolbox version 3.5.

I followed  Andrew Beckett’s excellent example on how to interface Matlab with Spectre by reading this post:   https://community.cadence.com/cadence_technology_forums/f/rf-design/21507/working-with-dc-sweeps-and-op

and this post: https://community.cadence.com/cadence_technology_forums/f/rf-design/22435/interfacing-spectre-parametric-analysis-result-to-matlab-in-command

The cds_srr function doesn’t exist in the Matlab and when I read the spectreuser documentation, it mentions about the Multi_mode  Simulation (MMSIM) Toolbox for Matlab but not in detail. I do not seem to find the MMSIM documentation. I get the error that says Undefined function or variable 'cds_srr' in Matlab.

What function should I use?

Thank you very much in advance.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    OK, first of all you don't need both SPECTRE and MMSIM in your path - SPECTRE supersedes MMSIM.

    You need to do this:

    setenv MATLABPATH `cds_root spectre`/tools/spectre/matlab/64bit

    or

    setenv MATLABPATH `spectre_root`/tools/spectre/matlab/64bit

    To ensure the cds_srr utility (the Spectre toolbox) is in your path. BTW, the Matlab "RF" toolbox isn't needed for this.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Andrew Beckett

    BTW, for the documentation, it's not in the Spectre User Guide. It's in the Spectre RF Theory. Simplest thing is to run <SPECTREinstDir>/bin/cdnshelp and search for "matlab". You'll then find one of the hits is the "The Spectre/RF MATLAB Toolbox"

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • wgtkan
    wgtkan over 6 years ago in reply to Andrew Beckett

    Hello Andrew,

    Thank you for your prompt response. 

    When I added in .bashrc the entry:

    export MATLABPATH=`spectre_root`/tools/spectre/matlab/64bit

    I get bash: spectre_root: command not found.

    I also do source .bashrc

    And also in this post:  https://community.cadence.com/cadence_technology_forums/f/rf-design/21507/working-with-dc-sweeps-and-op

    In Matlab when I do: 

    gm=cds_srr('./idcurvesw.raw','sweepvgs_dc-sweep','m1:gm');
    contour(getfield(gm,'vgs:dc'),gm.dc,gm.S);

    I get an error that says vgs:dc is a variable that doesn't exisit. But when I check the output the variable name has changed to vgs_dc and it works when I change the variable:

    gm=cds_srr('./idcurvesw.raw','sweepvgs_dc-sweep','m1:gm');
    contour(getfield(gm,'vgs_dc'),gm.dc,gm.S);

    Thanks a lot.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to wgtkan

    Perhaps you have wrapper scripts in the way in your environment and maybe when you do "which spectre" it's not actually spectre from a Cadence installation - and because of that "which spectre_root" gives an error. Anyway, the key its that you need to have MATLABPATH set to include the path to the tools/spectre/matlab/64bit dir underneath a SPECTRE installation.

    You're right the field is now called 'vgc_dc'. I suspect that was a fix to avoid having colon in the the name that's been made at some point in the 7 years since I posted that suggestion in the thread you mentioned. One benefit is that you can now avoid having to call getfield (that was essential because of the colon in the field name) and do:

    contour(gm.vgs_dc,gm.dc,gm.S);

    Regards,

    Andrew.

    • 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