赞
踩
You can use the following single-line dbGet scripts to explore various aspects of your design:
dbGet [dbGet -p top.insts.pStatus unplaced].name
dbGet [dbGet -p top.insts.pStatus placed].name
dbGet [dbGet -p top.insts.pStatus fixed].name
dbGet top.terms.pins.allShapes.layer.name
dbGet head.rules.name
dbGet [dbGet -p top.nets.name netName].rule.name
dbGet [dbGet top.nets.maxVoltage value –p].name
dbGet [dbGet top.nets.minVoltage value –p].name
dbGet [dbGetInstByName instName].pStatus
dbSet [dbGetInstByName <flop_name>].dontSplitMultibit 1
dbSet [dbGetInstByName <flop_name>].dontMergeMultibit 1
dbGet top.fplan.rBlkgs.shapes.rect
dbGet top.fplan.rBlkgs.shapes.poly
dbGet -u top.insts.cell.name
Note: The "-u" parameter filters out the duplicate objects.
dbGet [dbGet -p2 top.insts.cell.subClass block*].pHaloTop
dbGet [dbGet -p2 top.insts.cell.subClass block*].pHaloBot
dbGet [dbGet -p2 top.insts.cell.subClass block*].pHaloLeft
dbGet [dbGet -p2 top.insts.cell.subClass block*].pHaloRight
dbGet [dbGet -p2 top.insts.cell.subClass block*].rHaloSideSize
dbGet [dbGet -p2 top.insts.cell.subClass block*].rHaloBotLayer.name
dbGet [dbGet -p2 top.insts.cell.subClass block*].rHaloTopLayer.name
dbGet top.insts.instTerms.isTieHi 1
dbGet top.insts.instTerms.isTieLo 1
The previous commands should return "0x0" if all connections have tie cells. If "1s" are returned, use the following commands to find the terms that still need a tie cell:
dbGet [dbGet -p top.insts.instTerms.isTieHi 1].name
dbGet [dbGet -p top.insts.instTerms.isTieLo 1].name
dbGet [dbGet -p [dbGet -p2 top.insts.cell.subClass coreTieLo].instTerms.net.allTerms.isInput 1].name
dbSet [dbGet -p top.nets.name netName].wires.status route
dbGet top.statusIoPlaced
dbGet top.statusPlaced
dbGet top.statusClockSynthesized
dbGet top.statusRouted
dbGet top.statusRCExtracted
dbGet top.statusPowerAnalyzed
dbGet [dbGet -p top.nets.name netName].wires.layer.name
dbSelectObj [dbget [dbget -p [dbGet -p top.nets.name $net].shieldNets.name GND].sWires.shieldNet.name $net -p2]
NOTE: $net is the net for which you want to select the shield.
dbGet [dbGet -p2 top.insts.cell.name cellName].name
dbGet [dbGetCellByName cellName].size
dbGet [dbGet -p top.nets.isClock 1].name
Note: Before running the previous command, build a timing graph using the timeDesign command.
dbSet [dbGet –p top.insts.name *clk*].pStatus fixed
dbGet [dbGet -p head.routeTypes.name routeTypeName].topPreferredLayer.num
dbGet [dbGet -p head.routeTypes.name routeTypeName].bottomPreferredLayer.num
dbGet head.dbUnits
dbGet head.mfgGrid
dbGet [dbGet -p top.insts.isPhysOnly 1].name
dbGet [dbGet -p top.insts.dontTouch true].name
dbGet [dbGet -p head.libCells.dontUse 1].name
dbGet [dbGet -p top.insts.isJtagElem 1].name
dbGet [dbGet -p top.insts.isSpareGate 1].name
dbGet [dbGet -p [dbGet -p top.insts.name instName].pgCellTerms.inOutDir bidi].name
proc getInstPGConnect {c} {
set inst [dbget -p top.insts.name $c]
puts "PG connection of instance $c:"
foreach PGT [dbget $inst.pgCellTerms.name] {
puts "\tPin : $PGT --> Net: [dbget [dbPGTermNet [dbGetPGTermByName $inst $PGT]].name]" }
}
dbGet [dbGetCellByName cellName].baseClass
dbGet [dbGetCellByName cellName].subClass
selectInst [dbGet [dbGet top.hInst.allTreeInsts.cell.baseClass block -p2].name <specify_module_name> ]
selectModule <module_name>
dbGet [dbGet selected.insts.cell.isSequential 1 -p2].name
set netName netName
set inst [dbGet [dbGet -p [dbGet -p top.nets.name $netName].allTerms.isOutput 1].inst]
Puts "Net: $netName, driving inst name: [dbGet $inst.name], driving cell name: [dbGet $inst.cell.name]"
dbGet [dbGet -p selected.cell.terms.name pinName].pins.allShapes.layer.extName
dbShape -output polygon [dbGet top.fPlan.boxes]
dbGet [ dbGet -p1 top.hInst.allTreeInsts.name $moduleInstName].hInstTerms.hTerm.name
lindex [dbGet [dbGet top.hinst.hinstTerms.term.name <pin_name> - p].pins.allShapes.shapes.rect] 0
dbGet [dbGet top.hinst.hinstTerms.term.name <pin_name> -p].pins.allShapes.layer.num
cellPtrList [dbGet -p head.allCells.n ame BUF*]
foreach cellPtr $cellPtrList {puts "[dbGet $cellPtr.name] [dbFTermMaxCap [dbGet -p $cellPtr.terms.name termName] 1]"}
set inst_ptrs [dbGet -p top.insts.props {.name == "myProp" && .value == "xyzzy"]
Puts "Instances with property myProp and value xyzzy: [dbGet $inst_ptrs.name]"
dbGet [dbGet -p [dbGet -p2 top.terms.net.isClock 0].isInput 1].name
dbGet head.sites.name
dbGet head.sites.size
dbIsTechSiteVDDOnBottom [dbGet head.sites.name <name> -p]
You can query the subclass for a cell to check whether it is welltap, tiehigh, tielow or end cap:
dbGet [dbGet -p head.libCells.subClass <subClassName>].name
For example, to get names of well tap cells (specified as ‘CLASS CORE WELLTAP ‘ in LEF), you can use the following command:
dbGet [dbGet -p head.libCells.subClass coreWellTap].name
Similarly, to get names of tie high / tie low cells (specified as ‘CLASS CORE TIEHIGH’ or ‘CLASS CORE TIELOW’ in LEF), use the following command:
dbGet [dbGet -p head.libCells.subClass coreTieHigh].name
OR
dbGet [dbGet -p head.libCells.subClass coreTieLow].name
To report endcap cells (specified as ‘CLASS ENDCAP’ in LEF), use the following command:
dbGet [dbGet -p head.libCells.subclass coreEndCap*].name
Similarly, to query filler cells with ‘CLASS CORE SPACER’ in the LEF syntax, you can use the following command (similar to other physical-only cells):
dbGet [dbGet -p head.libCells.subClass coreSpacer].name
foreach module_name [dbGet top.hInst.treeHInsts.cell.name] {
Puts "$module_name"
}
This will not include the top module name. To get the top module name, run the following command:
dbGet top.name
foreach leaf_name [dbGet -u top.insts.cell.name] {
Puts "$leaf_name"
}
Select the instances on which to apply set_dont_touch. For example, select all level-shifter instances with the "LS" prefix:
dbGet top.insts.name LS*
Then, run the following command:
foreach term [dbGet selected.instTerms.net.term –e] {
set_dont_touch [dbGet $term.net.name] true
}
proc skiproutesOnHmsNets {hmInstPattern} {
deselectAll
selectInst *$hmInstPattern*
dbset selected.hinst.hnets.net.skipRouting 1
deselectAll
}
Incase some nets are routed over the Hard Macros, you can remove such nets along with pitches and vias using following command:
foreach c [dbGet [dbGet -p2 top.insts.cell.baseClass block].name] {
set j [dbGet -p top.insts.name $c ]
dbSelectObj [dbQuery -area [dbGet $j.box ] -objType regular]
puts "Deleting object at [dbGet $j.box ] within Block [dbget $j.name]"
editDelete -selected -type Signal -use SIGNAL
}
llength [dbGet [dbGet -p top.nets.isPwrOrGnd 0].vias]
Include following set of command to break the script if metal fill is not added to design
puts "Checking if run_pvs_metal_fill successfully inserted metal fill shapes..."
if {[dbGet [dbGet -p top.nets.name _FILLS_RESERVED].sWires.shape fillwire] >= 0} {
puts "db has metal fill - continuing..."
set has_fill 1
} else {
puts "db has no metal fill - stopping dfm run..."
set has_fill 0
}
if {$has_fill < 1} {
break
} else { .. < rest of of your script>
Report instance pin shape mask
You can use TCL procedure below to report the mask(color) of the instance pin:
proc pinColor {instPin layer} {
if {![regexp $layer [dbGet [dbGet top.insts.instTerms.name $instPin -p].cellTerm.pins.allShapes.layer.name]]} {
Puts "$instPin doesn't have pin shape on $layer"
} else {
dbGet [dbGet [dbGet top.insts.instTerms.name $instPin -p].cellTerm.pins.allShapes.layer.name $layer -p2].shapes.mask
}
}
pinColor Ainst/o VIA1
Following script prints the latency of all memories with cell name *RAM* and clock pin name *CLK. You can change *RAM* with cell name of the desired memories, or as per your design.
set mem_pin [dbget [dbget top.insts.cell.name *RAM* -p2].instTerms.name *CLK]
foreach i $mem_pin {
puts "$i [get_property [get_pins $i] actual_latency_late_rise_max]"
}
Report all flop instances with reset pin connected to the supply
# dentify all flops with reset tied directly to the vss rail
# report total count, and each instname and cellname to an
# output file named 'flop_with_tied_rst.rpt'
proc findRstPinsTiedToRail{ $VSS_name $RSTport } {
# don't echo dbGet, etc. to screen/log:
setPreference CmdLogMode 1
# output file name:
set ofile "flop_with_tied_rst.rpt"
set ecofp [ open $ofile w ]
set cnt [llength [dbGet [dbGet [dbGet top.nets.name $VSS_name -p].instTerms.cellTerm.name $RSTport -p2 ].inst.name ]]
set insts [dbGet [dbGet [dbGet top.nets.name $VSS_name -p].instTerms.cellTerm.name $RSTport -p2 ].inst ]
set cnt2 [llength $insts]
puts $ecofp "Total: $cnt $cnt2"
#foreach inst_ptr [dbGet [dbGet [dbGet top.nets.name $VSS_name -p].instTerms.cellTerm.name $RSTport -p2 ].inst ]
foreach inst_ptr $insts {
set inst_name [dbGet $inst_ptr.name]
set cell_ptr [dbInstCell $inst_ptr]
set cell_name [dbGet $cell_ptr.name]
set rst_port [dbGet $inst_ptr.instTerms.cellTerm.name $RSTport -p2]
set net [dbGet $rst_port.net.name]
puts $ecofp "$inst_name $cell_name "
}
close $ecofp
}
To get the status of a design:
encounter> dbGet top.?? status* // reports the list of status at particular stage
statusClockSynthesized: 0
statusGRouted: 0
statusIoPlaced: 1
statusPlaced: 1
statusPowerAnalyzed: 0
statusRCExtracted: 0
statusRouted: 1
statusScanOpted: 0
Example to check a particular value:
encounter> dbGet top.statusPlaced
1 // it shows design is placed
Note: The top.statusClockSynthesized flag is only for FE-CTS [setCTSMode -engine ck] not for CCOpt.
The following script will find the clock gates and the flops connected to the clk pin in the design and group them together using createSdpGroup
Script:
set clock_gates [dbget [dbget top.insts.cell.name *cgc* -p2].instTerms.name *clk -p2]
foreach i $clock_gates {
## find clock net of the clock gate
set clock_net [dbget $i.instTerms.name *clk -p]
set sdp_group_name [string map {/ _} [join [dbget $i.name] ""]]
set flops [dbget [dbget $clock_net.net.instTerms.isInput 1 -p].inst.name ]
createSdpGroup -name $sdp_group_name -alignByPinName clk -inst $flops
}
Note: Please use cell name and clock pins name(cgc and clk used for example) as per the library specifications.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。