bash
pro modify_txi_insert {file1} {
set rptId [open "${file1}_mod.tcl" w 0750]
set fileId [open ${file1} r 0750]
set filePtr [split [read $fileId] \n]
close $filePtr
for {set lineNum 0} {$lineNum < [llength $filePtr]} {incr lineNum} {
set line [lindex $filePtr $lineNum]
if {[regexp {^insert_buffer} $line]} {
regexp {^\s*(\S*)\s*(\S*)\s*(\S*)} $line match end pin cell
puts $pin
foreach_in_col pin1 [remove_from_collection [all_fanin -to $pin -flat -levels 1] [get_pins $pin]] {
set pin_name [get_attr [get_pins $pin1] full_name]
if {[regexp "/I$" $pin_name]} {
puts $rptId "$end $pin_name $cell"
} else {
puts "$pin is not connect to port buffer"
}
}
}
}
close $rpdId
}
处理的文本格式如下
bash
insert_buffer $pin1/D BUFFD4.*
insert_buffer $pin2/D DELD1.*
