• 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. Digital Implementation
  3. why script error ?

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 90
  • Views 12946
  • 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

why script error ?

archive
archive over 18 years ago

set instcnt 0                                                                  
set cellcnt 0                                                                  
set f [open total w]                                                            
dbForEachHeadCell [dbgHead] cellPtr {                                          
        set cellName [dbCellName $cellPtr]                                      
        dbForEachCellInst $cellPtr instPtr {                                    
                set instName [dbInstName $instPtr]                              
                puts stdout "inst name: $instName"                              
                puts $f "inst name: $instName"                                 
                incr instcnt                                                   
        }                                                                       
        incr cellcnt                                                            
}                                                                              
puts stdout "cell num:  $cellcnt"                                               
puts stdout "inst num:  $instcnt"

when I ran this script , error occured as shown :
**DIAG[rdaTclDbCmd.c:2977:dbiForEachCellInstCmd]: Assert "!dbmIsInstVInst(dbmCellInstList((dbsCell *)p))"
Wrong pointer type: "dbcObjVInst" (should be "dbcObjInst") in "dbInstName"
Usage: dbInstName Bad return code in "dbForEachCellInst"Bad return code in "dbForEachHeadCell"

anyone can help me ?


Originally posted in cdnusers.org by Dota
  • Cancel
  • archive
    archive over 18 years ago

    Hi Dota,

    I think the script is erroring out when you're trying to loop through each instance associated with a master cell here:

    dbForEachCellInst $cellPtr instPtr {

    dbForEachCellInst is intended to be used to loop through a "head" cell rather than a leaf cell. Here's a re-written version that I think does what you're looking for:

    set instcnt 0
    set cellcnt 0
    set f [open total w]
    dbForEachHeadCell [dbgHead] cellPtr {
    incr cellcnt
    set cellName [dbCellName $cellPtr]
    puts "[dbCellName $cell]"
    puts $f "cell name: $cellName"
    }
    dbForEachCellInst [dbHeadTopCell] instPtr {
    set instName [dbInstName $instPtr]
    puts "inst name: $instName"
    puts $f "inst name: $instName"
    incr instcnt
    }
    puts "cell num: $cellcnt"
    puts "inst num: $instcnt"

    Let me know if this does what you're looking for, and if not let me know a little more about what you're trying to accomplish.

    Thanks!
    Bob


    Originally posted in cdnusers.org by BobD
    • 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