Re: Regarding tcl/tk scripting
Below command will select all the cells starting with name BUF. Instead of BUF* you can give any cell name. dbSelectObj [dbGet -p2 [Link] BUF*].name
Re: To find number of cells which are unplaced after placement?
The dbGet command can used interactively to explore the design. Below are some useful single line dbGet scripts: 1. To get a list of unplaced instances in the design: dbGet [dbGet -p [Link] unplaced].name 2. To list all the placed instances in the design: dbGet [dbGet -p [Link] placed].name 3. To list all the fixed instances in the design: dbGet [dbGet -p [Link] fixed].name 4. To see what metal layers your block's IO pins are on: dbGet [Link] 5. To get a list of NONDEFAULT rules in the design: dbGet [Link] 6. To get NDR applied on a specified net: dbGet [dbGet -p [Link] netName].[Link] 7. To get the placement status of an instance: dbGet [dbGetInstByName instName].pStatus 8. To get the points of a rectangular routing blockage: dbGet [Link] 9. To get the points of a rectilinear routing blockage: dbGet [Link] 10. To get a list of all cell types used in the design: dbGet -u [Link]
(The "-u" filters out duplicate objects.) 11. To get the size of block placement halos: dbGet [dbGet -p2 [Link] block*].pHaloTop dbGet [dbGet -p2 [Link] block*].pHaloBot dbGet [dbGet -p2 [Link] block*].pHaloLeft dbGet [dbGet -p2 [Link] block*].pHaloRight 12. To get the size and top/bottom layers of block routing halos: dbGet [dbGet -p2 [Link] block*].rHaloSideSize dbGet [dbGet -p2 [Link] block*].[Link] dbGet [dbGet -p2 [Link] block*].[Link] 13. To make sure all your tiehi/lo connections have tie cells (and are not connected to a rail instead): dbGet [Link] 1 dbGet [Link] 1 (Should return "0x0" if all connections have tie cells. If "1"s are returned, use the following to find the terms that still need a tie cell:) dbGet [dbGet -p [Link] 1].name dbGet [dbGet -p [Link] 1].name 14. To get all insTerm names which are tied to tieLo cells: dbGet [dbGet -p [dbGet -p2 [Link] coreTieLo].[Link] 1].name 15. To change the routing status of a net (for example, from FIXED to ROUTED): dbSet [dbGet -p [Link] netName].[Link] routed 16. To get the status of your design: dbGet [Link] dbGet [Link] dbGet [Link] dbGet [Link] dbGet [Link] dbGet [Link] 17. To find out which layers are used in a net: dbGet [dbGet -p [Link] netName].[Link] 18. To find all the instances of a certain cell type: dbGet [dbGet -p2 [Link] cellName].name 19. To get the size of a cell in the library, but not necessarily in the current design: dbGet [dbGetCellByName cellName].size
20. To get nets that are marked in the db as clock net: dbGet [dbGet -p [Link] 1].name 21. To set all instances with a particular pattern in its name to fixed status: dbSet [dbGet p [Link] *clk*].pStatus fixed 22. To get database units: dbGet [Link] 23. To get manufacturing grid: dbGet [Link] 24. To get physical only cells like filler cell, end cap cell etc: dbGet [dbGet -p [Link] 1].name 25. To filter all the PG pins with direction bidi of a specific instance: dbGet [dbGet -p [dbGet -p [Link] instName].[Link] bidi].name 26. To get class and subClass of a cell: dbGet [dbGetCellByName cellName].baseClass dbGet [dbGetCellByName cellName].subClass 27. To find out the instname/cellname of the driver driving a specific net. set netName <netName> set inst [dbGet [dbGet -p [dbGet -p [Link] $netName].[Link] 1].inst] Puts "Net: $netName, driving inst name: [dbGet $[Link]], driving cell name: [dbGet $[Link]]" 28. To list all layers for the pin of a cell: dbGet [dbGet -p [Link] pinName].[Link] 29. Report points of polyon that forms the die area: dbShape -output polygon [dbGet [Link]] 30. To query the max_cap for a list of cells set cellPtrList [dbGet -p [Link] BUF*] foreach cellPtr $cellPtrList {puts "[dbGet $[Link]] [dbFTermMaxCap [dbGet -p $[Link] <termName>] 1]"} 31. To find all instances with a specify property name "myProp" (string property type) and value "xyzzy" set inst_ptrs [dbGet -p [Link] {.name == "myProp" && .value == "xyzzy"] Puts "Instances with property myProp and value xyzzy: [dbGet $inst_ptrs.name]"