• 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. SKILL code to generate lower routes with same path properties...

Stats

  • Locked Locked
  • Replies 24
  • Subscribers 143
  • Views 22196
  • 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

SKILL code to generate lower routes with same path properties of the selected path

Neeraj Vardhan
Neeraj Vardhan over 13 years ago

Hi,

I am trying to generate lower routes with same path properties as of the selected path. Can any one assist me how can i do it using SKILL.

Thanks  

 

  • Cancel
  • Neeraj Vardhan
    Neeraj Vardhan over 13 years ago
    rodCreatePath(
                                        
                                   ?cvId cv
                                   ?layer MBL
                                   ?width w          
                                   ?pts pnts
                                   ?choppable nil
                                   ?beginExt 0
                                   ?endExt 0
                                   ?encSubPath list(
       
                                                list(
                                                       ?layer list("M2" "drawing") 
                                                       ?beginOffset 0.0
                                                       ?endOffset 0.0
                                                       ?enclosure 0.0
                                                       ?choppable t
                                                         )
                                                    )       
            ?subRect   cond( 
                      
      (w <= 0.20
                          
       list(
           list(
                                                         ?layer   list("VIA1" "drawing")
                      ?width     0.05
                  ?length     0.05
                                                         ?beginOffset  -0.05
                                                         ?endOffset    -0.05
                                                         ?beginSegOffset 0
                                                         ?endSegOffset 0
        ;?space 0
                                                         ?sep 0
                                                         ?choppable t
                                                         ?justification "center"
        ?gap "distribute"
                    
                )      
                                                     )
                                                 )
         
         
            (w >= 0.21 && w <=0.33
      
       list( 
                                         list(
                                                         ?layer   list("VIA1" "drawing")
                      ?width     0.05
                    ?length     0.05
                      ?beginOffset  -0.05
                                  ?endOffset    -0.05
          ?beginSegOffset 0
                                                         ?endSegOffset 0
                                                         ?space via1_spc
                                                         ?sep 0.065
                                                         ?choppable t
                                                         ?justification "center"
                                                         ?gap "distribute"
                                
                                                          )
     
                      list(
                ?layer   list("VIA1" "drawing")
                      ?width     0.05
                    ?length     0.05
                              ?beginOffset  -0.05
                                                         ?endOffset    -0.05
          ?beginSegOffset 0
          ?endSegOffset 0
          ?space via1_spc
          ?sep -0.065
          ?choppable t
          ?justification "center"
          ?gap "distribute"
     
        )
                  )
          )
        
            (w >= 0.34 
      
       for(i 1 via_cont
     
       list( 
       
                                         list(
                                                         ?layer   list("VIA1" "drawing")
                      ?width     0.05
                    ?length     0.05
                      ?beginOffset  -0.05
                                  ?endOffset    -0.05
          ?beginSegOffset 0
                                                         ?endSegOffset 0
                                                         ?sep 0.0
                                                         ?choppable t
                                                         ?justification "center"
                                                         ?gap "distribute"
                                
                                                          )
     
    list(
                                                         ?layer   list("VIA1" "drawing")
                      ?width     0.05
                    ?length     0.05
                      ?beginOffset  -0.05
                                  ?endOffset    -0.05
          ?beginSegOffset 0
                                                         ?endSegOffset 0
                                                         ?space via1_spc
                                                         ?sep -(((via1_w/2)+via1_spc)*(i+1))
                                                         ?choppable t
                                                         ?justification "center"
                                                         ?gap "distribute"
                                
                                                          )
                                                    
                      list(
                ?layer   list("VIA1" "drawing")
                      ?width     0.05
                    ?length     0.05
                              ?beginOffset  -0.05
                                                         ?endOffset    -0.05
          ?beginSegOffset 0
          ?endSegOffset 0
          ?space via1_spc
          ?sep (((via1_w/2)+via1_spc)*(i+1))
          ?choppable t
          ?justification "center"
          ?gap "distribute"
     
        )
                  )
         );for 
          )    
          
          )

        );rodCreatePath_end
     
           cv=geDeleteSelSet()
    );end

    hiSetBindKey("Layout" "Ctrl<key>8" "metalStackUp()")
     
     
    i have tried to insert an for loop inside the cond statement, i got an error " mapcar: argument #2 should be a list (type template = "ul") - t"  can't we assign for loop inside an cond statement?
     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Hi Neeraj,

    The trouble is that the for() function always returns t, whereas you want something that returns an appended list of the contents from each time you call it.

    What I suggest you do is something like this:

    ; first build a list of numbers
    listOfNums=nil
    for(i 1 via_cont listOfNums=tconc(listOfNums i))
    listOfNums=car(listOfNums)
    ; then transform the list of numbers into a concatenated list of
    ; subrect lists
    foreach(mapcan i listOfNums
      list(
        list(
          ?layer ...
        )
        list(
          ?layer ...
          ?sep -(((via1_w/2)+via1_spc)*(i+1)
           ...
        )
      )
    )

    The idea is that the body of the foreach(mapcan ..) returns a list of your three subrect definitions, and these will be concatenated - so if via_cont was 3, you'd end up with a list of 9 subrect definitions. If the foreach(mapcan ...) is the last thing in the branch of the cond(), it will be the return value to the ?subRect

    There's several ways of skinning this cat, but the above is relatively straightforward.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Neeraj Vardhan
    Neeraj Vardhan over 12 years ago

    Hi andrew,

    Thankyou very much. the code is working fine.

    I am facing problem in determining the object type of selected instance/path/rect etc..

    a=geGetSelSet() 

     x=a~>objType

    if(x == "path" then

    printf("this is a path") else printf("this is not a path"))

    the above program when executed is not recognizing the objType and always prints the second statement.

     

    Thanks & Regards

    Neeraj Vardhan 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Neeraj,

    That would be because geGetSelSet() returns a list of the selected objects, and so your variable a will be a list. Because of that, x will also be a list of object types - so it will be ("path") rather than "path". Commonly people write code that only deals with a single selected object, in which case if your first line was a=car(geGetSelSet()) it would work. Or instead you could do:

    foreach(a geGetSelSet()
      x=a~>objType
      ...
    )

    and then it would do the statements in the body of the foreach for each selected object.

    Regards,

    Andrew

    • 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