• 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. Running Spectre simulation and then plotting in ViVA by...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 125
  • Views 11273
  • 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

Running Spectre simulation and then plotting in ViVA by using system() command from MATLAB

RFStuff
RFStuff over 3 years ago

Dear All;

 

I need to run multiple spectre simulations from MATLAB (using system() command to fire transient simulations) as I need to modify the netlist for changing some parameters of the circuit in the schematic.

Also, there is a need to plot the waveforms in ViVa after the end of each simulation run.

"spectre /../input.scs" command run the transient simulation but it doesn't plot the waveforms

I tried to use the corresponding oceanScript.ocn by using the command "ocean -replay /../oceanScript.ocn". This plotted the waveforms in ViVA. But there is no exit from the terminal  after the end of simulation.

I then manually entered the above command in the terminal (without using system() from MATLAB). 

I saw that after simulation it stays as below after pressing ENTER key:-

Can anybody please tell how to overcome the issue.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    You probably just need to have exit() at the end of the OCEAN script. Of course, unless you are saving images (e.g. using saveGraphImage() ) then the plots will just flash up on the screen before it exits, so it rather depends on what you're hoping to achieve.

    Andrew

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

    Dear Andrew,

    Thanks a lot for your reply.

    I want to check the plot whether it is making sense as per the expectation and then run the next run.

    Can we add something interactive at the end of the simulation (just before exit()) ?

    Kind Regards,

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

    You could add this at the end:

    hiDisplayAppDBox(?name 'exitDBox ?dboxText "Quit" ?dboxBanner "Quit" ?dialogStyle 'modeless ?dialogType hicQuestionDialog ?buttonLayout 'OKCancel ?callback "exit()")

    I did initially have it as a modal dialog box, but that stops you being able to do anything interactive with the graphs.

    Andrew

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

    Dear Andrew,

    Thanks a lot. This works perfectly fine for me and as I expected for my need.

    Though you have mentioned , I curiously pressed the cancel button. This allows me to act on the graphs But, now one can not come out of this. 

    May be with cancel another dialog box would open which can then do an exit .

    KInd Regards,

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

    You can interact with the graphs anyway (since this is modeless). Maybe change the code to this instead?

    hiDisplayAppDBox(?name 'exitDBox ?dboxText "Quit?" ?dboxBanner "Quit" ?dialogStyle 'modeless ?dialogType hicQuestionDialog ?buttonLayout 'UserDefined ?buttons list("Quit") ?callback list("exit()"))

    That way, you only get a "Quit" button and no option to cancel...

    Andrew

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

    Thanks a lot 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