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.

Ocean Script-starting

Status
Not open for further replies.

Zeus_ark

Newbie level 4
Joined
Oct 29, 2010
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,321
Hi, I just started using OCEAN, could you suggest me tutorial or sites where I can get practice problem to get a hold on OCEAN?
 

Hello
i have some expirience with ocean scripts writing - so if you have questions - ready to help.
 

I went through OCEAN SCRIPT pdf, I want to practice OCEAN right from beginners level.
 

I went through OCEAN SCRIPT pdf, I want to practice OCEAN right from beginners level.

I advice you to begin with practical tasks - for example, write script which simulate amplifier on corners and store the results in file and so on.
 

Hi I tried to do a simple program to get AC, DC and transient analysis of an amplifier.
here is the code
=========================================

ocnWaveformTool( 'awd )
simulator( 'spectre )
design( "/tmp/mu92/cadence/practice1a/spectre/schematic/netlist/netlist")
resultsDir( "/tmp/mu92/cadence/practice1a/spectre/schematic" )
modelFile(
'("/home/mu/gpdk090_AnalogIC/libs.cdb/gpdk090/../../models/spectre/gpdk090.scs" "NN")
'("/home/mu/EE223/gpdk090_AnalogIC/practice2.scs" "")
)
createNetlist( ?recreateAll t)
analysis('tran ?start 0 ?stop 10m ?step 10n)
analysis('ac ?start 1 ?stop 4G ?log 10)
analysis('dc ?saveOppoint t)
desVar( "Vdc" 1.2)
desVar( "Cload" 1p)
desVar( "R" 9.37K)

temp( 27 )
run()

ocnDisplay('analysis 'tran)
selectResults('tran)

; plot(getData(?results 'tran))
; openResults("./psf" t)
; addSubwindow()
ocnDisplay('analysis 'ac)
selectResults('ac)
plot( v("Out") v("In") )

selectResults('dc)
ocnPrint( ?output "myfile" v("Out") )
===========================================
I have following doubts:
a) I get this error when I simulate the file :
Warning: wave1 is not a waveform object that can be displayed and will be turned OFF automatically
name : "v(\"in\")"
expr : "v(\"in\")"
how do I correct this.
b) In the program I want to plot transient as well as AC in the same waveform window, how do I do it? I tried doing the subwindow thing!
c) how do these functions :
ocnDisplay('analysis 'tran)
selectResults('tran)
actually work?

Please answer the questions, I am trying my best to learn on my own and any help would be very helpful
 

Hello
you should do smth like that:

selectResults('ac)
plot(VF("Out"))
selectResults('tran)
addSubwindow()
plot(VT("Out"))

Regards.
 

These are the warnings and errors I'm getting using oceanScript.Could any body figure out the mistakes I made in the script

---------- Post added at 11:19 ---------- Previous post was at 11:10 ----------


Can any body figure out the mistakes I did in scripting

---------- Post added at 11:21 ---------- Previous post was at 11:19 ----------


Can any body figure out the mistakes I did in scripting

---------- Post added at 11:32 ---------- Previous post was at 11:21 ----------


Sorry I've attached wrong screenshot.Above are the correct screenshots.one is gmid.ocn file and the other is screen short CIW window after running load("gmid.ocn")
 

Hi,

Do you know what the ocnPrint command is for ac analysis?

for transient analysis I used: ocnPrint(IT("/V0/Plus") ?output "/full/output/file/path.txt" ?precision 8 ?numberNotation 'none ?from 0n ?to 10n ?step 1n)and it worked.

I am wondering if there is any equivalent for ac analysis.



Thanks!
 

Hello,

I was wondering, is it possible to write a script that interactively changes a design variable in a while loop? My idea is to measure a voltage at a node of a transistor and if it is less than a given value, change the size of the transistor. I have experience in C/C++ programming so the algorithm there would be something like
while(voltage < VALUE){
change transistor size
calculate voltage
}
I tried to implement something like that in OCEAN, but got an error:
*Error* eval: not a function - set_W_tail(W_tail_temp)
this function is my own and is given below...


the code is given below:
; initial setup stuff
ocnWaveformTool( 'wavescan )
simulator( 'spectre )
design( "/home/Cadence/cadence/simulation/Ocean_test/spectre/schematic/netlist/netlist")
resultsDir( "/home/Cadence/cadence/simulation/Ocean_test/spectre/schematic" )
modelFile(
'("/opt/ncsu-cdk/models/spectre/standalone/tsmc25N.m" "")
'("/opt/ncsu-cdk/models/spectre/standalone/tsmc25P.m" "")
)
desVar( "ibias" 10u )
desVar( "in_n" 1.25 )
desVar( "in_p" 1.25 )
desVar( "vdd" 2.5 )
desVar( "W_tail" 1u )
temp( 27 )
; function that gets the new transistor Width value. It should alter the W_tail design variable and run the calculations again
procedure( set_W_tail(W)
desVar( "W_tail" W )
run()
selectResult( 'tran )
ICMmax = evalstring(desVar("vdd")) - value(v("/net21") 1e-6) ;calculate the voltage at a transistor node when X=1us
;printf("width = %f \n" ICMmax)
ICMmax ; the value that is returned by the function
)

specICMmax = 0.1
W_tail_temp = evalstring(desVar("W_tail"))

analysis('tran ?stop "50u" )
run()
selectResult( 'tran )
measuredICMmax = evalstring(desVar("vdd")) - value(v("/net21") 1e-6)
;here I should theoretically change the width until the condition is met
while( (measuredICMmax > specICMmax) (measuredICMmax=set_W_tail(W_tail_temp) W_tail_temp=W_tail_temp+1e-6)))


So the main question would be - is it possible to change a design parameter and run a simulation (evaluate the altered parameter) in a WHILE loop? (maybe it is done using something else). All examples just use printf or something like that with while loops...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top