[i=s] 本帖最后由 走来走去 于 2021-1-25 10:35 编辑 [/i]
#!/usr/bin/tclsh
#
set j_f_in "path_to_rpt.rpt"
set j_f [open $j_f_in r ]
set j_f_out [open ${j_f_in}_eco w ]
while { [gets $j_f line ] != -1 } {
regsub {\-.*} $line "" line2
if { [regsub {DB\[\d+\]} $line2 CLKB x ] ||
[regsub {TDB\[\d+\]} $line2 CLKB x ] ||
[regsub {AA\[\d+\]} $line2 CLKA x ] ||
[regsub {CENA} $line2 CLKA x ] ||
[regsub {CENB} $line2 CLKB x ] } {
puts $j_f_out "add_buffer -new_cell_names CTS_FIXS0124 -inverter_pair $x INV_X5N_A9PP84TL_C14"
}
}
close $j_f
close $j_f_out
|