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.

importing cadence data in matlab

Status
Not open for further replies.

amic

Member level 5
Joined
Aug 30, 2005
Messages
91
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
2,069
how to export data from cadence

Hi. I am trying to save transient simulation data from ADE so that i can use it for Matlab processing of DAC INL/DNL. But I observed the data saved captures wrong points. One point i've noted is excel properties for data ( rounding off decimals ) is a problem. I fixed it but the plotted matlab curve steel looks wrong!!!

Anybody has got any such experiances?
 

cadence matlab

I use wavescan to export a table data of the waveform. and then process the data by matlab.
I have not found out anything wrong. maybe round off error is not important in my case.
 

ocean script fprintf

In the title you said Matlab but then you say Excel, which one are using?

I usually invoke an ocean script to collect and save the data for me, you can control the accuracy from ocean (although your problem seems coming from Excel).
 

export simulation data cadence

An easy and efficient way to do so, is to write an OCEAN script that simulates ur circuit or whatever and write the simulation results into a text file and then extract those results from matlab easily using textread
 

cadence to matlab

renwl said:
I use wavescan to export a table data of the waveform. and then process the data by matlab.
I have not found out anything wrong. maybe round off error is not important in my case.


HEY i tried this but wavescan saves data with u for micro and n for nano which are then not recognised by matlab!!! how do u deal with this ?
 

importing data from cadence to a text file

I have a big script to loop through some design variables and then runs the simulation, the part that you might be interested in is this:

;; Grab results
selectResult( 'dc )
outF = outfile( outputFileName "a" )
fprintf( outF "%n %n %n %n %n \t%1.5f \t%1.5f \t%1.5f \n", b4 b3 b2 b1 b0 VDC("/refHigh") VDC("/ref") VDC("/refLow") )
close( outF )

I think the code should be self explanatory. Let me know if this helps...
 

importing data from cadence to excel

MSSN said:
An easy and efficient way to do so, is to write an OCEAN script that simulates ur circuit or whatever and write the simulation results into a text file and then extract those results from matlab easily using textread

well, it took me 3 days to simulate it and i already have the psfs which i am trying to use to generate data from. I don't want to resimulate using ocean script.
 

matlab cadence ocean

You don't really need to re-simulate, there is still an ocean statement for grabbing the output.

ocnPrint( ?output "./myOutputFile" v("net1") ?from 0 ?to 0.5n ?step 0.1n ?numberNotation ’engineering ?precision 10)

That will print the voltage at "net1" to "./myOutputFile" starting from 0 to 0.5ns with steps of 0.1n with a 10 decimal points and an engineering notation.

You can copy and paste this command in the CIW window, it might take sometime to generate all the points for you, so be patient.
 

cadence export csv

the wavescan save data in e-6 if it's u. does you use the table function to export data? and the data can be save as csv file. it can be read by excel directly.and the matlab can accept it too.
 

cadence exporting data

jonashat said:
You don't really need to re-simulate, there is still an ocean statement for grabbing the output.

ocnPrint( ?output "./myOutputFile" v("net1") ?from 0 ?to 0.5n ?step 0.1n ?numberNotation ’engineering ?precision 10)

That will print the voltage at "net1" to "./myOutputFile" starting from 0 to 0.5ns with steps of 0.1n with a 10 decimal points and an engineering notation.

You can copy and paste this command in the CIW window, it might take sometime to generate all the points for you, so be patient.


hey cool...thanks . will try this.

Added after 36 minutes:

renwl said:
the wavescan save data in e-6 if it's u. does you use the table function to export data? and the data can be save as csv file. it can be read by excel directly.and the matlab can accept it too.

oh ya...i was able to generate table now. thanks
 

Re: importing data from cadence to a text file

I want to do something like this but for a dc sweep analysis, but it doesn't seem to work for me, I have attached the code I am using please can you take a look and see what might be wrong.

resultOut = outfile( "./output.csv" "a" )
selectResult( 'dc )
save('v "/Out" "/Outb")
fprintf( resultOut "%e \t "%e \t", v("/Out") v("/Outb"))
close( resultOut )

I have a big script to loop through some design variables and then runs the simulation, the part that you might be interested in is this:

;; Grab results
selectResult( 'dc )
outF = outfile( outputFileName "a" )
fprintf( outF "%n %n %n %n %n \t%1.5f \t%1.5f \t%1.5f \n", b4 b3 b2 b1 b0 VDC("/refHigh") VDC("/ref") VDC("/refLow") )
close( outF )

I think the code should be self explanatory. Let me know if this helps...
 

Re: importing data from cadence to a text file

fprintf( resultOut "%e \t "%e \t", v("/Out") v("/Outb"))

Seems there's one quote (" , before the 2nd %e) dispensable?
 

Yes, I caught that after I posted the question. this is what I have now, but I still can't get the results to print. I just have an empty csv file.

fprintf(results_out "%e \t %e \n" v("/Q") v("/Qb"))
 

Now the comma is missing after the 2nd quote.
 

I fixed that but I get this for results and not data values.

srrWave:0x15c8c0b8 srrWave:0x15c8c0c0
 

Not sure, but you could try the getData construct:

fprintf(results_out "%e \t %e \n", getData("/Q") getData("/Qb"))
 

Yeah, I initially tried that but it still gives me the same result as this


srrWave:0x15c8c0d8 srrWave:0x15c8c0e0
 

you can find some help on ocean scripting.
 

Hi,

I get the similar error when i try to use the following script -

selectResult('tran)
outF=outfile("./data.csv" "a")
fprintf(outF "%f \t %f", VT("/AP<7>") VT("/AP<6>"))
close(outF)

Can somebody please help me correct this..


Yeah, I initially tried that but it still gives me the same result as this


srrWave:0x15c8c0d8 srrWave:0x15c8c0e0
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top