-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathpdn_flow.tcl
145 lines (129 loc) · 5.58 KB
/
pdn_flow.tcl
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
#################################################################
# minCh: If channel width is less than minCh it will be filled
# with hard blockages.
# layers: Name of the layers.
# width: Width of the layer.
# pitch: Distance b/w two vdd/vss set.
# spacing: Spacing b/w the stripe of vdd and vss.
# ldir: Layer direction. 0 is horizontal and 1 is vertical.
# isMacro: If layer stripe is only above macro.
# isBM: If layer is below the top layer of macro.
# isAM: If layer is above the top layer of macro.
# isFP: If layer is for follow pin.
# soffset: Start offset of the stripe.
# addch: Any requierment to add extra layer in the macro
# channel.
#################################################################
set nets [list VDD VSS]
####### Optimize floorplan #######
finishFloorplan -fillPlaceBlockage hard $minCh
cutRow
finishFloorplan -fillPlaceBlockage hard $minCh
###################################################
############### Global Net Creation ###############
clearGlobalNets
globalNetConnect VDD -type pgpin -pin VDD -inst * -override
globalNetConnect VSS -type pgpin -pin VSS -inst * -override
######################## For SKY130HD #######################
globalNetConnect VDD -type pgpin -pin VPWR -inst * -override
globalNetConnect VSS -type pgpin -pin VGND -inst * -override
# globalNetConnect VDD -type pgpin -pin VDDCE -inst * -override
# globalNetConnect VDD -type pgpin -pin VDDPE -inst * -override
# globalNetConnect VSS -type pgpin -pin VSSE -inst * -override
#
# globalNetConnect VDD -type pgpin -pin VNW -inst * -override
# globalNetConnect VSS -type pgpin -pin VPW -inst * -override
globalNetConnect VDD -type tiehi -all -override
globalNetConnect VSS -type tielo -all -override
####################################################
deselectAll
select_obj [dbget top.fplan.pBlkgs.name finishfp_place_blkg_* -p1]
deleteSelectedFromFPlan
deselectAll
setGenerateViaMode -auto true
generateVias
editDelete -type Special -net $nets
setViaGenMode -ignore_DRC false
setViaGenMode -optimize_cross_via true
setViaGenMode -allow_wire_shape_change false
setViaGenMode -extend_out_wire_end false
setViaGenMode -viarule_preference generated
sroute
setAddStripeMode -orthogonal_only true -ignore_DRC false
setAddStripeMode -over_row_extension true
set prevLayer [lindex $layers 0]
set prevbl ""
set i 1
set lcount [llength $layers]
set flag1 0
while { $i < $lcount } {
set lname [lindex $layers $i]
set isfp [lindex $isFP $i]
set wdth [lindex $width $i]
set dir "vertical"
if { [lindex $ldir $i] == 0 } {
set dir "horizontal"
}
if { $isfp == 1 } {
puts "Add follow pin creation script"
deselectAll
editSelect -layer [lindex $layers 0] -net $nets
editDuplicate -layer_horizontal $lname
deselectAll
editSelect -layer $lname -net $nets
editResize -to $wdth -side high -direction y -keep_center_line 1
deselectAll
} else {
set isbm [lindex $isBM $i]
set ism [lindex $isMacro $i]
set isam [lindex $isAM $i]
set spc [lindex $spacing $i]
set ptch [lindex $pitch $i]
set sofst [lindex $soffset $i]
set isch [lindex $addch $i]
setAddStripeMode -stacked_via_bottom_layer $prevLayer -stacked_via_top_layer $lname
setAddStripeMode -inside_cell_only false
setAddStripeMode -route_over_rows_only false
setAddStripeMode -extend_to_closest_target area_boundary
if { $isbm == 1 } {
set prevbl $lname
setAddStripeMode -route_over_rows_only true
addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \
-start_offset $sofst -set_to_set_distance $ptch
if { $isch == 1 } {
setAddStripeMode -extend_to_closest_target same_dir_stripe
addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \
-start_offset $sofst -set_to_set_distance $ptch -narrow_channel 1
}
} elseif { $ism == 1 } {
setAddStripeMode -extend_to_closest_target none
setAddStripeMode -inside_cell_only true
foreach mcell [dbget [dbget top.insts.cell.subClass block -p2 ].cell.name -u -e] {
addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \
-start_offset $sofst -set_to_set_distance $ptch -master $mcell
}
foreach inst [dbget [dbget top.insts.cell.subClass block -p2 ].name -e ] {
createRouteBlk -inst $inst -cover -layer $prevLayer -name mcro_blk
}
} elseif { $isam == 1 } {
if { $flag1 == 0 } {
set flag1 1
set prevLayer $prevbl
setAddStripeMode -stacked_via_bottom_layer $prevLayer -stacked_via_top_layer $lname
}
addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \
-start_offset $sofst -set_to_set_distance $ptch -extend_to design_boundary
if { $isch == 1 } {
setAddStripeMode -extend_to_closest_target same_dir_stripe
addStripe -layer $lname -direction $dir -nets $nets -width $wdth -spacing $spc \
-start_offset $sofst -set_to_set_distance $ptch -narrow_channel 1
}
} else {
puts "Layer:$lname is not routed"
}
}
set prevLayer $lname
set i [expr $i + 1]
}
deleteRouteBlk -name mcro_blk
# verify_connectivity -net $nets -geom_connect -no_antenna -error 0