The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 18th, 2024, 4:28pm
Pages: 1
Send Topic Print
cadence ocean script switching model files (Read 4051 times)
Zorro
Community Member
***
Offline



Posts: 63

cadence ocean script switching model files
Apr 27th, 2011, 3:13am
 
Can please somebody help me to modify an ocean script? Ocean scripts are new to me.

the ocean file is running but I need to switch among different model files.


   I have this:

   modelFile(
   '("$PDK_DIR/at77000/analog_artist/models/spectre/model_corners/MOS_nom_RES_nom_
CAP_nom.scs" "")
   )

   and it is working.



   now I want to, let's say run the same ocean script but using 3 different model files:


   "$PDK_DIR/at77000/analog_artist/models/spectre/model_corners/MOS_nom_RES_nom_CA
P_nom.scs"

   "$PDK_DIR/at77000/analog_artist/models/spectre/model_corners/MOS_bcs_RES_high_C
AP_high.scs"

   "$PDK_DIR/at77000/analog_artist/models/spectre/model_corners/MOS_bcs_RES_nom_CA
P_low.scs"


   what is the best way to do this? I have tried different ideas but without success.


   my idea is to do something like this:

   model_path="$PDK_DIR/at77000/analog_artist/models/spectre/model_corners/"

   corner1=strcat(model_path "/MOS_nom_RES_nom_CAP_nom.scs")
   corner2=strcat(model_path "/MOS_bcs_RES_high_CAP_high.scs")
   corner3=strcat(model_path "/MOS_bcs_RES_nom_CAP_low.scs")

   and then to use a foreach. but I don't get it to work because of syntax errors or maybe because it is not the correct way to do it.

   can please somebody have a look at this and if possible provide me an (written) example?

   thank you!
Back to top
 
 
View Profile   IP Logged
Zorro
Community Member
***
Offline



Posts: 63

Re: cadence ocean script switching model files
Reply #1 - Apr 28th, 2011, 2:58am
 
Hi All,

for those who are interested I found a method to switch between the models.
maybe the code is not the most elegant but it fulfills the desired objective.
as a point of reference here is the code:


;;;;;;;;;;;;;;;;;;;;;;;;; Part1

comment the following lines:

;modelFile(
;   '("$PDK_DIR/at77000/analog_artist/models/spectre/model_corners/MOS_bcs_RES_high_
CAP_low.scs" "")
;)


use instead:

model_path="/design/libs/at77000/v0.7/at77000/analog_artist/models/spectre/model
_corners"
list1      =      strcat(model_path  "/MOS_bcs_RES_high_CAP_high.scs      ")
list2      =      strcat(model_path  "/MOS_bcs_RES_high_CAP_low.scs      ")
list3      =      strcat(model_path  "/MOS_bcs_RES_low_CAP_high.scs      ")
list4      =      strcat(model_path  "/MOS_bcs_RES_low_CAP_low.scs      ")
...
etc etc etc, define here all the different models

;;;;;;;;;;;;;;;;;;;;;;;;; Part2

then define a list where you can select which models will be used in the loop, for example

corner_list = list(list1 list2 list4 )

;;;;;;;;;;;;;;;;;;;;;;;;; Part3

then use a loop:

foreach( corner corner_list
           modelFile( corner)
           run()

           ...
           ...
           ...
     )

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

and that's it.

Best Regards and hope it is helpful for someone!      

Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: cadence ocean script switching model files
Reply #2 - Apr 28th, 2011, 5:32am
 
Thanks for posting the solution!
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Zorro
Community Member
***
Offline



Posts: 63

Re: cadence ocean script switching model files
Reply #3 - Apr 28th, 2011, 6:43am
 
you are welcome!
it could be helpful for someone starting ocean scripts.
regards!
Back to top
 
 
View Profile   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.