• 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. Plotting within foreach loop

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 149
  • Views 16343
  • 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

Plotting within foreach loop

Eshar
Eshar over 13 years ago
I am running into a problem when I try plotting a set of waveforms from within a foreach loop (code snipet included below). When plot function is executed, Virtuoso Visualization and Analysis Wavefom Graph XL is opened and three waveforms are plotted. However, the plots are all identical being the same as the first waveform to be plotted (waveform[0]). When I plot each waveform individually without a foreach loop (i.e. three separate plot statements), all three plots are generated correctly. I also verified that the waveforms are indeed different by writing them into an output file.

Is there some reason why plotting from within a foreach loop not work? I am using IC6.1.5

Thanks for the help.

declare( waveform[3] )

;foreach loop saving corner simulation waveform data into waveform[n] for n=0,1,2

indexList = list( 0 1 2 )
win = newWindow()foreach( (ind) indexList

     currentWindow( win )
     plot( waveform[ind] )

)
  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    You didn't say which IC615 hotfix you're using - I think this was broken in an earlier hotfix and is now fixed (it may be ISR7 that it was fixed in, I can't quite remember).

    You might be able to workaround it by calling plot(waveform[ind] ?expr list(sprintf(nil "waveform[%d]" ind))) - effectively giving it a unique name - but I can't quite remember if that worked or not as a workaround.

    Which subversion are you using? (Help->About will tell you)

    Regards,

    Andrew.

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

    It is 6.1.5.500.3.

    Thanks for the suggestion. I did try something similar to that previously. The plot names do turn out unique, but the waveforms themselves are still not right.

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

    Best would be to use a newer subversion (e.g. latest hotfix), but if you can't, try:

    for(i 0 2
      famSetExpr(waveform[i] `waveform[,i])
      awvPlotWaveform(currentWindow()||newWindow() list(waveform[i])))
    )

    use awvPlotWaveform instead of plot(), and the famSetExpr() is setting the expression on the waveform object itself.

    I think that will probably work...

    Andrew.

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

    Thanks. That works. I couldn't find these functions in either the ocean or the skill reference guides from 2011. Is there some document that explains them?

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

    awvPlotWaveform is documented in the Virtuoso Visualization and Analysis XL SKILL manual (<ICinstDir>/doc/vivaxlskill/vivaxlskill.pdf ) - you can find this by running cdnshelp or Help from  the pulldown menus in Virtuoso and searching.

    famSetExpr is a private (and thus undocumented) function which I was merely providing as a means of working around your problem. 

    The correct solution is to update to a recent hotfix.

    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