siliconcompiler 0.28.9__py3-none-any.whl → 0.29.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- siliconcompiler/_metadata.py +1 -1
- siliconcompiler/apps/__init__.py +26 -0
- siliconcompiler/apps/sc_remote.py +15 -14
- siliconcompiler/apps/sc_show.py +5 -5
- siliconcompiler/apps/utils/replay.py +194 -0
- siliconcompiler/checklists/__init__.py +12 -0
- siliconcompiler/core.py +89 -22
- siliconcompiler/flows/__init__.py +34 -0
- siliconcompiler/flows/_common.py +11 -13
- siliconcompiler/flows/asicflow.py +83 -42
- siliconcompiler/flows/showflow.py +1 -1
- siliconcompiler/libs/__init__.py +5 -0
- siliconcompiler/optimizer/__init__.py +199 -0
- siliconcompiler/optimizer/vizier.py +259 -0
- siliconcompiler/pdks/__init__.py +5 -0
- siliconcompiler/remote/__init__.py +11 -0
- siliconcompiler/remote/client.py +753 -815
- siliconcompiler/report/report.py +2 -0
- siliconcompiler/report/summary_table.py +1 -1
- siliconcompiler/scheduler/__init__.py +118 -58
- siliconcompiler/scheduler/send_messages.py +1 -1
- siliconcompiler/schema/schema_cfg.py +16 -4
- siliconcompiler/schema/schema_obj.py +29 -10
- siliconcompiler/schema/utils.py +2 -0
- siliconcompiler/sphinx_ext/__init__.py +85 -0
- siliconcompiler/sphinx_ext/dynamicgen.py +19 -34
- siliconcompiler/sphinx_ext/schemagen.py +3 -2
- siliconcompiler/targets/__init__.py +26 -0
- siliconcompiler/targets/gf180_demo.py +3 -3
- siliconcompiler/templates/replay/replay.py.j2 +62 -0
- siliconcompiler/templates/replay/requirements.txt +7 -0
- siliconcompiler/templates/replay/setup.sh +130 -0
- siliconcompiler/tools/__init__.py +60 -0
- siliconcompiler/tools/_common/__init__.py +15 -1
- siliconcompiler/tools/_common/asic.py +17 -9
- siliconcompiler/tools/builtin/concatenate.py +1 -1
- siliconcompiler/tools/ghdl/ghdl.py +1 -2
- siliconcompiler/tools/klayout/convert_drc_db.py +1 -1
- siliconcompiler/tools/klayout/drc.py +1 -1
- siliconcompiler/tools/klayout/export.py +8 -1
- siliconcompiler/tools/klayout/klayout.py +2 -2
- siliconcompiler/tools/klayout/klayout_convert_drc_db.py +2 -2
- siliconcompiler/tools/klayout/klayout_export.py +7 -5
- siliconcompiler/tools/klayout/klayout_operations.py +4 -3
- siliconcompiler/tools/klayout/klayout_show.py +3 -2
- siliconcompiler/tools/klayout/klayout_utils.py +1 -1
- siliconcompiler/tools/klayout/operations.py +8 -0
- siliconcompiler/tools/klayout/screenshot.py +6 -1
- siliconcompiler/tools/klayout/show.py +8 -1
- siliconcompiler/tools/magic/magic.py +1 -1
- siliconcompiler/tools/openroad/__init__.py +103 -0
- siliconcompiler/tools/openroad/{openroad.py → _apr.py} +415 -423
- siliconcompiler/tools/openroad/antenna_repair.py +78 -0
- siliconcompiler/tools/openroad/clock_tree_synthesis.py +64 -0
- siliconcompiler/tools/openroad/detailed_placement.py +59 -0
- siliconcompiler/tools/openroad/detailed_route.py +62 -0
- siliconcompiler/tools/openroad/endcap_tapcell_insertion.py +52 -0
- siliconcompiler/tools/openroad/fillercell_insertion.py +58 -0
- siliconcompiler/tools/openroad/{dfm.py → fillmetal_insertion.py} +35 -19
- siliconcompiler/tools/openroad/global_placement.py +58 -0
- siliconcompiler/tools/openroad/global_route.py +63 -0
- siliconcompiler/tools/openroad/init_floorplan.py +103 -0
- siliconcompiler/tools/openroad/macro_placement.py +65 -0
- siliconcompiler/tools/openroad/metrics.py +23 -8
- siliconcompiler/tools/openroad/pin_placement.py +56 -0
- siliconcompiler/tools/openroad/power_grid.py +65 -0
- siliconcompiler/tools/openroad/rcx_bench.py +7 -4
- siliconcompiler/tools/openroad/rcx_extract.py +2 -1
- siliconcompiler/tools/openroad/rdlroute.py +4 -4
- siliconcompiler/tools/openroad/repair_design.py +59 -0
- siliconcompiler/tools/openroad/repair_timing.py +63 -0
- siliconcompiler/tools/openroad/screenshot.py +9 -20
- siliconcompiler/tools/openroad/scripts/apr/postamble.tcl +44 -0
- siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +95 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_antenna_repair.tcl +51 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +66 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_placement.tcl +41 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +71 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_endcap_tapcell_insertion.tcl +55 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_fillercell_insertion.tcl +27 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_fillmetal_insertion.tcl +36 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +26 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +61 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +333 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +123 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_metrics.tcl +22 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_pin_placement.tcl +41 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +60 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +68 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +83 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_write_data.tcl +125 -0
- siliconcompiler/tools/openroad/scripts/common/debugging.tcl +28 -0
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +727 -0
- siliconcompiler/tools/openroad/scripts/common/read_input_files.tcl +59 -0
- siliconcompiler/tools/openroad/scripts/common/read_liberty.tcl +20 -0
- siliconcompiler/tools/openroad/scripts/common/read_timing_constraints.tcl +16 -0
- siliconcompiler/tools/openroad/scripts/common/reports.tcl +180 -0
- siliconcompiler/tools/openroad/scripts/common/screenshot.tcl +18 -0
- siliconcompiler/tools/openroad/scripts/common/write_images.tcl +395 -0
- siliconcompiler/tools/openroad/scripts/{sc_rcx_bench.tcl → rcx/sc_rcx_bench.tcl} +5 -5
- siliconcompiler/tools/openroad/scripts/{sc_rcx_extract.tcl → rcx/sc_rcx_extract.tcl} +0 -0
- siliconcompiler/tools/openroad/scripts/sc_rcx.tcl +5 -16
- siliconcompiler/tools/openroad/scripts/sc_rdlroute.tcl +51 -51
- siliconcompiler/tools/openroad/scripts/sc_show.tcl +110 -0
- siliconcompiler/tools/openroad/show.py +28 -23
- siliconcompiler/tools/openroad/{export.py → write_data.py} +31 -26
- siliconcompiler/tools/opensta/__init__.py +2 -2
- siliconcompiler/tools/opensta/check_library.py +27 -0
- siliconcompiler/tools/opensta/scripts/sc_check_library.tcl +255 -0
- siliconcompiler/tools/opensta/scripts/sc_timing.tcl +1 -1
- siliconcompiler/tools/sv2v/sv2v.py +1 -2
- siliconcompiler/tools/verilator/verilator.py +6 -7
- siliconcompiler/tools/vivado/vivado.py +1 -1
- siliconcompiler/tools/yosys/__init__.py +149 -0
- siliconcompiler/tools/yosys/lec.py +22 -9
- siliconcompiler/tools/yosys/sc_lec.tcl +94 -49
- siliconcompiler/tools/yosys/sc_syn.tcl +1 -0
- siliconcompiler/tools/yosys/screenshot.py +2 -2
- siliconcompiler/tools/yosys/syn_asic.py +105 -74
- siliconcompiler/tools/yosys/syn_asic.tcl +58 -12
- siliconcompiler/tools/yosys/syn_fpga.py +2 -3
- siliconcompiler/tools/yosys/syn_fpga.tcl +26 -19
- siliconcompiler/toolscripts/_tools.json +5 -5
- siliconcompiler/utils/__init__.py +7 -3
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.1.dist-info}/METADATA +22 -17
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.1.dist-info}/RECORD +131 -114
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.1.dist-info}/WHEEL +1 -1
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.1.dist-info}/entry_points.txt +13 -0
- siliconcompiler/libs/asap7sc7p5t.py +0 -8
- siliconcompiler/libs/gf180mcu.py +0 -8
- siliconcompiler/libs/interposer.py +0 -8
- siliconcompiler/libs/nangate45.py +0 -8
- siliconcompiler/libs/sg13g2_stdcell.py +0 -8
- siliconcompiler/libs/sky130hd.py +0 -8
- siliconcompiler/libs/sky130io.py +0 -8
- siliconcompiler/pdks/asap7.py +0 -8
- siliconcompiler/pdks/freepdk45.py +0 -8
- siliconcompiler/pdks/gf180.py +0 -8
- siliconcompiler/pdks/ihp130.py +0 -8
- siliconcompiler/pdks/interposer.py +0 -8
- siliconcompiler/pdks/skywater130.py +0 -8
- siliconcompiler/tools/openroad/cts.py +0 -45
- siliconcompiler/tools/openroad/floorplan.py +0 -75
- siliconcompiler/tools/openroad/physyn.py +0 -27
- siliconcompiler/tools/openroad/place.py +0 -41
- siliconcompiler/tools/openroad/route.py +0 -45
- siliconcompiler/tools/openroad/scripts/__init__.py +0 -0
- siliconcompiler/tools/openroad/scripts/sc_apr.tcl +0 -514
- siliconcompiler/tools/openroad/scripts/sc_cts.tcl +0 -68
- siliconcompiler/tools/openroad/scripts/sc_dfm.tcl +0 -22
- siliconcompiler/tools/openroad/scripts/sc_export.tcl +0 -100
- siliconcompiler/tools/openroad/scripts/sc_floorplan.tcl +0 -456
- siliconcompiler/tools/openroad/scripts/sc_metrics.tcl +0 -1
- siliconcompiler/tools/openroad/scripts/sc_physyn.tcl +0 -6
- siliconcompiler/tools/openroad/scripts/sc_place.tcl +0 -84
- siliconcompiler/tools/openroad/scripts/sc_procs.tcl +0 -494
- siliconcompiler/tools/openroad/scripts/sc_report.tcl +0 -189
- siliconcompiler/tools/openroad/scripts/sc_route.tcl +0 -143
- siliconcompiler/tools/openroad/scripts/sc_screenshot.tcl +0 -18
- siliconcompiler/tools/openroad/scripts/sc_write_images.tcl +0 -393
- siliconcompiler/tools/yosys/yosys.py +0 -148
- /siliconcompiler/tools/openroad/scripts/{sc_write.tcl → common/write_data.tcl} +0 -0
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.1.dist-info}/LICENSE +0 -0
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
###############################
|
|
2
|
+
# Reading SC Schema
|
|
3
|
+
###############################
|
|
4
|
+
|
|
5
|
+
source ./sc_manifest.tcl > /dev/null
|
|
6
|
+
|
|
7
|
+
###############################
|
|
8
|
+
# Task Preamble
|
|
9
|
+
###############################
|
|
10
|
+
|
|
11
|
+
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
12
|
+
source -echo "$sc_refdir/apr/preamble.tcl"
|
|
13
|
+
|
|
14
|
+
###############################
|
|
15
|
+
# FLOORPLANNING
|
|
16
|
+
###############################
|
|
17
|
+
|
|
18
|
+
###############################
|
|
19
|
+
# Setup Global Connections
|
|
20
|
+
###############################
|
|
21
|
+
|
|
22
|
+
if { [sc_cfg_tool_task_exists {file} global_connect] } {
|
|
23
|
+
foreach global_connect [sc_cfg_tool_task_get {file} global_connect] {
|
|
24
|
+
puts "Sourcing global connect configuration: ${global_connect}"
|
|
25
|
+
source $global_connect
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
###############################
|
|
30
|
+
# Initialize floorplan
|
|
31
|
+
###############################
|
|
32
|
+
|
|
33
|
+
if { [sc_cfg_exists input asic floorplan] } {
|
|
34
|
+
set def [lindex [sc_cfg_get input asic floorplan] 0]
|
|
35
|
+
puts "Reading floorplan DEF: ${def}"
|
|
36
|
+
read_def -floorplan_initialize $def
|
|
37
|
+
} else {
|
|
38
|
+
set sc_libtype [sc_cfg_get library $sc_mainlib asic libarch]
|
|
39
|
+
set sc_site [lindex [sc_cfg_get library $sc_mainlib asic site $sc_libtype] 0]
|
|
40
|
+
|
|
41
|
+
#NOTE: assuming a two tuple value as lower left, upper right
|
|
42
|
+
set sc_diearea [sc_cfg_get constraint outline]
|
|
43
|
+
set sc_corearea [sc_cfg_get constraint corearea]
|
|
44
|
+
if {
|
|
45
|
+
$sc_diearea != "" &&
|
|
46
|
+
$sc_corearea != ""
|
|
47
|
+
} {
|
|
48
|
+
# Use die and core sizes
|
|
49
|
+
set sc_diesize "[lindex $sc_diearea 0] [lindex $sc_diearea 1]"
|
|
50
|
+
set sc_coresize "[lindex $sc_corearea 0] [lindex $sc_corearea 1]"
|
|
51
|
+
|
|
52
|
+
initialize_floorplan -die_area $sc_diesize \
|
|
53
|
+
-core_area $sc_coresize \
|
|
54
|
+
-site $sc_site
|
|
55
|
+
} else {
|
|
56
|
+
# Use density
|
|
57
|
+
initialize_floorplan -aspect_ratio [sc_cfg_get constraint aspectratio] \
|
|
58
|
+
-utilization [sc_cfg_get constraint density] \
|
|
59
|
+
-core_space [sc_cfg_get constraint coremargin] \
|
|
60
|
+
-site $sc_site
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
puts "Floorplan information:"
|
|
65
|
+
puts "Die area: [ord::get_die_area]"
|
|
66
|
+
puts "Core area: [ord::get_core_area]"
|
|
67
|
+
|
|
68
|
+
###############################
|
|
69
|
+
# Track Creation
|
|
70
|
+
###############################
|
|
71
|
+
|
|
72
|
+
# source tracks from file if found, else else use schema entries
|
|
73
|
+
if { [sc_cfg_exists library $sc_mainlib option file openroad_tracks] } {
|
|
74
|
+
set tracks_file [lindex [sc_cfg_get library $sc_mainlib option file openroad_tracks] 0]
|
|
75
|
+
puts "Sourcing tracks configuration: ${tracks_file}"
|
|
76
|
+
source $tracks_file
|
|
77
|
+
} else {
|
|
78
|
+
make_tracks
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
set do_automatic_pins 1
|
|
82
|
+
if {
|
|
83
|
+
[sc_cfg_tool_task_exists file padring] &&
|
|
84
|
+
[llength [sc_cfg_tool_task_get file padring]] > 0
|
|
85
|
+
} {
|
|
86
|
+
set do_automatic_pins 0
|
|
87
|
+
|
|
88
|
+
###############################
|
|
89
|
+
# Generate pad ring
|
|
90
|
+
###############################
|
|
91
|
+
foreach padring_file [sc_cfg_tool_task_get {file} padring] {
|
|
92
|
+
puts "Sourcing padring configuration: ${padring_file}"
|
|
93
|
+
source $padring_file
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if { [sc_design_has_unplaced_pads] } {
|
|
97
|
+
foreach inst [[ord::get_db_block] getInsts] {
|
|
98
|
+
if { [$inst isPad] && ![$inst isFixed] } {
|
|
99
|
+
utl::warn FLW 1 "[$inst getName] has not been placed"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
utl::error FLW 1 "Design contains unplaced IOs"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
###############################
|
|
107
|
+
# Pin placement
|
|
108
|
+
###############################
|
|
109
|
+
set sc_hpinmetal [sc_cfg_get pdk $sc_pdk {var} $sc_tool pin_layer_horizontal $sc_stackup]
|
|
110
|
+
set sc_hpinmetal [sc_get_layer_name $sc_hpinmetal]
|
|
111
|
+
set sc_vpinmetal [sc_cfg_get pdk $sc_pdk {var} $sc_tool pin_layer_vertical $sc_stackup]
|
|
112
|
+
set sc_vpinmetal [sc_get_layer_name $sc_vpinmetal]
|
|
113
|
+
|
|
114
|
+
if { [sc_cfg_exists constraint pin] } {
|
|
115
|
+
source "[sc_cfg_tool_task_get file sc_pin_constraint]"
|
|
116
|
+
|
|
117
|
+
proc sc_pin_print { arg } { utl::warn FLW 1 $arg }
|
|
118
|
+
proc sc_pin_layer_select { pin } {
|
|
119
|
+
global sc_hpinmetal
|
|
120
|
+
global sc_vpinmetal
|
|
121
|
+
|
|
122
|
+
set layer [sc_cfg_get constraint pin $pin layer]
|
|
123
|
+
if { [llength $layer] != 0 } {
|
|
124
|
+
return [sc_get_layer_name [lindex $layer 0]]
|
|
125
|
+
}
|
|
126
|
+
set side [sc_cfg_get constraint pin $pin side]
|
|
127
|
+
if { [llength $side] != 0 } {
|
|
128
|
+
switch -regexp $side {
|
|
129
|
+
"1|3" {
|
|
130
|
+
return [lindex $sc_hpinmetal 0]
|
|
131
|
+
}
|
|
132
|
+
"2|4" {
|
|
133
|
+
return [lindex $sc_vpinmetal 0]
|
|
134
|
+
}
|
|
135
|
+
default {
|
|
136
|
+
utl::error FLW 1 "Side number ($side) on $pin is not supported."
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
utl::error FLW 1 "$pin needs to either specify side or layer parameter."
|
|
142
|
+
}
|
|
143
|
+
sc_collect_pin_constraints \
|
|
144
|
+
pin_placement \
|
|
145
|
+
pin_order \
|
|
146
|
+
sc_pin_layer_select \
|
|
147
|
+
sc_pin_print
|
|
148
|
+
|
|
149
|
+
foreach pin $pin_placement {
|
|
150
|
+
set layer [sc_pin_layer_select $pin]
|
|
151
|
+
set place [sc_cfg_get constraint pin $pin placement]
|
|
152
|
+
|
|
153
|
+
set x_loc [lindex $place 0]
|
|
154
|
+
set y_loc [lindex $place 1]
|
|
155
|
+
|
|
156
|
+
place_pin -pin_name $pin \
|
|
157
|
+
-layer $layer \
|
|
158
|
+
-location "$x_loc $y_loc" \
|
|
159
|
+
-force_to_die_boundary
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
dict for {side layer_pins} $pin_order {
|
|
163
|
+
set edge_length 0
|
|
164
|
+
switch -regexp $side {
|
|
165
|
+
"1|3" {
|
|
166
|
+
set edge_length \
|
|
167
|
+
[expr { [lindex [ord::get_die_area] 3] - [lindex [ord::get_die_area] 1] }]
|
|
168
|
+
}
|
|
169
|
+
"2|4" {
|
|
170
|
+
set edge_length \
|
|
171
|
+
[expr { [lindex [ord::get_die_area] 2] - [lindex [ord::get_die_area] 0] }]
|
|
172
|
+
}
|
|
173
|
+
default {
|
|
174
|
+
utl::error FLW 1 "Side number ($side) is not supported."
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
dict for {layer ordered_pins} $layer_pins {
|
|
179
|
+
set spacing [expr { $edge_length / ([llength $ordered_pins] + 1) }]
|
|
180
|
+
|
|
181
|
+
for { set i 0 } { $i < [llength $ordered_pins] } { incr i } {
|
|
182
|
+
set name [lindex $ordered_pins $i]
|
|
183
|
+
switch -regexp $side {
|
|
184
|
+
"1" {
|
|
185
|
+
set x_loc [lindex [ord::get_die_area] 1]
|
|
186
|
+
set y_loc [expr { ($i + 1) * $spacing }]
|
|
187
|
+
}
|
|
188
|
+
"2" {
|
|
189
|
+
set x_loc [expr { ($i + 1) * $spacing }]
|
|
190
|
+
set y_loc [lindex [ord::get_die_area] 3]
|
|
191
|
+
}
|
|
192
|
+
"3" {
|
|
193
|
+
set x_loc [lindex [ord::get_die_area] 2]
|
|
194
|
+
set y_loc [expr { ($i + 1) * $spacing }]
|
|
195
|
+
}
|
|
196
|
+
"4" {
|
|
197
|
+
set x_loc [expr { ($i + 1) * $spacing }]
|
|
198
|
+
set y_loc [lindex [ord::get_die_area] 1]
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
place_pin -pin_name $name \
|
|
203
|
+
-layer $layer \
|
|
204
|
+
-location "$x_loc $y_loc" \
|
|
205
|
+
-force_to_die_boundary
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
###############################
|
|
212
|
+
# Macro placement
|
|
213
|
+
###############################
|
|
214
|
+
|
|
215
|
+
# If manual macro placement is provided use that first
|
|
216
|
+
if { [sc_cfg_exists constraint component] } {
|
|
217
|
+
set sc_snap_strategy [sc_cfg_tool_task_get {var} ifp_snap_strategy]
|
|
218
|
+
|
|
219
|
+
if { $sc_snap_strategy == "manufacturing_grid" } {
|
|
220
|
+
if { [[ord::get_db_tech] hasManufacturingGrid] } {
|
|
221
|
+
set x_grid [[ord::get_db_tech] getManufacturingGrid]
|
|
222
|
+
set y_grid $x_grid
|
|
223
|
+
} else {
|
|
224
|
+
utl::warn FLW 1 \
|
|
225
|
+
"Manufacturing grid is not defined, defaulting to 'none' snapping strategy"
|
|
226
|
+
set x_grid 1
|
|
227
|
+
set y_grid 1
|
|
228
|
+
}
|
|
229
|
+
} elseif { $sc_snap_strategy == "site" } {
|
|
230
|
+
set x_grid 0
|
|
231
|
+
set y_grid 0
|
|
232
|
+
foreach row [[ord::get_db_block] getRows] {
|
|
233
|
+
set site [$row getSite]
|
|
234
|
+
if { [$site getClass] == "PAD" } {
|
|
235
|
+
continue
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
set site_height [$site getHeight]
|
|
239
|
+
set site_width [$site getWidth]
|
|
240
|
+
if { $y_grid == 0 } {
|
|
241
|
+
set y_grid $site_height
|
|
242
|
+
} elseif { $y_grid > $site_height } {
|
|
243
|
+
set y_grid $site_height
|
|
244
|
+
}
|
|
245
|
+
if { $x_grid == 0 } {
|
|
246
|
+
set x_grid $site_width
|
|
247
|
+
} elseif { $x_grid > $site_width } {
|
|
248
|
+
set x_grid $site_width
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
} else {
|
|
252
|
+
set x_grid 1
|
|
253
|
+
set y_grid 1
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if { $x_grid == 0 || $y_grid == 0 } {
|
|
257
|
+
utl::warn FLW 1 "Unable to determine snapping grid."
|
|
258
|
+
set x_grid 1
|
|
259
|
+
set y_grid 1
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
set x_grid [ord::dbu_to_microns $x_grid]
|
|
263
|
+
set y_grid [ord::dbu_to_microns $y_grid]
|
|
264
|
+
|
|
265
|
+
dict for {name params} [sc_cfg_get constraint component] {
|
|
266
|
+
set location [dict get $params placement]
|
|
267
|
+
set rotation [sc_convert_rotation [dict get $params rotation]]
|
|
268
|
+
|
|
269
|
+
if { [dict exists $params partname] } {
|
|
270
|
+
set cell [dict get $params partname]
|
|
271
|
+
} else {
|
|
272
|
+
set cell ""
|
|
273
|
+
}
|
|
274
|
+
if { [llength [dict get $params halo]] != 0 } {
|
|
275
|
+
utl::warn FLW 1 "Halo is not supported in OpenROAD"
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
set inst [[ord::get_db_block] findInst $name]
|
|
279
|
+
if { $inst == "NULL" } {
|
|
280
|
+
utl::warn FLW 1 "Could not find instance: $name"
|
|
281
|
+
|
|
282
|
+
if { $cell == "" } {
|
|
283
|
+
utl::error FLW 1 \
|
|
284
|
+
"Unable to create instance for $name as the cell has not been specified"
|
|
285
|
+
}
|
|
286
|
+
} else {
|
|
287
|
+
set cell ""
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
set x_loc [expr { round([lindex $location 0] / $x_grid) * $x_grid }]
|
|
291
|
+
set y_loc [expr { round([lindex $location 1] / $y_grid) * $y_grid }]
|
|
292
|
+
|
|
293
|
+
set place_inst_args []
|
|
294
|
+
if { $cell != "" } {
|
|
295
|
+
lappend place_inst_args -cell $cell
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
place_inst \
|
|
299
|
+
-name $name \
|
|
300
|
+
-location "$x_loc $y_loc" \
|
|
301
|
+
-orient $rotation \
|
|
302
|
+
-status FIRM \
|
|
303
|
+
{*}$place_inst_args
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
sc_print_macro_information
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if { $do_automatic_pins } {
|
|
310
|
+
###############################
|
|
311
|
+
# Automatic Random Pin Placement
|
|
312
|
+
###############################
|
|
313
|
+
|
|
314
|
+
sc_pin_placement -random
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
###############################
|
|
318
|
+
# Remove buffers inserted by synthesis
|
|
319
|
+
###############################
|
|
320
|
+
|
|
321
|
+
if { [lindex [sc_cfg_tool_task_get var remove_synth_buffers] 0] == "true" } {
|
|
322
|
+
remove_buffers
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
if { [lindex [sc_cfg_tool_task_get var remove_dead_logic] 0] == "true" } {
|
|
326
|
+
eliminate_dead_logic
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
###############################
|
|
330
|
+
# Task Postamble
|
|
331
|
+
###############################
|
|
332
|
+
|
|
333
|
+
source -echo "$sc_refdir/apr/postamble.tcl"
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
###############################
|
|
2
|
+
# Reading SC Schema
|
|
3
|
+
###############################
|
|
4
|
+
|
|
5
|
+
source ./sc_manifest.tcl > /dev/null
|
|
6
|
+
|
|
7
|
+
###############################
|
|
8
|
+
# Task Preamble
|
|
9
|
+
###############################
|
|
10
|
+
|
|
11
|
+
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
12
|
+
source -echo "$sc_refdir/apr/preamble.tcl"
|
|
13
|
+
|
|
14
|
+
# Need to check if we have any macros before performing macro placement,
|
|
15
|
+
# since we get an error otherwise.
|
|
16
|
+
if { [sc_design_has_unplaced_macros] } {
|
|
17
|
+
if { [lindex [sc_cfg_tool_task_get var rtlmp_enable] 0] == "true" } {
|
|
18
|
+
###############################
|
|
19
|
+
# Macro placement
|
|
20
|
+
###############################
|
|
21
|
+
|
|
22
|
+
lassign [sc_cfg_tool_task_get var macro_place_halo] halo_x halo_y
|
|
23
|
+
|
|
24
|
+
set rtlmp_args []
|
|
25
|
+
set rtlmp_max_levels [lindex [sc_cfg_tool_task_get var rtlmp_max_levels] 0]
|
|
26
|
+
if { $rtlmp_max_levels != "" } {
|
|
27
|
+
lappend rtlmp_args -max_num_level $rtlmp_max_levels
|
|
28
|
+
}
|
|
29
|
+
set rtlmp_min_instances [lindex [sc_cfg_tool_task_get var rtlmp_min_instances] 0]
|
|
30
|
+
if { $rtlmp_min_instances != "" } {
|
|
31
|
+
lappend rtlmp_args -min_num_inst $rtlmp_min_instances
|
|
32
|
+
}
|
|
33
|
+
set rtlmp_max_instances [lindex [sc_cfg_tool_task_get var rtlmp_max_instances] 0]
|
|
34
|
+
if { $rtlmp_max_instances != "" } {
|
|
35
|
+
lappend rtlmp_args -max_num_inst $rtlmp_max_instances
|
|
36
|
+
}
|
|
37
|
+
set rtlmp_min_macros [lindex [sc_cfg_tool_task_get var rtlmp_min_macros] 0]
|
|
38
|
+
if { $rtlmp_min_macros != "" } {
|
|
39
|
+
lappend rtlmp_args -min_num_macro $rtlmp_min_macros
|
|
40
|
+
}
|
|
41
|
+
set rtlmp_max_macros [lindex [sc_cfg_tool_task_get var rtlmp_max_macros] 0]
|
|
42
|
+
if { $rtlmp_max_macros != "" } {
|
|
43
|
+
lappend rtlmp_args -max_num_macro $rtlmp_max_macros
|
|
44
|
+
}
|
|
45
|
+
set rtlmp_min_aspect_ratio [lindex [sc_cfg_tool_task_get var rtlmp_min_aspect_ratio] 0]
|
|
46
|
+
if { $rtlmp_min_aspect_ratio != "" } {
|
|
47
|
+
lappend rtlmp_args -min_ar $rtlmp_min_aspect_ratio
|
|
48
|
+
}
|
|
49
|
+
set rtlmp_fence [sc_cfg_tool_task_get var rtlmp_fence]
|
|
50
|
+
if { $rtlmp_fence != "" } {
|
|
51
|
+
lappend rtlmp_args -fence_lx [lindex $rtlmp_fence 0]
|
|
52
|
+
lappend rtlmp_args -fence_ly [lindex $rtlmp_fence 1]
|
|
53
|
+
lappend rtlmp_args -fence_ux [lindex $rtlmp_fence 2]
|
|
54
|
+
lappend rtlmp_args -fence_uy [lindex $rtlmp_fence 3]
|
|
55
|
+
}
|
|
56
|
+
set rtlmp_bus_planning [lindex [sc_cfg_tool_task_get var rtlmp_bus_planning] 0]
|
|
57
|
+
if { $rtlmp_bus_planning == "true" } {
|
|
58
|
+
lappend rtlmp_args -bus_planning
|
|
59
|
+
}
|
|
60
|
+
set rtlmp_target_dead_space [lindex [sc_cfg_tool_task_get var rtlmp_target_dead_space] 0]
|
|
61
|
+
if { $rtlmp_target_dead_space != "" } {
|
|
62
|
+
lappend rtlmp_args -target_dead_space $rtlmp_target_dead_space
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
set rtlmp_area_weight [lindex [sc_cfg_tool_task_get var rtlmp_area_weight] 0]
|
|
66
|
+
if { $rtlmp_area_weight != "" } {
|
|
67
|
+
lappend rtlmp_args -area_weight $rtlmp_area_weight
|
|
68
|
+
}
|
|
69
|
+
set rtlmp_outline_weight [lindex [sc_cfg_tool_task_get var rtlmp_outline_weight] 0]
|
|
70
|
+
if { $rtlmp_outline_weight != "" } {
|
|
71
|
+
lappend rtlmp_args -outline_weight $rtlmp_outline_weight
|
|
72
|
+
}
|
|
73
|
+
set rtlmp_wirelength_weight [lindex [sc_cfg_tool_task_get var rtlmp_wirelength_weight] 0]
|
|
74
|
+
if { $rtlmp_wirelength_weight != "" } {
|
|
75
|
+
lappend rtlmp_args -wirelength_weight $rtlmp_wirelength_weight
|
|
76
|
+
}
|
|
77
|
+
set rtlmp_guidance_weight [lindex [sc_cfg_tool_task_get var rtlmp_guidance_weight] 0]
|
|
78
|
+
if { $rtlmp_guidance_weight != "" } {
|
|
79
|
+
lappend rtlmp_args -guidance_weight $rtlmp_guidance_weight
|
|
80
|
+
}
|
|
81
|
+
set rtlmp_fence_weight [lindex [sc_cfg_tool_task_get var rtlmp_fence_weight] 0]
|
|
82
|
+
if { $rtlmp_fence_weight != "" } {
|
|
83
|
+
lappend rtlmp_args -fence_weight $rtlmp_fence_weight
|
|
84
|
+
}
|
|
85
|
+
set rtlmp_notch_weight [lindex [sc_cfg_tool_task_get var rtlmp_notch_weight] 0]
|
|
86
|
+
if { $rtlmp_notch_weight != "" } {
|
|
87
|
+
lappend rtlmp_args -notch_weight $rtlmp_notch_weight
|
|
88
|
+
}
|
|
89
|
+
set rtlmp_blockage_weight [lindex [sc_cfg_tool_task_get var rtlmp_blockage_weight] 0]
|
|
90
|
+
if { $rtlmp_blockage_weight != "" } {
|
|
91
|
+
lappend rtlmp_args -blockage_weight $rtlmp_blockage_weight
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
rtl_macro_placer \
|
|
95
|
+
-report_directory reports/rtlmp \
|
|
96
|
+
-halo_width $halo_x \
|
|
97
|
+
-halo_height $halo_y \
|
|
98
|
+
-target_util [sc_global_placement_density] \
|
|
99
|
+
{*}$rtlmp_args
|
|
100
|
+
} else {
|
|
101
|
+
###############################
|
|
102
|
+
# TDMS Global Placement
|
|
103
|
+
###############################
|
|
104
|
+
|
|
105
|
+
sc_global_placement -disable_routability_driven
|
|
106
|
+
|
|
107
|
+
###############################
|
|
108
|
+
# Macro placement
|
|
109
|
+
###############################
|
|
110
|
+
|
|
111
|
+
macro_placement \
|
|
112
|
+
-halo [sc_cfg_tool_task_get var macro_place_halo] \
|
|
113
|
+
-channel [sc_cfg_tool_task_get var macro_place_channel]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
sc_print_macro_information
|
|
118
|
+
|
|
119
|
+
###############################
|
|
120
|
+
# Task Postamble
|
|
121
|
+
###############################
|
|
122
|
+
|
|
123
|
+
source -echo "$sc_refdir/apr/postamble.tcl"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
###############################
|
|
2
|
+
# Reading SC Schema
|
|
3
|
+
###############################
|
|
4
|
+
|
|
5
|
+
source ./sc_manifest.tcl > /dev/null
|
|
6
|
+
|
|
7
|
+
###############################
|
|
8
|
+
# Task Preamble
|
|
9
|
+
###############################
|
|
10
|
+
|
|
11
|
+
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
12
|
+
source -echo "$sc_refdir/apr/preamble.tcl"
|
|
13
|
+
|
|
14
|
+
###############################
|
|
15
|
+
# Report Metrics
|
|
16
|
+
###############################
|
|
17
|
+
|
|
18
|
+
###############################
|
|
19
|
+
# Task Postamble
|
|
20
|
+
###############################
|
|
21
|
+
|
|
22
|
+
source -echo "$sc_refdir/apr/postamble.tcl"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
###############################
|
|
2
|
+
# Reading SC Schema
|
|
3
|
+
###############################
|
|
4
|
+
|
|
5
|
+
source ./sc_manifest.tcl > /dev/null
|
|
6
|
+
|
|
7
|
+
###############################
|
|
8
|
+
# Task Preamble
|
|
9
|
+
###############################
|
|
10
|
+
|
|
11
|
+
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
12
|
+
source -echo "$sc_refdir/apr/preamble.tcl"
|
|
13
|
+
|
|
14
|
+
if { [sc_design_has_placeable_ios] } {
|
|
15
|
+
###############################
|
|
16
|
+
# Global Placement (without considering IO placements)
|
|
17
|
+
###############################
|
|
18
|
+
|
|
19
|
+
if { [lindex [sc_cfg_tool_task_get {var} gpl_enable_skip_io] 0] == "true" } {
|
|
20
|
+
utl::info FLW 1 "Performing global placement without considering IO"
|
|
21
|
+
sc_global_placement -skip_io
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
###############################
|
|
25
|
+
# Refine Automatic Pin Placement
|
|
26
|
+
###############################
|
|
27
|
+
|
|
28
|
+
if { ![sc_has_unplaced_instances] } {
|
|
29
|
+
sc_pin_placement
|
|
30
|
+
} else {
|
|
31
|
+
utl::info FLW 1 "Skipping pin placements refinement due to unplaced instances"
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
estimate_parasitics -placement
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
###############################
|
|
38
|
+
# Task Postamble
|
|
39
|
+
###############################
|
|
40
|
+
|
|
41
|
+
source -echo "$sc_refdir/apr/postamble.tcl"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
###############################
|
|
2
|
+
# Reading SC Schema
|
|
3
|
+
###############################
|
|
4
|
+
|
|
5
|
+
source ./sc_manifest.tcl > /dev/null
|
|
6
|
+
|
|
7
|
+
###############################
|
|
8
|
+
# Task Preamble
|
|
9
|
+
###############################
|
|
10
|
+
|
|
11
|
+
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
12
|
+
source -echo "$sc_refdir/apr/preamble.tcl"
|
|
13
|
+
|
|
14
|
+
###############################
|
|
15
|
+
# Error checking
|
|
16
|
+
###############################
|
|
17
|
+
|
|
18
|
+
if { [sc_design_has_unplaced_macros] } {
|
|
19
|
+
utl::error FLW 1 "Design contains unplaced macros."
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
###############################
|
|
23
|
+
# Power Network
|
|
24
|
+
###############################
|
|
25
|
+
|
|
26
|
+
set pdn_files []
|
|
27
|
+
foreach pdnconfig [sc_cfg_tool_task_get {file} pdn_config] {
|
|
28
|
+
if { [lsearch -exact $pdn_files $pdnconfig] != -1 } {
|
|
29
|
+
continue
|
|
30
|
+
}
|
|
31
|
+
puts "Sourcing PDNGEN configuration: ${pdnconfig}"
|
|
32
|
+
source $pdnconfig
|
|
33
|
+
|
|
34
|
+
lappend pdn_files $pdnconfig
|
|
35
|
+
}
|
|
36
|
+
pdngen -failed_via_report "reports/${sc_design}_pdngen_failed_vias.rpt"
|
|
37
|
+
|
|
38
|
+
###############################
|
|
39
|
+
# Check Power Network
|
|
40
|
+
###############################
|
|
41
|
+
|
|
42
|
+
foreach net [sc_supply_nets] {
|
|
43
|
+
if { ![[[ord::get_db_block] findNet $net] isSpecial] } {
|
|
44
|
+
utl::warn FLW 1 "$net_name is marked as a supply net, but is not marked as a special net"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
foreach net [sc_psm_check_nets] {
|
|
49
|
+
puts "Check supply net: $net"
|
|
50
|
+
check_power_grid \
|
|
51
|
+
-floorplanning \
|
|
52
|
+
-error_file "reports/power_grid_${net}.rpt" \
|
|
53
|
+
-net $net
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
###############################
|
|
57
|
+
# Task Postamble
|
|
58
|
+
###############################
|
|
59
|
+
|
|
60
|
+
source -echo "$sc_refdir/apr/postamble.tcl"
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
###############################
|
|
2
|
+
# Reading SC Schema
|
|
3
|
+
###############################
|
|
4
|
+
|
|
5
|
+
source ./sc_manifest.tcl > /dev/null
|
|
6
|
+
|
|
7
|
+
###############################
|
|
8
|
+
# Task Preamble
|
|
9
|
+
###############################
|
|
10
|
+
|
|
11
|
+
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
12
|
+
source -echo "$sc_refdir/apr/preamble.tcl"
|
|
13
|
+
|
|
14
|
+
###############################
|
|
15
|
+
# Buffer ports
|
|
16
|
+
###############################
|
|
17
|
+
|
|
18
|
+
if { [lindex [sc_cfg_tool_task_get {var} rsz_buffer_inputs] 0] == "true" } {
|
|
19
|
+
buffer_ports -inputs
|
|
20
|
+
}
|
|
21
|
+
if { [lindex [sc_cfg_tool_task_get {var} rsz_buffer_outputs] 0] == "true" } {
|
|
22
|
+
buffer_ports -outputs
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
estimate_parasitics -placement
|
|
26
|
+
|
|
27
|
+
###############################
|
|
28
|
+
# Repair DRVs
|
|
29
|
+
###############################
|
|
30
|
+
|
|
31
|
+
set repair_design_args []
|
|
32
|
+
|
|
33
|
+
set rsz_cap_margin [lindex [sc_cfg_tool_task_get {var} rsz_cap_margin] 0]
|
|
34
|
+
if { $rsz_cap_margin != "false" } {
|
|
35
|
+
lappend repair_design_args "-cap_margin" $rsz_cap_margin
|
|
36
|
+
}
|
|
37
|
+
set rsz_slew_margin [lindex [sc_cfg_tool_task_get {var} rsz_slew_margin] 0]
|
|
38
|
+
if { $rsz_slew_margin != "false" } {
|
|
39
|
+
lappend repair_design_args "-slew_margin" $rsz_slew_margin
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
repair_design \
|
|
43
|
+
-verbose \
|
|
44
|
+
{*}$repair_design_args
|
|
45
|
+
|
|
46
|
+
###############################
|
|
47
|
+
# Tie-off cell insertion
|
|
48
|
+
###############################
|
|
49
|
+
|
|
50
|
+
set tie_separation [lindex [sc_cfg_tool_task_get {var} ifp_tie_separation] 0]
|
|
51
|
+
foreach tie_type "high low" {
|
|
52
|
+
if { [sc_has_tie_cell $tie_type] } {
|
|
53
|
+
repair_tie_fanout \
|
|
54
|
+
-separation $tie_separation \
|
|
55
|
+
[sc_get_tie_cell $tie_type]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
global_connect
|
|
60
|
+
|
|
61
|
+
# estimate for metrics
|
|
62
|
+
estimate_parasitics -placement
|
|
63
|
+
|
|
64
|
+
###############################
|
|
65
|
+
# Task Postamble
|
|
66
|
+
###############################
|
|
67
|
+
|
|
68
|
+
source -echo "$sc_refdir/apr/postamble.tcl"
|