The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Simulators >> Circuit Simulators >> cadence ocean script switching model files https://designers-guide.org/forum/YaBB.pl?num=1303899183 Message started by Zorro on Apr 27th, 2011, 3:13am |
Title: cadence ocean script switching model files Post by Zorro on 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_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 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! |
Title: Re: cadence ocean script switching model files Post by Zorro on 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! |
Title: Re: cadence ocean script switching model files Post by Geoffrey_Coram on Apr 28th, 2011, 5:32am Thanks for posting the solution! |
Title: Re: cadence ocean script switching model files Post by Zorro on Apr 28th, 2011, 6:43am you are welcome! it could be helpful for someone starting ocean scripts. regards! |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |