• 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. Not able to create rectangle over via in hierarchy

Stats

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

Not able to create rectangle over via in hierarchy

savvysaggi
savvysaggi over 14 years ago
Hello,
I am working on one skill which creates metal rectangles on via  in hierarchy.
cv=geGetEditCellView()
;println(cv)
listsofar=list()
procedure(TrHierarchyTransversal(cv listsofar)
;cv=geGetWindowCellView()
;println(cv~>instances~>master)
foreach(master cv~>instances~>master
let((nextcellview)
nextcellview=master
cond(
(!nextcellview nil)
(member(nextcellview listsofar) println("its member"))
(t
if(!listsofar
then
a=car(setof(via cv~>vias via~>viaHeader~>viaDefName=="B2YZIA"))
        ;println(a~>viaHeader~>viaDefName)
    pbox=a~>bBox
  
            dbCreateRect(cv "M6" pbox)
      
          
);if
listsofar=TrHierarchyTransversal(nextcellview cons(nextcellview listsofar))
cv1=(car(listsofar)~>cellView)
;println(cv)
a=car(setof(via cv1~>vias via~>viaHeader~>viaDefName=="B2YZIA"))
        ;println(a~>viaHeader~>viaDefName)
    pbox=a~>bBox
 
            dbCreateRect(cv1 "M6" pbox)
   
;);if
);t
);cond
);let
);foreach
listsofar
);procedure
ISSUE:
I this skill , it creates rectangle on via according to hierarchy level (eg. If via is present till 4th hierarchy of top then it creates rectangle over via four times)
Kindly check for the same as i am unable to catch the issue .
Kindly help me out.
Thanks & Regards
Savvy
  • Cancel
Parents
  • kb how
    kb how over 14 years ago

    Hi Savvy,

    On top of your coding, i did some modication as your request. Please refer below. At the same time i added some comment on it for each step.

    procedure( TrHierarchyTransversal(cv listsofar @key save)
       let((vias cvId pbox)

          ;-------------------------------
          ; Foreach every instanceMaster
          ;-------------------------------
          foreach(master setof(x cv~>instanceMasters !member(x listsofar))

             ;---------------------------
             ; Store cell that visited
             ;---------------------------
             listsofar = cons(master listsofar)

             ;---------------------------------------
             ; Check whether the cell got via or not
             ;---------------------------------------
             when( (vias = setof(via master~>vias via~>viaHeader~>viaDefName=="B2YZIA"))
                ;---------------------------------
                ; Via found. Open cv in edit mode
                ;----------------------------------
                if( (cvId = dbOpenCellViewByType(master~>libName master~>cellName master~>viewName nil "a")) then
                   foreach( via vias
                      pbox = via~>bBox
                      dbCreateRect(cvId "M6" pbox)
                   );foreach

                   ;---------
                   ; Save it
                   ;---------
                   when( save
                      dbSave(cvId)
                   );when

                else
                   ;------------------------------------
                   ; Failed to open, print warning msg
                   ;------------------------------------
                   warn("Failed to open cellview in edit mode.[%L %L %L]\n" master~>libName master~>cellName master~>viewName)
                );
                TrHierarchyTransversal(master listsofar ?save save)
             );foreach
          );foreach
       );let
    );procedure

     This is just a scratch coding, you may need to enhanced it as well.

    Happy testing

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • kb how
    kb how over 14 years ago

    Hi Savvy,

    On top of your coding, i did some modication as your request. Please refer below. At the same time i added some comment on it for each step.

    procedure( TrHierarchyTransversal(cv listsofar @key save)
       let((vias cvId pbox)

          ;-------------------------------
          ; Foreach every instanceMaster
          ;-------------------------------
          foreach(master setof(x cv~>instanceMasters !member(x listsofar))

             ;---------------------------
             ; Store cell that visited
             ;---------------------------
             listsofar = cons(master listsofar)

             ;---------------------------------------
             ; Check whether the cell got via or not
             ;---------------------------------------
             when( (vias = setof(via master~>vias via~>viaHeader~>viaDefName=="B2YZIA"))
                ;---------------------------------
                ; Via found. Open cv in edit mode
                ;----------------------------------
                if( (cvId = dbOpenCellViewByType(master~>libName master~>cellName master~>viewName nil "a")) then
                   foreach( via vias
                      pbox = via~>bBox
                      dbCreateRect(cvId "M6" pbox)
                   );foreach

                   ;---------
                   ; Save it
                   ;---------
                   when( save
                      dbSave(cvId)
                   );when

                else
                   ;------------------------------------
                   ; Failed to open, print warning msg
                   ;------------------------------------
                   warn("Failed to open cellview in edit mode.[%L %L %L]\n" master~>libName master~>cellName master~>viewName)
                );
                TrHierarchyTransversal(master listsofar ?save save)
             );foreach
          );foreach
       );let
    );procedure

     This is just a scratch coding, you may need to enhanced it as well.

    Happy testing

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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