# cadence ocean script switching model files

Status
Not open for further replies.

#### doupg

##### Junior Member level 1
Can please somebody help me to modify an ocean script?

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_CAP_nom.scs"

"$PDK_DIR/at77000/analog_artist/models/spectre/model_corners/MOS_bcs_RES_high_CAP_high.scs" "$PDK_DIR/at77000/analog_artist/models/spectre/model_corners/MOS_bcs_RES_nom_CAP_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. can please somebody have a look at this and if possible provide me an example? thank you! #### doupg ##### Junior Member level 1 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" "")

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!

points: 2