• 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. Top metal information to get the entire library cell vi...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 14704
  • 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

Top metal information to get the entire library cell views

Purge2343
Purge2343 over 5 years ago

procedure(abGetHighestLayer(@key (cv dbOpenCellViewByType(library_name cell_name "layout" "maskLayout" "r")) (function "metal")
acrossHierarchy)
let((tf topToBottom usedLayers)
;----------------------------------------------------------------
; Figure out the order of the layers matching the given function
; and put it in reverse order
;----------------------------------------------------------------
tf=techGetTechFile(cv)
topToBottom=reverse(
mapcar('car
setof(layerFunc techGetLayerFunctions(tf) cadr(layerFunc)==function)
)
)
;----------------------------------------------------------------
; Now collect all the layers used in the design. If ?acrossHierarchy t
; was provided, then include those in lower level cellViews (if opened)
;----------------------------------------------------------------
usedLayers=makeTable('usedLayers nil)
foreach(lpp cv~>lpps
when(acrossHierarchy || !zerop(lpp~>nShapes)
usedLayers[lpp~>layerName]=t
)
)
;----------------------------------------------------------------
; Find the first top to bottom layer that's in the design
;----------------------------------------------------------------
car(exists(layer topToBottom usedLayers[layer]))
)
)
printf("cell Name %s\n",cell_name)
printf("Metal value %s\n",abGetHighestLayer())
filePtr = outfile("metal.txt" "a")
ocnPrint( ?output filePtr cell_name)
ocnPrint( ?output filePtr abGetHighestLayer())
hiRegTimer("exit()" 40)

I got this code from online.

I wanted to know if I want send just the library name and get entire library cell views metal information.

Kindly let me know where I can add foreach loop to get the information i needed.

Thanks 

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

    This is very odd. You've taken the code in this post and changed the default value of cv in a way that doesn't make a great deal of sense. 

    You've then got a strange mix of print statements and OCEAN print statements to produce a report. I also have no idea why you're using hiRegTimer to exit the script.

    If you are trying to find the the highest metal layer in all layout views in a library, then something like this would work:

    /* abHighestLayerInAllCells.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Apr 06, 2020 
    Modified   
    By         
    
    Produce a report of the highest metal layer for each
    cell in a library.
    
    Uses abGetHighestLayer
    
    ***************************************************
    
    SCCS Info: @(#) abHighestLayerInAllCells.il 04/06/20.18:23:51 1.1
    
    */
    
    /***************************************************************************
    *                                                                          *
    *               abHighestLayerInAllCells(libName reportFile)               *
    *                                                                          *
    * Produce a report listing the highest metal layer in each layout cellView *
    *                               in a library                               *
    *                                                                          *
    ***************************************************************************/
    
    procedure(abHighestLayerInAllCells(libName reportFile)
        let((lib fout masterFile cv highest)
            fout=outfile(reportFile)
            unless(fout
                error("Cannot write to file %L\n" reportFile)
            )
            lib=ddGetObj(libName)
            foreach(cell lib~>cells
                foreach(view cell~>views
                    masterFile=ddGetObj(libName cell~>name view~>name "*")
                    when(masterFile && ddMapGetFileViewType(masterFile)=="maskLayout"
                        cv=dbOpenCellViewByType(libName cell~>name view~>name)
                        when(cv
                            highest=abGetHighestLayer(?cv cv)
                            when(highest
                                fprintf(fout "%s %s %s\n" cell~>name view~>name 
                                    highest
                                )
                            )
                            dbClose(cv)
                        )
                    )
                )
            )
            close(fout)
        )
    )
    

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

    Thank you
    Is there any change I can make on this code to get via information as well?

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

    Thank you
    Is there any change I can make on this code to get via information as well?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Purge2343
    Purge2343 said:
    Is there any change I can make on this code to get via information as well?

    Yes. If you know what you mean by "via information", then I'm sure you can make changes to the code to add that. Unfortunately I don't know what you mean by "via information", so I can't help with the specifics.

    Andrew.

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

    Thank you for your response.

    I mean to get the  information of the top or the highest via layer used in the layout.

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

    In the innermost loop (next to where it assigns the highest variable), you could use something like:

    highestCut=abGetHighestLayer(?cv cv ?function "cut") || ""

    (add highestCut into the local variables in the let) and then update the fprintf statement to print out the value of highestCut too. I added the || "" so that it returned a blank string if there's no cut layers in the cellView.

    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