• 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 Design
  3. ADE-XL and matlab debugging

Stats

  • Locked Locked
  • Replies 17
  • Subscribers 126
  • Views 22679
  • 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

ADE-XL and matlab debugging

danmc91
danmc91 over 10 years ago

I came across a limitation in the waveform calculator recently and decided to  try out using matlab for processing some simulation results.  I've had some successes and at least as many failures and am hoping to get the failures resolved.

matlab version:  2012B

IC version:  6.1.6.500.6

MMSIM version: 13.11.078

Platform:  RHEL 5.5

  1. Simulate with ADE-L, look at results in matlab.  After using addpath() twice in matlab or setting MATLABPATH to include both .../tools/spectre/matlab and .../tools/spectre/matlab/64bit I was able to read results using cds_srr(), run my analysis, etc.
    1. Is there a way in ADE-L (not -XL) to include a matlab measure in the outputs or launch matlab to produce some plots? 
    2. The documentation seemed to miss me needing to add the .../tools/spectre/matlab/64bit part to MATLABPATH and I was failing to find cds_innersrr at first.
  2. Launch matlab from the CIW window:  shell("matlab &").  Weird.  doesn't seem to work.  I think DISPLAY may not be set but shell("xterm -e matlab &") launches matlab with the gui, no problem.
  3. Simulate in ADE-XL, use a matlab output.  Here is where I totally crash and burn. 
    1. ERROR (ADEXL-4031): Matlab script directory.  It doesn't like a colon in my ADE-XL file structure and I'm told to use:  envSetVal("adexl.setup" "useNMPForMapping" 'boolean t).  However the adexl.setup partition doesn't exist.  adexl.setupdb does exist but making this setting does not make the error go away.
    2. WARNING (ADEXL-4010): No outputs specified in the Matlab script.  Scalar outputs can be specified in 'axlResult' in Matlab script..  But I *do* have axlResult=3.7; in my script (just put in a number to rule out other issues.
    3. I can't find any log of any sort at all related to the matlab script running.  If I watch the output of 'top' I see a matlab process start and then end.  I've tried making my matlab script only open up a text file for writing, printing out "hello, world" to the file and closing it.  Even that doesn't happen.
    4. Then I tried envSetVal("adexl.gui" "copyMeasurementScripts" 'boolean nil) to avoid having the matlab script end up in a directory with ":" in the name.  I put that envSetVal in my .cdsinit and restarted virtuoso and ADE-XL.  Same result as before (script got copied to ADE-XL directory with a ":" in the name and I got a ERROR (ADEXL-4031): Matlab script directory).
    5. If I ever get past this, can I return a waveform (or multiple waveforms) back to ADE-XL from matlab?

This seems very close but close is not good enough.  The lack of any sort of log that I can find is perhaps the most frustrating.  I don't know how ADE-XL is launching matlab, what arguments it may be giving to matlab, what environment it may be giving to matlab, etc.  It makes it very hard to debug.

Thanks

-Dan

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    I've seen this on occasion too where it doggedly keeps the colon in the path. One way to cure this would be to set the envSetVal("adexl.setup" "useNMPForMapping" 'boolean t) option, and then create a new ADE XL view, and then import everything from the original ADE XL view.

    Can you try that?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Curtisma
    Curtisma over 9 years ago
    Andrew:

    I will try that today and get back to you.

    Thanks,
    Curtis
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Curtisma
    Curtisma over 9 years ago

    When I enter this command in the Virtuoso window I get the following warning and nil output:

    envSetVal("adexl.setup" "useNMPForMapping" 'boolean t)
    *WARNING* envSetVal: could not find tool[.partition] 'adexl.setup'
    nil

    Is this command correct?
    -Curtis

    I am using version IC6.1.6-64b.500.14

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

    Er, whoops. It should be:

    envSetVal("adexl.setupdb" "useNMPForMapping" 'boolean t)

    In fact, the warning message that's produced by ADE XL gives the incorrect variable (the wrong partition). I noticed this a while back, and filed CCR 1604113 which will be fixed in IC617 ISR7 (due out before mid-October). That fix will ensure that the warning mentions the right variable name.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Curtisma
    Curtisma over 9 years ago

    Before receiving this message I tried a new adexl view and found that it worked just fine and used the following path:
    /prj/sky78140_mk5325asm_CR/work_libs/mayberc/cds/design/SW_CTRL_mk5325a_01_power_TB/adexl_matlab/test_states/sky78140_mk5325asm_CR_mayberc/SW_CTRL_mk5325a_01_power_TB/spectre/sky78140_mk5325asm_CR_mayberc_SW_CTRL_mk5325a_01_power_TB_STB_none_Test.5/outputsScriptsDir/plot2p5v.m

    What does the "useNMPForMapping" variable do? Does it only make sure that there is no colon in the path?

    The only thing I can think of that is different between the sims is that with the one that had the colon I had made a copy of another test and the name is different.

    I can still try making a new view with the variable set to true, but it won't be obvious if the problem has been fixed or the situation was just incidentally avoided with the new test bench. Any suggestions? Would making a copy of the original adexl view reproduce the same situation but with the variable set to true?

    -Curtis

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

    Hi Curtis,

    The useNMPForMapping sets a flag in the setup database for a new ADE XL view to tell it that it should use our "name map" APIs to translate filenames. These mapping functions can map certain filenames that are illegal on some historical platforms - essentially anything that is not a alphanumerical character or underscore would get mapped (I think that's it). You see that this already happens with lib/cell/view names in Virtuoso as a whole - a dot in the name would get mapped, and so on.

    The benefit for Matlab is that : is a special character, and so by mapping it we avoid that problem.

    Now, this won't help when copying an ADE XL view, because the setup database is not new then - it's a (possibly modified) copy of the original. It does generally help when you rename the test to avoid the :, but there are sometimes some remnants of the old name in some of the paths used - certain routes through the tools can cause these to remain. So I think in your case you were OK in one situation, but not another.

    The new Explorer and Assembler tools in IC617 should be far less susceptible to this problem because they don't tend to create such paths in the first place as the test information is stored in a more compact representation and the additional files (like Matlab scripts) are stored elsewhere without the deep path names.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Curtisma
    Curtisma over 9 years ago
    Andrew:

    Thanks for the explanation!

    I look forward to trying Explorer and Assembler.

    -Curtis
    • 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