Home > Community > Forums > Custom IC SKILL > Skill code to find all text labels in a schematic hierarchically

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Skill code to find all text labels in a schematic hierarchically 

Last post Tue, Jul 30 2013 12:54 AM by marcelpreda. 2 replies.
Started by DineshBabu 19 Jul 2013 06:01 AM. Topic has 2 replies and 548 views
Page 1 of 1 (3 items)
Sort Posts:
  • Fri, Jul 19 2013 6:01 AM

    • DineshBabu
    • Not Ranked
    • Joined on Mon, Feb 27 2012
    • Vilvoorde, Belgium
    • Posts 6
    • Points 120
    Skill code to find all text labels in a schematic hierarchically Reply

    Hello,

    I would like to search and find all text labels in a schematic hierarchially.

    The text labels along with the corresponding cell names should be dumped in a file.

    Is it something that could be done with a skill code?

    Regards,

    Dinesh 

    Filed under: , ,
    • Post Points: 35
  • Fri, Jul 19 2013 6:20 AM

    • ebecheto
    • Top 200 Contributor
    • Joined on Fri, Oct 10 2008
    • Villeurbanne, Rhone
    • Posts 38
    • Points 685
    Re: Skill code to find all text labels in a schematic hierarchically Reply

     I made someting like that a moment ago.

    Here is the exemple code. You might modify it to your needs.

     

    ;; _______________study a new library : lib2csv
    defun( lib2csv (@optional (libName "ts018_prim") (row t) (verb t)) let((masterList file pf cv inst cdfgData srow)
    ddLibName=car(setof(lib ddGetLibList() lib~>name==libName))
    if(row srow="_row" srow="")
    cv=dbOpenCellViewByType( "ANALOG_TUT" "tmp" "schematic" "schematic" "w")
    masterList=ddLibName~>cells
    file=strcat( pwd() "/" libName srow ".csv")
    pf=outfile(file)  ; desactive la non creation du fichier, ce n est pas si long que ca.
    when(verb printf("Treating %d-cells" length(masterList)))
    foreach(cell masterList
    when(member("symbol" dbAllCellViews(ddLibName cell~>name))  mast=dbOpenCellViewByType(libName cell~>name "symbol")
    fprintf(pf "%s;%L;" cell~>name mast~>terminals~>name)
    inst=(dbCreateInst cv mast nil 0:0 "R0")
    cdfgData=(cdfGetInstCDF inst)
    foreach(par cdfgData~>parameters
    fprintf(pf "%s;%s;%L;%s;%L;" par~>name par~>prompt par~>value par~>paramType par~>defValue)
    when(row fprintf(pf "\n"))
    );end loop properties
    fprintf(pf "\n")
    printf("%s||%L\n" cell~>name mast~>??)
    ))
    close(pf) sprintf(cmd  "cp %s ~/groupU/RunT2K/." file)
    system(cmd)
    )) ; lib2csv("tsl18fs120") lib2csv("ts018_prim") lib2csv("cmos8rf") lib2csv("cmrf8sf") lib2csv("CORELIB")
    
     

    ++Ed

    • Post Points: 5
  • Tue, Jul 30 2013 12:54 AM

    • marcelpreda
    • Top 150 Contributor
    • Joined on Tue, Jan 19 2010
    • Bucharest, Romania
    • Posts 43
    • Points 695
    Re: Skill code to find all text labels in a schematic hierarchically Reply

     HI Dinesh,

    Assuming in in cv variable you have the schematic cell view open,  you can define a proc that should do something like:

    all_labels = setof(l cv->shapes l->objType=="label")
    ;; to see the text
    all_labels~>theLabel


    For hierarchy traversal the you can implement a recursive proc and to try to open the schematic of all symbols in the cv,

    something like

    foreach(i cv->instances

        if( newCV = dbGetAnyInstSwitchMaster(i "schematic") then

             ;; there is schematic, show labels and do recursive call

        )

    )

    BR,

    Marcel

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by DineshBabu at 19 Jul 2013 06:01 AM. Topic has 2 replies.