Home > Community > Forums > Digital Implementation > No. of Single Cut Vias

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 No. of Single Cut Vias 

Last post Fri, Aug 10 2012 9:18 PM by kazad. 3 replies.
Started by victory2vicky 10 Aug 2012 12:21 AM. Topic has 3 replies and 1588 views
Page 1 of 1 (4 items)
Sort Posts:
  • Fri, Aug 10 2012 12:21 AM

    No. of Single Cut Vias Reply

    Hi All

    Can any one tell how can i find No. of single cut vias in the design.

    • Post Points: 20
  • Fri, Aug 10 2012 6:51 AM

    • wally1
    • Top 50 Contributor
    • Joined on Mon, Aug 4 2008
    • Bellevue, WA
    • Posts 149
    • Points 2,915
    Re: No. of Single Cut Vias Reply

    You can use the following command to report the number of single cut and multi-cut vias in the design:

        pdi report_design -wire

    Regards,

    Brian

    • Post Points: 20
  • Fri, Aug 10 2012 10:59 AM

    • kazad
    • Top 500 Contributor
    • Joined on Tue, Sep 15 2009
    • Posts 22
    • Points 305
    Re: No. of Single Cut Vias Reply

    Following procedure may help a bit - it reports only multi-cut via info. Single-cut via numbers can be extracted from there.

    Usage: reportMultiCutVia   ==> to get the mult-cut via%

    reportMultiCutVia -verbose  ==> to get detail via info

     

    proc reportMultiCutVia {args} {

        # Defaults
        set verboseMode "no"


        # Get verbose mode
        if {[regexp {\-verbose} $args]} {
            set verboseMode "yes"
        }

        # Help
        set helpString "Usage : reportMultiCutVia -verbose -help"


        if {[regexp {\-help} $args]} {
            puts $helpString
            return 0
        }

        # Main code
        ################################################

        # Get a list of all via cells
        set allUniqueViaCells [dbGet -u top.nets.vias.via.name *]

        # Get total via count
        set totViaCount [llength [dbGet top.nets.vias.via.name *]]


        # Get multi-cut via count
        set totMultiCutVia 0


        foreach viaCell $allUniqueViaCells {
            if {[llength [exl [dbGet [dbGetViaCellByName $viaCell].cutRects]]] > 1} {
                set viaCount [llength [dbGet top.nets.vias.via.name $viaCell]]
                set viaArray($viaCell) $viaCount
                set totMultiCutVia [expr $totMultiCutVia + $viaCount]
            }
        }

    #    foreach viaCell $allUniqueViaCells {
    #       set viaCellPtr [dbGetViaCellByName $viaCell]
    #       set cutinfo [dbInfoViaCellRegularCuts $viaCellPtr]
    #       set cutNumx [lindex $cutinfo 4]
    #       set cutNumy [lindex $cutinfo 5]
    #
    #       if {$cutNumx > 1 || $cutNumy > 1} {
    #           lappend multiCutViaCells $viaCell
    #           set viaCount [llength [dbGet top.nets.vias.via.name $viaCell]]
    #           set viaArray($viaCell) $viaCount
    #           set totMultiCutVia [expr $totMultiCutVia + $viaCount]
    #       }
    #    }

        # Calculate multi-cut via%
        set multiCutVia_p [format %2.2f [expr ($totMultiCutVia*1.0/$totViaCount)*100]]
         # Report via info
        if {$verboseMode =="yes"} {

            Puts [genLine -width 15 -char "="]
            Puts [format "%-15s %15s" "Multi-cut via" "Count"]
            Puts [genLine -width 15 -char "="]

            foreach viaCell [array names viaArray] {
                Puts [format "%-15s %15s" $viaCell $viaArray($viaCell)]
            }
            Puts [genLine -width 15 -char "-"]
            Puts [format "%-15s %15s" "Total" $totMultiCutVia]

            Puts "\nTotal via count        : $totViaCount"
            Puts "Multi-cut via          : $multiCutVia_p%\n"

        } else {
            return "$multiCutVia_p%"
        }


    }

     

    proc genLine {args} {

        # Default
        set char "-"

        # Get width
        if {[regexp {\-width} $args]} {
            set width [lindex $args [expr [lsearch $args -width] + 1]]
        }

        # Get char
        if {[regexp {\-char} $args]} {
            set char [lindex $args [expr [lsearch $args -char] + 1]]
        }


        # Help
        set helpString "Usage : genLine -width <width> -char <character>"

        if {[regexp {\-help} $args] || $args == ""} {
            puts $helpString
            return 0
        }

        # Main code
        #########################################################################


        for {set i 0} {$i <= $width} {incr i} {
            lappend print_list $char
        }

        return "[join $print_list $char]"
    }

     

    • Post Points: 5
  • Fri, Aug 10 2012 9:18 PM

    • kazad
    • Top 500 Contributor
    • Joined on Tue, Sep 15 2009
    • Posts 22
    • Points 305
    Re: No. of Single Cut Vias Reply

    Forgot to include the following procedure:

     ################################################################################
    # Procedure to split the list
    ################################################################################
    proc exl {singleList} {
            set mylist {}
            foreach item $singleList {
                    set mylist [concat $mylist $item]
            }
            return $mylist
    }

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by victory2vicky at 10 Aug 2012 12:21 AM. Topic has 3 replies.