• 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. Change Model Path in ADE L state by Skill

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 15808
  • 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

Change Model Path in ADE L state by Skill

mkaragou
mkaragou over 13 years ago

I have a set of simulation testbenches whit the according ADE states saved in the OA database (IC 6.1.3) which contain analysis statements, design variables, calculator expressions and so on.

 Now I would like to change the model path in all of these ADE states to point to a new release of simulation models but I would like to avoid  to open every ADE state manually and to type in the new model path by hand in the ADE L window.

Does a skill function exist which provides this functionality?

I had a look in sourclink and the skill documentation bud I did not find a solution yet.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    There's not really any clean way of doing this apart from loading in ADE and fixing them. Would be a useful capability though, so you might want to contact customer support and request an enhancement.

    In the short term, one possibility is to change the default (using either envSetVal("spectre.envOpts" "modelFiles" 'string "/new/setup/paths/etc") or using the asiSetEnvOptionVal(asiGetTool('spectre) "modelFiles" list(...)) approach often used in PDKs), and then set this cdsenv:

    envSetVal("asimenv.loadstate" "modelSetup"  'boolean nil)

    What that will do is get the model setup to be turned off by default on the load state form, and so it will then pick up the default rather than what is stored in the state file. Not perfect, but may be a start...

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mkaragou
    mkaragou over 13 years ago

    Thanks Andrew, I filed an enhancement request!

    In the meantime I will try to implement your suggestion :)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ebecheto
    ebecheto over 13 years ago

     Hi mkaragou,

     

    I have modified my script  to make it more fully skill (not calling any shell 'sed' modification).It goes into the states of the current cellview. and change expanded directory into a environnement variable.

    ei . : /localRep/kit/ams/spectre/c35/cmos53.scs into $AMS_DIR/spectre/c35/cmos53.scs

    I agree with Andrew though, that would be nice that PDK will be allways using global vars in .cdsinit like :

    envSetVal( "spectre.envOpts" "modelFiles" 'string "$IBM_PDK/IBM_PDK/cmrf8sf/relDM/Spectre/models/allModels.scs;tt" )

    However, here come my fixState.il (currently only for IBM and AMS). (with no warranties ; )  : it could fail if you have strange names in the path of your files. Thanks to this little exercise, I finally understood the difference between foreach(mapcar and foreach(mapcan.

     

    Hope it helps

     

    _____

    ; load("fixState.il")
    
    defun( fixState (@optional (cv geGetWindowCellView())) let((artDir cellDir dirList files myPort line hDir change cmd)
    ;cv=geGetWindowCellView()
    if(cv then
    change=nil
    artDir=sprintf(nil "~/.artist_states/%s/%s/spectre/state1/" cv~>libName cv~>cellName)
    hArtDir=sprintf(nil "~/.artist_states/%s/%s/" cv~>libName cv~>cellName)
    sArtDirL=foreach(mapcan x '("spectre" "spectreS" "UltraSim")  when(isDir(strcat(hArtDir x)) list(strcat(hArtDir x))))
    artDirL=foreach(mapcan dir sArtDirL foreach(mapcan x ls(dir)  when(not(rexMatchp("^\\." x)) list(strcat(dir "/" x))))) ; remove "." ".." ".sevSaveDir"
    ;; artDirL=remove(nil foreach(mapcan dir sArtDirL remove(nil foreach(mapcar x ls(dir) printf("%s_%L\n" x strcat(dir "/" x)) if(rexMatchp("^\\." x) nil strcat(dir "/" x))))))
    hDir=sprintf(nil "%s/%s/%s/" pwd() cv~>libName cv~>cellName); hierarchy directory
    cellDirL=foreach(mapcan dir ls(hDir) when(rexMatchp("state" dir) list(strcat(hDir dir)) )) ; will take things like /spectre_state1 /UltraSim_state1 ...
    
    ; cellDir=sprintf(nil "%s/%s/%s/spectre_state1/" pwd() cv~>libName cv~>cellName)
    ; cellDir could be addapted to get cds.lib pwd. and going through all cellviews. is that necessary ?
    dirList=append(artDirL cellDirL)
    foreach( simDir dirList
    when(isDir(simDir) printf("DIR:%s\n" simDir)
    files=remove(".." remove("." ls(simDir)))
    foreach( file files
    iFile=strcat(simDir "/" file)
    oFile=strcat(simDir "/" file ".fix")
    when(isFile(iFile) ; printf("FILE:%s\n" file) printf("edit %L\n" iFile)
    OUT=  outfile(oFile)
    myPort=infile(iFile)
    while( gets(nextLine myPort) rexLine=nextLine
    line=parseString(nextLine " ")
    rexLine=foreach(mapcar el line rexEl=el ; printf("EL:%L\n" el)
    when(and( rexMatchp("ams" lowerCase(el)) rexMatchp("ibm" lowerCase(el)) ) printf("Heum heum which techno ams or ibm ? modify fixAMS.il\n"))
    when(and(rexMatchp("ams" lowerCase(el)) not(rexMatchp("$AMS_DIR" el)) );prevent new modif
    rexCompile("\".*/spectre")
    rexEl=rexReplace(el "\"$AMS_DIR/spectre" 1) ;=> "((\"$AMS_DIR/spectre/c35/cmos53.scs\""
    ; printf("%L\n" line)
    change=t
    )
    when(and(rexMatchp("ibm" lowerCase(el)) not(rexMatchp("$IBM_PDK" el)) );prevent new modif
    rexCompile("\".*/IBM_PDK")
    rexEl=rexReplace(el "\"$IBM_PDK/IBM_PDK" 1) ;=> $IBM_PDK/IBM_PDK/cmrf8sf/relDM/Spectre/models/allModels.scs
    ; printf("%L\n" line)
    change=t
    ) rexEl
    ); fin des elements espaces
    fprintf(OUT "%s" buildString(rexLine " "))
    )
    when(change cmd=sprintf(nil "mv %s %s" oFile iFile) (system cmd) printf("MODIFIED by :%s\n" cmd) change=nil)
    close(myPort) close(OUT)
    ))))
    else printf("Clicl on a shematic view\n")
    )))
    

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • 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