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.

Question regarding running parametric simulations using spectre and postprocessing us

Status
Not open for further replies.

fyengui

Newbie level 3
Joined
May 2, 2011
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
France
Activity points
1,334
Hi all,

I would like to make different tests with a parameter's matrix in input:

Those parameters are given to my netlist:

my_data paramset {
L1 W1_L1 L2 W2_L2 W1 W2
1 2 1 1 1 9
1 3 5 2 4 7
2 5 8 7 1 3
1 2 6 3 5 9
2 5 2 2 2 7
3 6 3 3 3 3
4 7 4 4 4 2
2 5 5 2 2 5
3 6 5 5 3 6
4 5 4 4 4 9

}

After that, i launch an AC simulation.

I would like to get the results in ocean and write them into a file.
I already looked for a solution and i began an ocean script:

openResults("./netlist.raw")
selectResults('ac)

;create the outpout file
p = outfile("./outpout" "w+")
f = outfile("./results.txt" "w+")
;write the names of performances
(fprintf p "Gain\n")

corners = sweepValues()
foreach( corner corners
selectResult('ac corner)

Gain = ymax(mag(v("OUT")))/ymax(mag(v("IN")))
ocnPrint(?output f Gain)
testnumber = testnumber + drVectorLength(drGetWaveformXVec(Gain))

;enter in the loop to write result
(for j 0 drVectorLength(drGetWaveformXVec(Gain))-1
j=0
;part to catch gain value
Gain_element = drGetElem(drGetWaveformYVec(Gain) j)
;loop to pass through value and have the result
while( equal( type(Gain_element) 'other )
Gain_wave = Gain_element
Gain_vector = drGetWaveformYVec(Gain_wave)
Gain_element= drGetElem(Gain_vector 0)
)

;save the result
(for k 0 drVectorLength( drGetWaveformYVec(Gain_wave) )-1
Gain_result = drGetElem(drGetWaveformYVec(Gain_wave) k)
(fprintf p "%g\n" Gain_result)
)
)
)
;finally close the file
close(p)
close(f)



With this script and the parameters given at top, i have this file from ocnPrint:




W2 ymax(mag((v "OUT" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep"))) / ymax(mag((v "IN" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep")))

W1_L1 = 2
L2 = 1
W2_L2 = 1
W1 1
9 610.972m

W2 ymax(mag((v "OUT" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep"))) / ymax(mag((v "IN" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep")))
W1_L1 = 2
L2 = 6
W2_L2 = 1
W1 1
9 572.822m

W2 ymax(mag((v "OUT" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep"))) / ymax(mag((v "IN" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep")))
W1_L1 = 3
L2 = 1
W2_L2 = 1
W1 1
7 573.853m

W2 ymax(mag((v "OUT" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep"))) / ymax(mag((v "IN" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep")))
W1_L1 = 3
L2 = 6
W2_L2 = 1
W1 1
7 573.853m


# Set No. 1

(L2 = 2, W2_L2 = 2, W1 = 2)
W2 ymax(mag((v "OUT" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep"))) / ymax(mag((v "IN" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep")))@5
5 573.713m

# Set No. 2
(L2 = 5, W2_L2 = 2, W1 = 2)
W2 ymax(mag((v "OUT" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep"))) / ymax(mag((v "IN" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep")))@5
5 573.713m

# Set No. 3
(L2 = 8, W2_L2 = 7, W1 = 1)
W2 ymax(mag((v "OUT" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep"))) / ymax(mag((v "IN" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep")))@5
3 568.371m


# Set No. 1

(L2 = 3, W2_L2 = 3, W1 = 3)
W2 ymax(mag((v "OUT" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep"))) / ymax(mag((v "IN" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep")))@6
3 578.911m

# Set No. 2
(L2 = 5, W2_L2 = 5, W1 = 3)
W2 ymax(mag((v "OUT" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep"))) / ymax(mag((v "IN" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep")))@6
6 574.125m


# Set No. 1

(W1_L1 = 5, L2 = 4, W2_L2 = 4, W1 = 4)
W2 ymax(mag((v "OUT" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep"))) / ymax(mag((v "IN" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep")))
9 577.313m

# Set No. 2
(W1_L1 = 7, L2 = 4, W2_L2 = 4, W1 = 4)
W2 ymax(mag((v "OUT" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep"))) / ymax(mag((v "IN" ?resultsDir "./netlist.raw" ?result "S1_AC1-sweep")))
2 571.94m



But I just have 6 results in my file writen in second part in my script:

Gain
0.610972
0.610972
0.573713
0.578911
0.577313
0.577313



I know my post is a little bit long.

I really don't understand why i am not having every results. I am not a pro with skill and i don't know all the functions.

If you could help me, it would be very nice of you



Best regards

Firas YENGUI
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top