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 for differential amplifier

Status
Not open for further replies.
Surely understand meaning of #8.
First of all, Spectre does not launch at all due to syntax error of netlist.
Surely see and understand logfile of Spectre.

And even if Spectre does run, post processing will fail since you don't define I, W, L at all.

And your "input.scs" does not include "paramset statement".

netlist header
You can not understand Cadence ADE at all.
Surely learn very basic operation.

I recommend you to attend kindergarten level training of Cadence ADE.

I have to write code for Nelder-Mead method in Ocean.
https://en.wikipedia.org/wiki/Nelder–Mead_method

Use ADE-GXL or OCEAN-XL.

The following fragments are case when we don't use Spectre's "paramset" ability.
Code:
I_list = list(150u, 155u, 170u, 180u)
W_list = list(0.5u, 0.8u, 0.9u, 1u)
L_list = list(10u, 15u, 17u, 22u)

n = length(I_list)
for(i, 0, n-1
  I = nth(i, I_list)
  W = nth(i, W_list)
  L = nth(i, L_list)

  desVar("I", I)
  desVar("W", W)
  desVar("L", L)

); for
 

Attachments

  • 170621-193625.png
    170621-193625.png
    7.4 KB · Views: 74
  • 170621-201247.png
    170621-201247.png
    59.9 KB · Views: 75
Last edited:
I_list = list(150u, 155u, 170u, 180u)
W_list = list(0.5u, 0.8u, 0.9u, 1u)
L_list = list(10u, 15u, 17u, 22u)

n = length(I_list)
for(i, 0, n-1
I = nth(i, I_list)
W = nth(i, W_list)
L = nth(i, L_list)

desVar("I", I)
desVar("W", W)
desVar("L", L)

); for

I have used this but still the code is not working.
Please can you check it once.

The code is
-----------------------------------------------
[CODE}
prt=outfile("/home/15vl21f/anil.csv" "w")
simulator( 'spectre )
design( "/home/15vl21f/simulation/diff_amp/spectre/schematic/netlist/netlist")
resultsDir( "/home/15vl21f/simulation/diff_amp/spectre/schematic" )
openResults( "/home/15vl21f/simulation/diff_amp/spectre/schematic" )
modelFile(
'("/opt/cad/cad/FOUNDRY/analog/180nm/models/spectre/gpdk.scs" "stat")
)

I_list = list(150u, 155u, 170u, 180u)
W_list = list(0.5u, 0.8u, 0.9u, 1u)
L_list = list(10u, 15u, 17u, 22u)

analysis('ac ?start "10" ?stop "100G" )
analysis('dc ?saveOppoint t )

fprintf(prt "I, W, L, Gain, Bandwidth, overdrive, tail_current\n")

n = length(I_list)
for(i, 0, n-1
I = nth(i, I_list)
W = nth(i, W_list)
L = nth(i, L_list)

)

desVar("I" I)
desVar("W" W)
desVar("L" L)


envOption(
'analysisOrder list("dc" "ac")
)
temp( 27 )
run()


x = ymax(db20(VF("/vout")))
y = bandwidth(VF("/vout") 3 "low")
vth = pv("NM0" "vth" ?result "dcOpInfo")
vgs = pv("NM0" "vgs" ?result "dcOpInfo")
overdrive = vgs - vth
tail_current = 2 * pv("NM0" "id" ?result "dcOpInfo")
Gain = x
Bandwidth = y
fprintf(prt "%d, %f m, %f m,%f dB, %f Hz, %f V, %f A\n", I, W, L, x, y, overdrive, tail_current)

)
)
)
)
close(prt);[CODE}
 

*Error* db20: can't handle db20(nil)

*Error* _ymaxMethod: can't handle _ymaxMethod(nil)

*Error* _bandwidthMethod: can't handle _bandwidthMethod(nil 3 "low" nil)
*Error* difference: can't handle (nil - nil)
*Error* load: error while loading file - "anil.ocn" at line 43

Error is coming like this. I think the list of input values are not allocating to desVar.
 

Yes. I have changed it.

prt=outfile("/home/15vl21f/anil.csv" "w")
simulator( 'spectre )
design( "/home/15vl21f/simulation/diff_amp/spectre/schematic/netlist/netlist")
resultsDir( "/home/15vl21f/simulation/diff_amp/spectre/schematic" )
openResults( "/home/15vl21f/simulation/diff_amp/spectre/schematic" )
modelFile(
'("/opt/cad/cad/FOUNDRY/analog/180nm/models/spectre/gpdk.scs" "stat")
)

I_list = list(150u, 155u, 170u, 180u)
W_list = list(0.5u, 0.8u, 0.9u, 1u)
L_list = list(10u, 15u, 17u, 22u)

analysis('ac ?start "10" ?stop "100G" )
analysis('dc ?saveOppoint t )

fprintf(prt "I, W, L, Gain, Bandwidth, overdrive, tail_current\n")

n = length(I_list)
for(i, 0, n-1
I = nth(i, I_list)
W = nth(i, W_list)
L = nth(i, L_list)

desVar("I" I)
desVar("W" W)
desVar("L" L)

)
envOption(
'analysisOrder list("dc" "ac")
)
temp( 27 )
run()


x = ymax(db20(VF("/vout")))
y = bandwidth(VF("/vout") 3 "low")
vth = pv("NM0" "vth" ?result "dcOpInfo")
vgs = pv("NM0" "vgs" ?result "dcOpInfo")
overdrive = vgs - vth
tail_current = 2 * pv("NM0" "id" ?result "dcOpInfo")
Gain = x
Bandwidth = y
fprintf(prt "%d, %f m, %f m,%f dB, %f Hz, %f V, %f A\n", I, W, L, x, y, overdrive, tail_current)

)
)
)
)
close(prt);[CODE}
 

Code:
prt=outfile("/home/15vl21f/anil.csv" "w")
simulator( 'spectre )
design( "/home/15vl21f/simulation/diff_amp/spectre/schematic/netlist/netlist")
resultsDir( "/home/15vl21f/simulation/diff_amp/spectre/schematic" )
openResults( "/home/15vl21f/simulation/diff_amp/spectre/schematic" )
modelFile(
'("/opt/cad/cad/FOUNDRY/analog/180nm/models/spectre/gpdk.scs" "stat")
)

I_list = list(150u, 155u, 170u, 180u)
W_list = list(0.5u, 0.8u, 0.9u, 1u)
L_list = list(10u, 15u, 17u, 22u)

analysis('ac ?start "10" ?stop "100G" )
analysis('dc ?saveOppoint t )

fprintf(prt "I, W, L, Gain, Bandwidth, overdrive, tail_current\n")

n = length(I_list)
for(i, 0, n-1
I = nth(i, I_list)
W = nth(i, W_list)
L = nth(i, L_list)

desVar("I" I)
desVar("W" W)
desVar("L" L)

)
envOption(
'analysisOrder list("dc" "ac")
)
temp( 27 )
run()


x = ymax(db20(VF("/vout")))
y = bandwidth(VF("/vout") 3 "low")
vth = pv("NM0" "vth" ?result "dcOpInfo")
vgs = pv("NM0" "vgs" ?result "dcOpInfo")
overdrive = vgs - vth
tail_current = 2 * pv("NM0" "id" ?result "dcOpInfo")
Gain = x
Bandwidth = y
fprintf(prt "%d, %f m, %f m,%f dB, %f Hz, %f V, %f A\n", I, W, L, x, y, overdrive, tail_current)

close(prt);[CODE} [/QUOTE]

I don't know what else to do? Can you help me in this please.
 

Surely consider loop structure of script.

Your issues are too trivial and low level,
discuss with students who are same level as you.
 

I'm a student. I'm working on Cadence - Virtuoso. I have to write Ocean script for following Algorithm. I'm completely new to Ocean. So please help me to write code for the algorithm View attachment 139526

The file is attached.
Please help me to write Ocean Script for the algorithm which is attached.
Thank you.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top