用户工具

站点工具


vlsi:icc:rp

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

vlsi:icc:rp [2011/04/19 07:49] (当前版本)
行 1: 行 1:
 +====== ​ RP scripts ​ ======
 +=====  根据相同的master创建RP =====
 +<code tcl>
 +proc create_macro_rp {} {
 +  set all_macros [get_cells -hierarchical -filter "​mask_layout_type==macro"​]
 +  set all_ref_names []
 +  foreach_in_collection m $all_macros {
 +    set ref_name [get_attribute $m ref_name]
 +    if { [lsearch $all_ref_names $ref_name] == -1 } {
 +      lappend all_ref_names $ref_name
 +    }
 +  }
 +  echo $all_ref_names
 +  foreach ref_name $all_ref_names {
 +    set macros [get_cells -hierarchical -filter "​ref_name==$ref_name"​]
 +    set count [sizeof_collection $macros]
 +    set rp_name $ref_name
 +    set cmd "​create_rp_group -columns $count -rows 1 $ref_name"​
 +    echo $cmd
 +    eval $cmd
 +    for {set i 0} {$i<​$count} {incr i} {
 +      set macro_name [get_attribute ​ [index_collection $macros $i] full_name ]
 +      set cmd "​add_to_rp_group -column $i -row 0 -leaf $macro_name StDp::​${rp_name}"​
 +      echo $cmd
 +      eval $cmd
 +    }
 +  }
 +}
 +</​code>​
 +===== 读rp脚本,添加keepout =====
 +==== 重写rp ====
 +使原来rp的行列数翻倍。
 +<code tcl>
 +proc macro_rp {} {
 +  set content [ read [ open "​scripts/​macro_rp_plain.tcl"​ ] ]
  
 +  set lines [split $content "​\n"​]
 +
 +  foreach line $lines {
 +    set line [string trim $line]
 +    set row_patt ""​
 +    set col_patt ""​
 +    if { [string compare -length 15 $line create_rp_group] == 0 } {
 +      set row_patt {\-rows\s+(\d+)}
 +      set col_patt {\-columns\s+(\d+)}
 +    } elseif { [string compare -length 15 $line add_to_rp_group] == 0 } {
 +      set row_patt {\-row\s+(\d+)}
 +      set col_patt {\-column\s+(\d+)}
 +    }
 +
 +    if { [string length $row_patt] >= 1 } {
 +      regexp $row_patt $line match rp_row
 +      set new_rows "-row [expr $rp_row*2]"​
 +      set line [regsub -all $row_patt "​$line"​ "​$new_rows"​]
 +    }
 +    if { [string length $col_patt] >= 1 } {
 +      regexp $col_patt $line match rp_col
 +      set new_col "​-column [expr $rp_col*2]"​
 +      set line [regsub -all $col_patt "​$line"​ "​$new_col"​]
 +    }
 +    #echo $line
 +    eval $line
 +  }
 +}
 +</​code>​
 +==== 添加keepout ====
 +隔行/​隔列添加keepout
 +<code tcl>
 +proc macro_rp_keepout {} {
 +  foreach_in_collection rp [all_rp_groups] {
 +    set rows [get_attribute $rp rows]
 +    set columns [get_attribute $rp columns]
 +    set rp_name [get_attribute $rp name]
 +    if { $rows > 2 } {
 +      for {set i 0} {$i < $rows} {incr i } {
 +        if { [expr $i % 2] == 1 } {
 +          add_to_rp_group -column 0 -row $i -keepout ${rp_name}_r_$i -height 12 $rp
 +        }
 +      }
 +    }
 +
 +    if { $columns > 2 } {
 +      for {set i 0} {$i < $columns} {incr i } {
 +        if { [expr $i % 2] == 1 } {
 +          add_to_rp_group -column $i -row 0 -keepout ${rp_name}_c_$i -width 60 $rp
 +        }
 +      }
 +    }
 +  }
 +
 +</​code>​
vlsi/icc/rp.txt · 最后更改: 2011/04/19 07:49 (外部编辑)