dbGet commands
#!/usr/bin/tclsh
set instances_name [dbGet top.insts.name]
set instances_count [llength $instances_name]
set sequential_cells [dbGet [dbGet -p2 top.insts.cell.IsSequential 1].name]
set sequential_count [llength $sequential_cells]
set buffers [dbGet [dbGet -p2 top.insts.cell.isBuffer 1].name]
set buffers_count [llength $buffers]
set Power_switch_cells [dbGet [dbGet -p2 top.insts.cell.isPowerSwitch 1].name]
set Power_switch_count [llength $Power_switch_cells]
set inverter_cells [dbGet [dbGet -p2 top.insts.cell.isInverter 1].name]
set inverter_count [llength $inverter_cells]
set level_shifter_cells [dbGet [dbGet -p2 top.insts.cell.isLevelShifter 1].name]
set level_shifter_count [llength $level_shifter_cells]
set retention_cells [dbGet [dbGet -p2 top.insts.cell.isRetention 1].name]
set retention_count [llength $retention_cells]
set isolation_cells [dbGet [dbGet -p2 top.insts.cell.isIsolationCell 1].name]
set isolation_count [llength $isolation_cells]
set physical_cells [dbGet [dbGet -p top.insts.isPhysOnly 1].name]
set physical_cells_count [llength $physical_cells]
puts "total instances list is :$instances_name"
puts "Total sequential cells list is: $sequential_cells"
puts $isolation_cells
puts $Power_switch_cells
puts $buffers
puts $inverter_cells
puts $level_shifter_cells
puts $retention_cells
puts $physical_cells
puts "total instances count in the design is : $instances_count"
puts "Total sequential cells count is :$sequential_count"
puts "Total Buffer cells count is:$buffers_count"
puts "Total power switch cells count is:$Power_switch_count"
puts "Total inverter cells count is:$inverter_count"
puts "Total level shifter cells count is:$level_shifter_count"
puts "Total retention cells count is:$retention_count"
puts "Total isolation cells count is:$isolation_count"
puts "Total Physical_Cells is : $physical_cells_count"
set combo_cells_count [expr $instances_count - $sequential_count - $buffers_count - $Power_switch_count - $inverter_count - $level_shifter_count - $retention_count - $isolation_count - $physical_cells_count]
puts "combinational cells count is : $combo_cells_count"