File size: 4,225 Bytes
f61bac1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | # Build an array of tiles with misc flops and hook up a clk net for CTS
# This demonstrates the trouble with blockage unaware fixing.
source "helpers.tcl"
source Nangate45/Nangate45.vars
# Settings
set array_size 15
set pitch_multiplier 1.1
set core_margin [expr 10 * 2000]
set halo [expr 1 * 2000]
read_lib $liberty_file
read_lib array_tile_ins_delay.lib
read_lef $tech_lef
read_lef $std_cell_lef
read_lef array_tile.lef
set db [ord::get_db]
set tech [ord::get_db_tech]
set chip [odb::dbChip_create $db $tech]
set block [odb::dbBlock_create $chip "top"]
$block setDefUnits 2000
set dbu [$tech getDbUnitsPerMicron]
set tile [$db findMaster "array_tile"]
set width [$tile getWidth]
set height [$tile getHeight]
set x_pitch [expr int($width * $pitch_multiplier)]
set y_pitch [expr int($height * $pitch_multiplier)]
set clk [odb::dbNet_create $block "clk"]
$clk setSigType CLOCK
# Make clock bterm/bpin at 0,0
set clk_bterm [odb::dbBTerm_create $clk "clk"]
$clk_bterm setSigType CLOCK
$clk_bterm setIoType INPUT
set clk_bpin [odb::dbBPin_create $clk_bterm]
$clk_bpin setPlacementStatus PLACED
set layer [$tech findLayer "metal5"]
odb::dbBox_create $clk_bpin $layer 0 0 2000 2000
# tile array
for { set x 0 } { $x < $array_size } { incr x } {
for { set y 0 } { $y < $array_size } { incr y } {
set inst [odb::dbInst_create $block $tile "inst_${x}_${y}"]
set lx [expr $x * $x_pitch + $core_margin]
set ly [expr $y * $y_pitch + $core_margin]
$inst setLocation $lx $ly
$inst setPlacementStatus LOCKED
set clk_iterm [$inst findITerm "clk"]
$clk_iterm connect $clk
set ux [expr $lx + $width + $halo]
set uy [expr $ly + $height + $halo]
set lx [expr $lx - $halo]
set ly [expr $ly - $halo]
odb::dbBlockage_create $block $lx $ly $ux $uy
# connect east/west pins skipping every fifth column
if { $x > 0 } {
if { ($x + 1) % 5 == 0 } {
continue
} elseif { $x % 5 == 0 } {
set offset 2
} else {
set offset 1
}
set l_inst [$block findInst "inst_[expr $x-$offset]_${y}"]
set net [odb::dbNet_create $block "n1_${x}_${y}"]
[$inst findITerm "w_in"] connect $net
[$l_inst findITerm "e_out"] connect $net
set net [odb::dbNet_create $block "n2_${x}_${y}"]
[$inst findITerm "w_out"] connect $net
[$l_inst findITerm "e_in"] connect $net
}
}
}
# FF array on every 5th column
set dff [$db findMaster "DFF_X1"]
set dff_height [$dff getHeight]
set dff_width [$dff getWidth]
for { set x 4 } { $x < $array_size } { incr x 5 } {
for { set y 0 } { $y < $array_size } { incr y } {
for { set i 0 } { $i < 50 } { incr i } {
set inst [odb::dbInst_create $block $dff "dff_${x}_${y}_${i}"]
set lx [expr $x * $x_pitch + $core_margin]
set ly [expr $y * $y_pitch + $core_margin]
$inst setLocation \
[expr $lx - $dff_width - $halo] \
[expr $ly + $i * $dff_height]
$inst setPlacementStatus PLACED
set clk_iterm [$inst findITerm "CK"]
$clk_iterm connect $clk
}
}
}
ord::design_created
set overall_width [expr ($array_size - 1) * $x_pitch + $width + 2 * $core_margin]
set overall_height [expr ($array_size - 1) * $y_pitch + $height + 2 * $core_margin]
set overall_width [expr $overall_width / $dbu]
set overall_height [expr $overall_height / $dbu]
# setup rows
initialize_floorplan \
-die_area [list 0 0 $overall_width $overall_height] \
-core_area [list 0 0 $overall_width $overall_height] \
-site $site
source $tracks_file
source Nangate45/Nangate45.rc
create_clock -period 5 clk
source $layer_rc_file
set_wire_rc -signal -layer $wire_rc_layer
set_wire_rc -clock -layer $wire_rc_layer_clk
set_dont_use $dont_use
#set_debug_level CTS clustering 1
set_cts_config -sink_clustering_max_diameter $cts_cluster_diameter \
-root_buf $cts_buffer \
-buf_list $cts_buffer
clock_tree_synthesis -sink_clustering_enable
set_propagated_clock [all_clocks]
estimate_parasitics -placement
repair_clock_nets
estimate_parasitics -placement
report_clock_skew
# max latency path
report_checks -through inst_1_1/clk -format full_clock_expanded
# min latency path
report_checks -through inst_2_1/clk -format full_clock_expanded
|