The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jun 26th, 2024, 12:09am
Pages: 1
Send Topic Print
Running parametric sims using Ocean (Read 1992 times)
gsradhak
New Member
*
Offline



Posts: 1

Running parametric sims using Ocean
Jun 02nd, 2010, 1:06pm
 
Hi all,

I have a set of design variables in my schematic. I would like to input multiple data vectors to my schematic and save the output data in Ocean

For example, If P is a set of parameters P={p1,p2,p3,p4} (p1-p4 are the design variables in the schematic). I would create a matrix of data values with different instances of P ie my data matrix would look like

Q=[-------P1---------

    --------P2---------

   ---------P3--------]

and so on where each Pi contain (p1i, p2i,p3i,p4i). (In other words I want to use the analogus of paramset command in Spectre for ocean). I would like to simulate my circuit for these values in Q and make some measurements using Calculator function and finally store the output data in the text file. Can somebody please go through the steps in accomplishing the same?



Thanks,



Guru
Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: Running parametric sims using Ocean
Reply #1 - Jun 25th, 2010, 10:53pm
 
--- Method-1 Quote:
declare( p1[3] )
declare( p2[3] )
declare( p3[3] )
declare( p4[3] )

; Design Parameter's Values for P1 sets
p1[0] = 1
p2[0] = 2
p3[0] = 3
p4[0] = 4

; Design Parameter's Values for P2 sets
p1[1] = 10
p2[1] = 20
p3[1] = 30
p4[1] = 40

; Design Parameter's Values for P3 sets
p1[2] = 100
p2[2] = 200
p3[2] = 300
p4[2] = 400

base_dir = "xxxxx"

for( i, 0, 2
  desVar( "p1", p1[i] )
  desVar( "p2", p2[i] )
  desVar( "p3", p3[i] )
  desVar( "p4", p4[i] )

  resultsDir( sprintf(nil, "%s/P%d", base_dir, i+1) )

  run()
)


--- Method-2 Quote:
; Design Parameter's Values for Q sets
p1_list = list(1, 10, 100)
p2_list = list(2, 20, 200)
p3_list = list(3, 30, 300)
p4_list = list(4, 40, 400)

base_dir = "xxxxx"

n = length(p1_list)
for( i, 0, n-1
 desVar( "p1", nth(i, p1_list) )
 desVar( "p2", nth(i, p2_list) )
 desVar( "p3", nth(i, p3_list) )
 desVar( "p4", nth(i, p4_list) )

 resultsDir( sprintf(nil, "%s/P%d", base_dir, i+1) )

 run()
)


--- Method-3 Quote:
; Design Parameter's Values for Q sets
Q = list(
         (  1,   2,   3,   4),    ; Design Parameter's Values for P1 sets
         ( 10,  20,  30,  40),    ; Design Parameter's Values for P2 sets
         (100, 200, 300, 400)     ; Design Parameter's Values for P3 sets
   )

base_dir = "xxxxx"

i = 0
foreach( Pi, Q
  ++i
  desVar( "p1", nth(0, Pi) )
  desVar( "p2", nth(1, Pi) )
  desVar( "p3", nth(2, Pi) )
  desVar( "p4", nth(3, Pi) )

  resultsDir( sprintf(nil, "%s/P%d", base_dir, i) )

  run()
)

Back to top
 
« Last Edit: Jun 26th, 2010, 4:04am by pancho_hideboo »  
View Profile WWW Top+Secret Top+Secret   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.