The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> selectResults in Ocean
https://designers-guide.org/forum/YaBB.pl?num=1209239943

Message started by cdaigle on Apr 26th, 2008, 12:59pm

Title: selectResults in Ocean
Post by cdaigle on Apr 26th, 2008, 12:59pm

This is probably more of an Ocean-related question than anything else, but I hope someone can help!

I basically just want to 1) run a batch of transient simulations, each of which uses a different pwl file to control a stimulus, and then 2) export the data from each run to files with a matlab-friendly format for post-processing.  Part 1) works, part 2) does not.

I am using an Ocean script to orchestrate everything.

1)   (WORKING) To run the simulations, I am using alter statements, similar to the advice of MightyMouse in this thread:
http://www.designers-guide.org/Forum/?board=circuit;action=display;num=1108068864
The only catch is that I am (mis?)using the stimulusFile() command in Ocean to include a custom file in input.scs, which actually has all the "alter" commands in it.  But I don't think that is a problem.  All this actually seem to be working.  When I run my Ocean script, multiple simulations are run, and if I launch the Results Browser in the Virtuoso ADE, I can see all the results from each run and plot data and everything looks good.

2)   (NOT WORKING) I am having trouble getting Ocean to select among the various transient runs.  If I use the results() command, I get a list of things that include items like the following: "tran1-tran" "tran3-tran" "tran4-tran" (for some reason, "tran2-tran" is always missing from this list).  And if I go to the Ocean command line, I can see that each of these brings up a valid pointer when used with selectResults.  E.g.  


ocean> selectResults("tran1-tran")
stdobj@xa2f81b0
ocean> selectResults("tran2-tran")
stdobj@xa2f81bc
etc.

BUT, if I follow that with, say plot(VT("/dac_in")), then it ALWAYS plots the results of tran2.  This is the heart of my problem.  No matter which results I try to select, I only get tran2.  Consequently, I cannot plot/print anything from any of the other simulations.

Is there something I don't understand about how selectResults works?  I feel like this is a bug, but I am too new to be sure.

I would appreciate help of any kind...either workarounds for the selectResults problem or advice on completely different ways to run this batch of simulations.

thanks!

Title: Re: selectResults in Ocean
Post by pancho_hideboo on Apr 26th, 2008, 8:58pm

Your question is a mess, so I can't find out your problem.

Why don't you invoke plot( getData("/dac_in") ) after selectResults().

What you want to do, (1) and (2) are very easy, if you can write proper OCEAN.
 

Title: Re: selectResults in Ocean
Post by cdaigle on Apr 27th, 2008, 4:22pm

Thank you for the constructive criticism.  

Your suggestion to use plot(getData("/dac_in")) instead of plot(VT("/dac_in")) works.  So my entire script is now working.  

I would still welcome any broader suggestions on a better way to run multiple transient simulations (each using a different pwl file) and get the results into matlab.  The solution I currently have (involving alter statements) partitions the programming awkwardly between Spectre and Ocean, and I'm just not crazy about it.  

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.