100% found this document useful (1 vote)
2K views

How To Find Floating - Dangling Nets, Pins, IO Ports, and Instances Using Get - DB Commands

This document describes 5 scripts that use get_db commands to find different types of floating or unconnected nets, pins, instances, and I/O ports in a design. The scripts find dangling nets, floating input and output pins, floating instances, and floating I/O ports. Each script produces a report file describing the found issues.

Uploaded by

Ruchy Shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views

How To Find Floating - Dangling Nets, Pins, IO Ports, and Instances Using Get - DB Commands

This document describes 5 scripts that use get_db commands to find different types of floating or unconnected nets, pins, instances, and I/O ports in a design. The scripts find dangling nets, floating input and output pins, floating instances, and floating I/O ports. Each script produces a report file describing the found issues.

Uploaded by

Ruchy Shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

How to find floating/dangling nets, pins, IO ports, and instances using get_db commands

Explanation of Script
There are five scripts mentioned in this article, as listed below:
1. To find and delete nets with no fanout (Dangling Nets).
2. To find floating input pins in a design.
3. To find floating output pins in a design.
4. To report floating instances in a design.
5. To find floating IO ports in the design.

Usage
Source the script provided in the Code section.

To find and delete nets with no fanout (Dangling Nets)


dangling_nets
Dangling Nets which have been deleted are reported in dangling_nets.rpt

Contents of the "dangling_nets.rpt" file will be as follows:

###################################################################
Number of Dangling Nets : 3
###################################################################
Dangling Net getting deleted : xy_11
Dangling Net getting deleted : acd_23
Dangling Net getting deleted : n_2

To find floating input pins in a design


dangling_input_pins
Check the file dangling_input_pins.rpt

Contents of the "dangling_input_pins.rpt" file will be as follows:

###################################################################
Number of Dangling Input Pins : 1
###################################################################
ax/perf/A
###################################################################
Number of No Driver Input Pins : 1
###################################################################
ax/sefd/SI

To find floating output pins in a design


dangling_out_pins
Check the file dangling_out_pins.rpt

Contents of the "dangling_out_pins.rpt" file will be as follows:

###################################################################
Number of Dangling Output Pins : 2
###################################################################
ax/de/Y
ax/grt/wer/Y
###################################################################
Number of No Load Output Pins : 1
###################################################################
ax/ydgs/pQ1[3]

To report floating instances in a design


floating_instances
Please check floating_instances.rpt

Contents of the "floating_instances.rpt" file will be as follows:

Instance prc/abc/i1 : prc/abc/i1/Q1 is floating

To find floating IO ports in the design


floating_io_ports
Please check floating_io_ports.rpt

Contents of the "floating_io_ports.rpt" file will be as follows:

## TOTAL FLOATING IO PORTS : 5


## FLOATING INPUT PORTS : 3 ##
ah_1 xy_2 ded_11
## FLOATING OUTPUT PORTS : 2 ##
ex_0 vg_33

Code
# To find and delete nets with no fanout (Dangling Nets)
proc dangling_nets {} {
set fp [open dangling_nets.rpt "w"]
set dangling_nets [get_db [get_db hnets -if {.num_loads == 0}] .name]
puts "Dangling Nets being deleted will be reported in dangling_nets.rpt\n"
puts $fp "###################################################################"
puts $fp "Number of Dangling Nets : [llength $dangling_nets]"
puts $fp "###################################################################\n"
foreach net $dangling_nets {
puts $fp "Dangling Net getting deleted :\t$net"
delete_nets $net
}
close $fp
}

# To find floating input pins in a design


proc dangling_input_pins {} {
## To find the input pins which are not connected to any net and are DANGLING ##
set fp [open dangling_input_pins.rpt "w"]
set dangling_input_pins [get_db [get_db pins -if {.net.name == "" && .direction ==
in}] .name]
puts $fp "###################################################################"
puts $fp "Number of Dangling Input Pins : [llength $dangling_input_pins]"
puts $fp "###################################################################\n"
foreach pin $dangling_input_pins {
puts $fp $pin
}
close $fp

# To find the input pins that are connected to nets but those nets have no drivers
set fp [open dangling_input_pins.rpt "a"]
set noDriver_input_pins [get_db [get_db pins -if {.net.num_drivers==0 && .direction
== in && !.net.is_power && !.net.is_ground}] .name]
puts $fp "\n###################################################################"
puts $fp "Number of No Driver Input Pins : [llength $noDriver_input_pins]"
puts $fp "###################################################################\n"
foreach pin $noDriver_input_pins {
puts $fp $pin
}
puts "Check the file dangling_input_pins.rpt"
close $fp
}

# To find floating output pins in a design


proc dangling_out_pins {} {
## To find the output pins which are not connected to any net and are DANGLING ##
set fp [open dangling_out_pins.rpt "w"]
set dangling_out_pins [get_db [get_db pins -if {.net.name == "" && .direction ==
out}] .name]
puts $fp "###################################################################"
puts $fp "Number of Dangling Output Pins : [llength $dangling_out_pins]"
puts $fp "###################################################################\n"
foreach pin $dangling_out_pins {
puts $fp $pin
}
close $fp

# To find the output pins that are connected to nets but those nets have no load
set fp [open dangling_out_pins.rpt "a"]
set noLoad_out_pins [get_db [get_db pins -if {.net.num_loads==0 && .direction == out
&& !.net.is_power && !.net.is_ground}] .name]
puts $fp "\n###################################################################"
puts $fp "Number of No Load Output Pins : [llength $noLoad_out_pins]"
puts $fp "###################################################################\n"
foreach pin $noLoad_out_pins {
puts $fp $pin
}
puts "Check the file dangling_out_pins.rpt"
close $fp
}

# To report floating Instances in a design


proc floating_instances {} {
set fp [open floating_instances.rpt "w"]
foreach inst [get_db insts .name] {
foreach pin [get_db inst:$inst .pins.name] {
if {[get_db pin:$pin -if {.direction=="in" && .net.name != "" &&
.net.num_drivers==0 && !.net.is_power && !.net.is_ground}] != ""} {
puts $fp "Instance $inst : $pin is floating"}
if {[get_db pin:$pin -if {.direction=="out" && .net.name != "" &&
.net.num_loads==0 && !.net.is_power && !.net.is_ground}] != ""} {
puts $fp "Instance $inst : $pin is floating"}
}
}
close $fp
puts "Please check floating_instances.rpt"
}

# To find floating IO ports in the design


proc floating_io_ports {} {
set fp [open floating_io_ports.rpt "w"]
set in [get_db [get_db ports -if {.direction == in && .net.num_loads == 0}] .name]
set out [get_db [get_db ports -if {.direction == out && .net.num_drivers == 0}]
.name]
puts $fp "## TOTAL FLOATING IO PORTS : [expr [llength $in] + [llength $out]]
\n"
puts $fp "## FLOATING INPUT PORTS : [llength $in] ##\n"
puts $fp $in
puts $fp "\n## FLOATING OUTPUT PORTS : [llength $out] ##\n"
puts $fp $out
close $fp
puts "Please check floating_io_ports.rpt\n"
}
Internal Notes
None

Return to the top of the page

You might also like