• 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 place all layout cells in a Virtuoso lib to...

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 143
  • Views 21838
  • 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 place all layout cells in a Virtuoso lib to top level cell

mantang
mantang over 7 years ago

Hi

I would like to instantiate all layout cells in a lib to newly created top cell and run DRC on all cells at the same time. Each layout cell cannot be overlapped in the top cell.

Does anyone have SKILL code or similar code to achieve this goal ?

Thanks,

ManChak

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 7 years ago

    /* CCFplaceAllInstances.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Dec 01, 2017 
    Modified   
    By         
    
    Place an instance of each layout in a library into a cellView
    
    examples 
    
    CCFplaceAllInstances(?libName "stdcellLib" ?viewName "layout" ?columns 20
       ?spacing 2.0)
    CCFplaceAllInstances(?cv cvId ?libName "stdcellLib" ?spacing 4.0)
    
    ***************************************************
    
    SCCS Info: @(#) CCFplaceAllInstances.il 12/01/17.06:33:20 1.1
    
    */
    
    /***************************************************************
    *                                                              *
    *      CCFplaceAllInstances(@key (cv geGetEditCellView())      *
    *         libName viewName (spacing 5.0) (columns 10))         *
    *                                                              *
    *    Place an instance of every layout from library libName    *
    *  with view viewName (or if viewName not specified, pick all  *
    *   maskLayout view types from the library) in rows with up    *
    * to columns instances per row. Additional spacing (specified  *
    *    by the ?spacing argument) is added between instances.     *
    *                                                              *
    ***************************************************************/
    
    procedure(CCFplaceAllInstances(@key (cv geGetEditCellView()) 
        libName viewName (spacing 10.0) (columns 10))
      let((master masterDdId (x 0.0) (y 0.0) maxY width height (column 0))
        ;--------------------------------------------------------------------
        ; Iterate over all cells and views in the library, and either pick the
        ; matching viewName or views with type maskLayout
        ;--------------------------------------------------------------------
        foreach(cell ddGetObj(libName)->cells
          foreach(view cell->views
            master=nil
            if(viewName then
              when(view->name==viewName
                master=dbOpenCellViewByType(libName cell->name viewName)
              )
            else
              masterDdId=ddGetObj(libName cell->name view->name "*")
              when(masterDdId && ddMapGetFileViewType(masterDdId)=="maskLayout"
                master=dbOpenCellViewByType(libName cell->name view->name)
              )
            )
            when(master
              ;--------------------------------------------------------------
              ; Place instance, and then increment position based on size of
              ; the instance placed
              ;--------------------------------------------------------------
              destructuringBind(((llx lly) (urx ury)) master~>bBox
                width=urx-llx
                height=ury-lly
                maxY=if(maxY max(maxY height) height)
                dbCreateInst(cv master "" x-llx:y-lly "R0")
                column=mod(column+1 columns)
                if(zerop(column) then
                  x=0.0
                  y=y+maxY+spacing
                  maxY=nil
                else
                  x=x+width+spacing
                )
                dbClose(master)
              )
            )
          )
        )
        t
      )
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • annesha
    annesha over 5 years ago in reply to Andrew Beckett

    I am trying out this code and getting an error that says argument missing

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to annesha

    If you provide the actual error message, there's a chance that I might be able to help you. Without that I have no idea if there's something wrong with the code, or something wrong with how you've entered the code, or something wrong with what you're doing.

    Please also provide the sub-version of the IC tools you're using (what Help->About shows).

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • annesha
    annesha over 5 years ago in reply to Andrew Beckett

    This is error message showing:

    *Error* CCFplaceAllInstances: extra arguments or keyword missing - ("ibm" "layout" "20" "2.0")
    <<< Stack Trace >>>
    CCFplaceAllInstances("ibm" "layout" "20" "2.0")
    (... in leHiCreateInst ...)
    leHiCreateInst()

    version being: CADVM18.1-64b.500.10

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • annesha
    annesha over 5 years ago in reply to annesha

    This is how the function call was made:

    CCFplaceAllInstances("lib_name" "layout" 20 2.0)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to annesha

    It's defined as a keyword argument function, and so you can't pass positional arguments. You'd need to do:

    CCFplaceAllInstances(?libName "ibm" ?viewName "layout" ?columns 20 ?spacing 2.0)

    (as shown in the comments at the top of the code). Missing out the ?libName, ?viewName etc keywords won't work.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • annesha
    annesha over 5 years ago in reply to Andrew Beckett

    Thanks a lot!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • annesha
    annesha over 5 years ago in reply to Andrew Beckett

    Thanks a lot!

    • 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