Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to deposit simulation result into a file?

Status
Not open for further replies.

Alex Liao

Member level 4
Member level 4
Joined
Apr 8, 2013
Messages
75
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Visit site
Activity points
1,991
Hi, I am wondering is there a way to save an output into a file, like a .txt which it is easy to read from.

Specifically, in the "Setting outputs" of Virtuoso Analog Design Environment (ADE) I have:
Name: PhaseMargin
Expression: (phaseMargin((VF("/Vout") / (VF("/Vin+") - VF("/Vin-")))) + 180)

After simulation, I got 80 degree displayed.

But is there a way to save this '80' into a .txt file?

I am using SpectreS as the simulator. I think there are some commands to output results.

Any answer is appreciated.
Thanks,
Alex
 

Create an OCEAN output file and add an appropriate output command. You can find it in the OCEAN reference manual , e.g. like
Code:
report( ?output "myFile" ) => t
Prints all the operating-point parameters to a file named myFile.

Then restart your simulation with this OCEAN file.
 
Hi Erikl,

I got a bit confused here. My way of doing simulation is a command based approach.
I run the runSpectre which is :
Code:
spectre +escchars +log ../psf/spectre.out -env artist5.1.0 -format psfbin  -raw ../psf -E -cols    80 raw/myDesign
the myDesign is a symlink to finalNetlist which is the input netlist to the Spectre command.

Then what I got are all saved into ../psf. They looks like .dc .ac ... but most of them are encrypted.
How to connect the result from ../psf to the ocean script stuff? I think I missed some steps to get you.

Thanks,
Alex
 

Within ADE I used to use the Calculator and print expressions,
then when the output window popped up I'd just copy-and-
paste into a vi session and save after running a little 'u' file
that changed u to E-6, n to E-9, etc. for Excel's benefit.

Some windows will let you print to file, some won't, forget
which now.
 

    V

    Points: 2
    Helpful Answer Positive Rating
How to connect the result from ../psf to the ocean script stuff?

From every SPECTRE analysis - including your calculator and wave presentation commands - you can export an OCEAN command file which allows to repeat the same simulation & representation. In this command file you can insert further OCEAN commands to fulfil your needs. From the SPECTRE environment you can then restart such an analysis which executes your additional commands, too.


My way of doing simulation is a command based approach.
I run the runSpectre which is :
Code:
spectre +escchars +log ../psf/spectre.out -env artist5.1.0 -format psfbin  -raw ../psf -E -cols    80 raw/myDesign
...
Then what I got are all saved into ../psf. They looks like .dc .ac ... but most of them are encrypted.

In this case, the following approach may be simpler: Try:
Code:
spectre +escchars +log ../psf/spectre[B].txt[/B] -env artist5.1.0 -format psf[B]ascii[/B]  -raw ../psf -E -cols    80 raw/myDesign

The .txt extension is just an example.
 

From every SPECTRE analysis - including your calculator and wave presentation commands - you can export an OCEAN command file which allows to repeat the same simulation & representation. In this command file you can insert further OCEAN commands to fulfil your needs. From the SPECTRE environment you can then restart such an analysis which executes your additional commands, too.





In this case, the following approach may be simpler: Try:
Code:
spectre +escchars +log ../psf/spectre[B].txt[/B] -env artist5.1.0 -format psf[B]ascii[/B]  -raw ../psf -E -cols    80 raw/myDesign

The .txt extension is just an example.



Hi Erikl,

Thanks for your steps.

I use ADE to run one time simulation and let it generated the ocean script for me. It works. I add openResults() and ocnPrint() to get what I want after executing the runSimulation/runSpectre.

One thing here is:
Q1. first, is there a way to print multiple results using one ocnPrint() command?
Q2. is there a way to insert certain plain text in between. like:
Code:
( ";statement" is an comment according the SKILL)
***************** ;plainText 

Gain is:			;plainText 

 	65dB			;ocnPrint Result

PhaseMargin is:		;plainText 

	80			;ocnPrint Result

GainBandwidth is:	        ;plainText 

	5MHZ 		;ocnPrint Result

******************;plainText

Even though I know how to write plain text from you, when the code looks like the following example, I may have trouble.
Code:
  plaintext
  ocnPrint(Gain) 
  plaintext
  ocnPrint(phaseMargin)
The second phaseMargin Print value would overwrite my result.txt maybe at the first line.
Any idea on how does ocnPrint() or multiple ocnPrint()s being executed in one ocean script affect the same result file?

Regards,
Alex
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top