• 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. Creat blockage from polygon?

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 144
  • Views 15269
  • 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

Creat blockage from polygon?

blankman
blankman over 8 years ago

Hi,

In virtuoso i'm wondering if its possible to create a routing blockage from a set of polygons? I have tried the auto feature however it only creates the boundary box of the selected set, not individual polygons.

Thanks in advance,

Brian.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    I threw together a few lines of SKILL to do this:

    /* CCFcreateBlockageFromSelection.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Jul 24, 2017 
    Modified   
    By         
    
    ***************************************************
    
    SCCS Info: @(#) CCFcreateBlockageFromSelection.il 07/24/17.17:04:59 1.1
    
    */
    
    /***************************************************************
    *                                                              *
    *         CCFcreateBlockageFromSelection(["routing"])          *
    *                                                              *
    *      Create routing blockages from the selected objects      *
    *                                                              *
    *                                                              *
    ***************************************************************/
    procedure(CCFcreateBlockageFromSelection(@optional (type "routing"))
      let((points temp)
        foreach(obj geGetSelSet()
          when(obj~>isShape 
            ;----------------------------------------------------------------
            ; Generate points for different source types. For paths
            ; and pathSegs, easiest to copy, convert to polygon and
            ; then use the point list.
            ;----------------------------------------------------------------
            points=
              case(obj~>objType
                ("polygon" obj~>points)
                ("rect"
                  destructuringBind(((llx lly) (urx ury)) obj~>bBox
                    list(llx:lly urx:lly urx:ury llx:ury)
                  ))
                ("path"
                  temp=dbCopyFig(obj obj~>cellView)
                  temp=dbConvertPathToPolygon(temp)
                  prog1(
                    temp~>points
                    dbDeleteObject(temp)
                  )
                )
                ("pathSeg"
                  temp=dbCopyFig(obj obj~>cellView)
                  temp=dbConvertPathSegToPolygon(temp)
                  prog1(
                    temp~>points
                    dbDeleteObject(temp)
                  )
                )
              )
            dbCreateLayerBlockage(
              obj~>cellView
              obj~>layerName
              type
              points
            )
          )
        )
        t
      )
    )
    

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • blankman
    blankman over 8 years ago
    Andrew, great, appreciated, thanks, Brian.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RK56
    RK56 over 8 years ago
    Hi Andrew,

    Why did you group the two lines inside prog?

    -Ramakrishnan
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Ramakrishnan,

    I'm using prog1 (not prog) because I want the return value of each branch in the case function to be the list of points (you'll see the return value is stored in the variable points). Because I need to retrieve the list of points from the temporary object and then delete it, I use prog1 - prog1 executes all the statements in order but the return value is the first statement executed (as opposed to the usual convention of the last thing executed). So here the prog1 returns the list of points and then deletes the object from which it had retrieved the list of points. It avoids needing to use another variable - of course, I could have moved all the points= assignments inside the case statement but I'd already written the part which handled rect and polygon and then thought I probably should add path and pathSeg for completeness.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RK56
    RK56 over 8 years ago

    Thanks Andrew. I learnt something here today.

    -Ramakrishnan

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Vishhh
    Vishhh over 7 years ago

    Thanks Andrew,. for the answer..

    Could you please let me know how to use the same proc for creating blockage of type 'placement'  ?

    I need to do it in my script..

    - Vish

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

    Vish,

    In the code above, replace:

            dbCreateLayerBlockage(
              obj~>cellView
              obj~>layerName
              type
              points
            )

    with:

            dbCreateAreaBlockage(
              obj~>cellView
              points
            )

    Note, I did not test this - it's just from reading the manual!

    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