• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Question regarding running parametric simulations using...

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 143
  • Views 12658
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Question regarding running parametric simulations using spectre and postprocessing using ocean

tcretinon
tcretinon over 14 years ago

 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,

Thibault CRETINON

 

 

  • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information