How To Get The Output of - Report Gates - in XLS Format
How To Get The Output of - Report Gates - in XLS Format
Explanation of Script
The script in the Code section converts the text output of the report gates command into an XLS file format for MS Excel.
Usage
After sourcing the script in Genus, you need to provide a gates report file dumped from the report gates command and an output file name in which the XLS format
content will be stored in the current directory.
Use Model
Code
if {[expr $flag%2] == 0} {
if {([regexp {\s*Gate\s*Instances} $line])} {
set count [llength $line]
for {set i 0} {$i < $count} {incr i} {
set head_col($i) "[lindex $line $i]"
}
if {$count == 4} {
puts $wid "$head_col(0)\t$head_col(1)\t$head_col(2)\t$head_col(3)"
} elseif {$count == 8} {
puts $wid "-\t-\t-\tLeakage\tInternal"
puts $wid "$head_col(0)\t$head_col(1)\t$head_col(2)\t$head_col(3)(nW)\t$head_col(5)(nW)\t$head_col(7)"
} elseif {$count == 10} {
puts $wid "-\t-\t-\t-\t-\tLeakage\tInternal"
puts $wid "$head_col(0)\t$head_col(1)\t$head_col(2)\t$head_col(3)\t$head_col(4)\t$head_col(5)(nW)\t$head_col(7)
(nW)\t$head_col(9)"
} else {}
set line [gets $rid]
if {[regexp {\-\-\-\-\-} $line]} {
puts $wid $line
set line [gets $rid]
}
}
#puts $count
for {set i 0} {$i < [llength $line]} {incr i} {
set col($i) "[lindex $line $i]"
}
if {[llength $line] == 4} {
puts $wid "$col(0)\t$col(1)\t$col(2)\t$col(3)"
} elseif {[llength $line] == 6} {
puts $wid "$col(0)\t$col(1)\t$col(2)\t$col(3)\t$col(4)\t$col(5)"
} elseif {[llength $line] == 7} {
puts $wid "$col(0)\t$col(1)\t$col(2)\t$col(3)\t$col(4)\t$col(5)\t$col(6)"
} elseif {[llength $line] == 8} {
puts $wid "$col(0)\t$col(1)\t$col(2)\t$col(3)\t$col(4)\t$col(5)\t$col(6)\t$col(7)"
} else {}
} else {
puts $wid $line
}
}
close $wid
close $rid
Internal Notes
None
Return to the top of the page