siliconcompiler 0.29.4__py3-none-any.whl → 0.31.0__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/sc.py +1 -1
- siliconcompiler/apps/sc_install.py +35 -3
- siliconcompiler/apps/sc_remote.py +1 -3
- siliconcompiler/core.py +38 -12
- siliconcompiler/flowgraph.py +11 -23
- siliconcompiler/package.py +1 -1
- siliconcompiler/remote/schema.py +9 -8
- siliconcompiler/report/report.py +4 -3
- siliconcompiler/scheduler/__init__.py +109 -104
- siliconcompiler/scheduler/docker_runner.py +1 -1
- siliconcompiler/scheduler/send_messages.py +1 -1
- siliconcompiler/schema/schema_cfg.py +478 -411
- siliconcompiler/schema/schema_obj.py +32 -18
- siliconcompiler/schema/utils.py +19 -0
- siliconcompiler/sphinx_ext/schemagen.py +3 -1
- siliconcompiler/templates/replay/replay.sh.j2 +92 -0
- siliconcompiler/tools/__init__.py +3 -1
- siliconcompiler/tools/_common/__init__.py +8 -2
- siliconcompiler/tools/_common/asic.py +1 -1
- siliconcompiler/tools/bluespec/__init__.py +35 -0
- siliconcompiler/tools/bluespec/convert.py +44 -5
- siliconcompiler/tools/graphviz/__init__.py +12 -0
- siliconcompiler/tools/graphviz/screenshot.py +48 -0
- siliconcompiler/tools/graphviz/show.py +20 -0
- siliconcompiler/tools/klayout/export.py +5 -0
- siliconcompiler/tools/klayout/klayout.py +18 -1
- siliconcompiler/tools/klayout/klayout_export.py +4 -1
- siliconcompiler/tools/klayout/klayout_operations.py +5 -2
- siliconcompiler/tools/klayout/klayout_utils.py +23 -0
- siliconcompiler/tools/klayout/operations.py +5 -0
- siliconcompiler/tools/magic/magic.py +1 -1
- siliconcompiler/tools/openroad/_apr.py +20 -3
- siliconcompiler/tools/openroad/antenna_repair.py +2 -1
- siliconcompiler/tools/openroad/clock_tree_synthesis.py +2 -1
- siliconcompiler/tools/openroad/detailed_placement.py +2 -1
- siliconcompiler/tools/openroad/detailed_route.py +8 -0
- siliconcompiler/tools/openroad/fillercell_insertion.py +2 -1
- siliconcompiler/tools/openroad/global_placement.py +2 -1
- siliconcompiler/tools/openroad/macro_placement.py +9 -0
- siliconcompiler/tools/openroad/pin_placement.py +2 -1
- siliconcompiler/tools/openroad/power_grid.py +6 -0
- siliconcompiler/tools/openroad/repair_design.py +2 -1
- siliconcompiler/tools/openroad/repair_timing.py +2 -1
- siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +6 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +3 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +10 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +1 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +17 -5
- siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +14 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +54 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +1 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +3 -0
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +55 -17
- siliconcompiler/tools/openroad/scripts/common/reports.tcl +25 -3
- siliconcompiler/tools/openroad/scripts/common/write_images.tcl +28 -0
- siliconcompiler/tools/yosys/__init__.py +7 -0
- siliconcompiler/tools/yosys/sc_syn.tcl +33 -24
- siliconcompiler/tools/yosys/syn_asic.py +27 -0
- siliconcompiler/tools/yosys/syn_asic.tcl +27 -0
- siliconcompiler/toolscripts/_tools.json +16 -4
- siliconcompiler/toolscripts/rhel8/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/rhel8/install-yosys-slang.sh +22 -0
- siliconcompiler/toolscripts/rhel9/install-openroad.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/rhel9/install-yosys-slang.sh +22 -0
- siliconcompiler/toolscripts/ubuntu20/install-openroad.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/ubuntu20/install-yosys-slang.sh +22 -0
- siliconcompiler/toolscripts/ubuntu22/install-openroad.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/ubuntu22/install-yosys-slang.sh +22 -0
- siliconcompiler/toolscripts/ubuntu24/install-openroad.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/ubuntu24/install-yosys-slang.sh +22 -0
- siliconcompiler/utils/__init__.py +44 -5
- siliconcompiler/utils/showtools.py +7 -0
- {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/METADATA +8 -8
- {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/RECORD +83 -70
- {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/WHEEL +1 -1
- siliconcompiler/tools/bluespec/bluespec.py +0 -40
- {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/LICENSE +0 -0
- {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import pya
|
|
2
2
|
import importlib.util as importlib_util
|
|
3
|
+
import json
|
|
3
4
|
import os
|
|
4
5
|
import shutil
|
|
5
6
|
import sys
|
|
@@ -180,3 +181,25 @@ def get_schema(manifest):
|
|
|
180
181
|
spec.loader.exec_module(module)
|
|
181
182
|
# Return schema
|
|
182
183
|
return module.Schema(manifest=manifest)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def generate_metrics():
|
|
187
|
+
metrics = {}
|
|
188
|
+
|
|
189
|
+
main_window = pya.MainWindow.instance()
|
|
190
|
+
if not main_window:
|
|
191
|
+
return
|
|
192
|
+
layout_view = main_window.current_view()
|
|
193
|
+
if not layout_view:
|
|
194
|
+
return
|
|
195
|
+
cell_view = layout_view.active_cellview()
|
|
196
|
+
if not cell_view:
|
|
197
|
+
return
|
|
198
|
+
cell = cell_view.cell
|
|
199
|
+
if not cell:
|
|
200
|
+
return
|
|
201
|
+
|
|
202
|
+
metrics["area"] = cell.dbbox().area()
|
|
203
|
+
|
|
204
|
+
with open('reports/metrics.json', 'w') as f:
|
|
205
|
+
json.dump(metrics, f, indent=2)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from siliconcompiler import SiliconCompilerError
|
|
3
3
|
from siliconcompiler.tools.klayout.klayout import setup as setup_tool
|
|
4
|
+
from siliconcompiler.tools.klayout.klayout import process_metrics
|
|
4
5
|
from siliconcompiler.tools.klayout.klayout import runtime_options as runtime_options_tool
|
|
5
6
|
from siliconcompiler.tools._common import input_provides, get_tool_task
|
|
6
7
|
|
|
@@ -202,3 +203,7 @@ def runtime_options(chip):
|
|
|
202
203
|
return runtime_options_tool(chip) + [
|
|
203
204
|
'-rd', f'SC_TOOLS_ROOT={os.path.dirname(os.path.dirname(__file__))}'
|
|
204
205
|
]
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def post_process(chip):
|
|
209
|
+
process_metrics(chip)
|
|
@@ -87,7 +87,7 @@ def process_file(file_type, chip, *key):
|
|
|
87
87
|
index = chip.get('arg', 'index')
|
|
88
88
|
tool, task = get_tool_task(chip, step, index)
|
|
89
89
|
|
|
90
|
-
if chip.get(*key, field='pernode')
|
|
90
|
+
if chip.get(*key, field='pernode').is_never():
|
|
91
91
|
files = chip.find_files(*key)
|
|
92
92
|
else:
|
|
93
93
|
files = chip.find_files(*key, step=step, index=index)
|
|
@@ -128,6 +128,8 @@ def extract_metrics(chip):
|
|
|
128
128
|
"drvs": [
|
|
129
129
|
"timing/drv_violators.rpt",
|
|
130
130
|
"floating_nets.rpt",
|
|
131
|
+
"overdriven_nets.rpt",
|
|
132
|
+
"overdriven_nets_with_parallel.rpt",
|
|
131
133
|
f"{chip.design}_antenna.rpt",
|
|
132
134
|
f"{chip.design}_antenna_post_repair.rpt"
|
|
133
135
|
],
|
|
@@ -195,13 +197,15 @@ def extract_metrics(chip):
|
|
|
195
197
|
has_timing = metrics['sc__metric__timing__clocks'] > 0
|
|
196
198
|
|
|
197
199
|
for metric, or_metric, or_use, or_unit in [
|
|
200
|
+
('vias', 'sc__step__global_route__vias', True, None),
|
|
198
201
|
('vias', 'sc__step__route__vias', True, None),
|
|
202
|
+
('wirelength', 'sc__step__global_route__wirelength', True, 'distance'),
|
|
199
203
|
('wirelength', 'sc__step__route__wirelength', True, 'distance'),
|
|
200
204
|
('cellarea', 'sc__metric__design__instance__area', True, 'area'),
|
|
201
205
|
('stdcellarea', 'sc__metric__design__instance__area__stdcell', True, 'area'),
|
|
202
206
|
('macroarea', 'sc__metric__design__instance__area__macros', True, 'area'),
|
|
203
207
|
('padcellarea', 'sc__metric__design__instance__area__padcells', True, 'area'),
|
|
204
|
-
('totalarea', '
|
|
208
|
+
('totalarea', 'sc__metric__design__die__area', True, 'area'),
|
|
205
209
|
('utilization', 'sc__metric__design__instance__utilization', True, 100.0),
|
|
206
210
|
('setuptns', 'sc__metric__timing__setup__tns', has_timing, 'time'),
|
|
207
211
|
('holdtns', 'sc__metric__timing__hold__tns', has_timing, 'time'),
|
|
@@ -281,6 +285,10 @@ def extract_metrics(chip):
|
|
|
281
285
|
'sc__metric__timing__drv__max_slew',
|
|
282
286
|
'sc__metric__timing__drv__max_cap',
|
|
283
287
|
'sc__metric__timing__drv__max_fanout',
|
|
288
|
+
'sc__metric__timing__drv__max_fanout',
|
|
289
|
+
'sc__metric__timing__drv__floating__nets',
|
|
290
|
+
'sc__metric__timing__drv__floating__pins',
|
|
291
|
+
'sc__metric__timing__drv__overdriven__nets',
|
|
284
292
|
'sc__metric__antenna__violating__nets',
|
|
285
293
|
'sc__metric__antenna__violating__pins']:
|
|
286
294
|
if metric in metrics:
|
|
@@ -757,6 +765,10 @@ def define_drt_params(chip):
|
|
|
757
765
|
schelp='list of layers to treat as unidirectional regardless of '
|
|
758
766
|
'what the tech lef specifies')
|
|
759
767
|
|
|
768
|
+
set_tool_task_var(chip, param_key='drt_report_interval',
|
|
769
|
+
default_value=5,
|
|
770
|
+
schelp='reporting interval in steps for generating a DRC report.')
|
|
771
|
+
|
|
760
772
|
|
|
761
773
|
def define_sta_params(chip):
|
|
762
774
|
step = chip.get('arg', 'step')
|
|
@@ -862,6 +874,10 @@ def define_mpl_params(chip):
|
|
|
862
874
|
set_tool_task_var(chip, param_key='rtlmp_fence_weight',
|
|
863
875
|
schelp='Weight for fence cost, or how far the macro is from zero '
|
|
864
876
|
'fence violation')
|
|
877
|
+
set_tool_task_var(chip, param_key='rtlmp_boundary_weight',
|
|
878
|
+
schelp='Weight for the boundary, or how far the hard macro clusters are from '
|
|
879
|
+
'boundaries. Note that mixed macro clusters are not pushed, thus not '
|
|
880
|
+
'considered in this cost.')
|
|
865
881
|
set_tool_task_var(chip, param_key='rtlmp_blockage_weight',
|
|
866
882
|
schelp='Weight for the boundary, or how far the hard macro clusters are '
|
|
867
883
|
'from boundaries')
|
|
@@ -974,7 +990,8 @@ def set_reports(chip, reports):
|
|
|
974
990
|
"ir_drop",
|
|
975
991
|
"clock_placement",
|
|
976
992
|
"clock_trees",
|
|
977
|
-
"optimization_placement"
|
|
993
|
+
"optimization_placement",
|
|
994
|
+
"module_view"
|
|
978
995
|
)
|
|
979
996
|
|
|
980
997
|
chip.set('tool', tool, 'task', task, 'var', 'reports',
|
|
@@ -988,7 +1005,7 @@ def set_reports(chip, reports):
|
|
|
988
1005
|
for key in (('tool', tool, 'task', task, 'var', f'skip_{type}'),
|
|
989
1006
|
('option', 'var', f'openroad_skip_{type}')):
|
|
990
1007
|
if chip.valid(*key):
|
|
991
|
-
if chip.get(*key, field='pernode')
|
|
1008
|
+
if chip.get(*key, field='pernode').is_never():
|
|
992
1009
|
if chip.get(*key) == ["true"]:
|
|
993
1010
|
return False
|
|
994
1011
|
elif chip.get(*key, step=step, index=index) == ["true"]:
|
|
@@ -52,6 +52,14 @@ def setup(chip):
|
|
|
52
52
|
'clock_trees'
|
|
53
53
|
])
|
|
54
54
|
|
|
55
|
+
chip.set('tool', tool, 'task', task, 'var', 'drt_end_iteration',
|
|
56
|
+
'end iteration for detail routing',
|
|
57
|
+
field='help')
|
|
58
|
+
if chip.get('tool', tool, 'task', task, 'var', 'drt_end_iteration', step=step, index=index):
|
|
59
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
60
|
+
','.join(['tool', tool, 'task', task, 'var', 'drt_end_iteration']),
|
|
61
|
+
step=step, index=index)
|
|
62
|
+
|
|
55
63
|
|
|
56
64
|
def pre_process(chip):
|
|
57
65
|
define_ord_files(chip)
|
|
@@ -43,6 +43,15 @@ def setup(chip):
|
|
|
43
43
|
'unconstrained'
|
|
44
44
|
])
|
|
45
45
|
|
|
46
|
+
chip.set('tool', tool, 'task', task, 'file', 'rtlmp_constraints',
|
|
47
|
+
'contraints script for macro placement',
|
|
48
|
+
field='help')
|
|
49
|
+
|
|
50
|
+
if chip.get('tool', tool, 'task', task, 'file', 'rtlmp_constraints', step=step, index=index):
|
|
51
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
52
|
+
",".join(['tool', tool, 'task', task, 'file', 'rtlmp_constraints']),
|
|
53
|
+
step=step, index=index)
|
|
54
|
+
|
|
46
55
|
|
|
47
56
|
def pre_process(chip):
|
|
48
57
|
step = chip.get('arg', 'step')
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from siliconcompiler import NodeStatus
|
|
2
2
|
|
|
3
3
|
from siliconcompiler.tools._common import get_tool_task, has_pre_post_script
|
|
4
|
+
from siliconcompiler.tools._common.asic import set_tool_task_var
|
|
4
5
|
|
|
5
6
|
from siliconcompiler.tools.openroad._apr import setup as apr_setup
|
|
6
7
|
from siliconcompiler.tools.openroad._apr import set_reports, set_pnr_inputs, set_pnr_outputs
|
|
@@ -39,6 +40,11 @@ def setup(chip):
|
|
|
39
40
|
define_pdn_params(chip)
|
|
40
41
|
define_psm_params(chip)
|
|
41
42
|
|
|
43
|
+
set_tool_task_var(chip, param_key='fixed_pin_keepout',
|
|
44
|
+
default_value=0,
|
|
45
|
+
schelp='if > 0, applies a blockage in multiples of the routing pitch '
|
|
46
|
+
'to each fixed pin to ensure there is room for routing.')
|
|
47
|
+
|
|
42
48
|
set_reports(chip, [])
|
|
43
49
|
|
|
44
50
|
|
|
@@ -65,6 +65,12 @@ sc_set_dont_use
|
|
|
65
65
|
|
|
66
66
|
sc_setup_global_routing
|
|
67
67
|
|
|
68
|
+
# Store incoming markers to avoid rewriting them
|
|
69
|
+
set sc_starting_markers []
|
|
70
|
+
foreach markerdb [[ord::get_db_block] getMarkerCategories] {
|
|
71
|
+
lappend sc_starting_markers [$markerdb getName]
|
|
72
|
+
}
|
|
73
|
+
|
|
68
74
|
###############################
|
|
69
75
|
# Source Step Script
|
|
70
76
|
###############################
|
|
@@ -36,6 +36,7 @@ if { [llength [all_clocks]] > 0 } {
|
|
|
36
36
|
|
|
37
37
|
set cts_distance_between_buffers \
|
|
38
38
|
[lindex [sc_cfg_tool_task_get var cts_distance_between_buffers] 0]
|
|
39
|
+
sc_report_args -command clock_tree_synthesis -args $sc_cts_arguments
|
|
39
40
|
clock_tree_synthesis \
|
|
40
41
|
-sink_clustering_enable \
|
|
41
42
|
-sink_clustering_size [lindex [sc_cfg_tool_task_get var cts_cluster_size] 0] \
|
|
@@ -43,6 +44,8 @@ if { [llength [all_clocks]] > 0 } {
|
|
|
43
44
|
-distance_between_buffers $cts_distance_between_buffers \
|
|
44
45
|
{*}$sc_cts_arguments
|
|
45
46
|
|
|
47
|
+
tee -file reports/cts.rpt {report_cts}
|
|
48
|
+
|
|
46
49
|
set_propagated_clock [all_clocks]
|
|
47
50
|
|
|
48
51
|
estimate_parasitics -placement
|
|
@@ -15,6 +15,8 @@ source -echo "$sc_refdir/apr/preamble.tcl"
|
|
|
15
15
|
# Detailed Routing
|
|
16
16
|
###############################
|
|
17
17
|
|
|
18
|
+
sc_setup_detailed_route
|
|
19
|
+
|
|
18
20
|
set drt_arguments []
|
|
19
21
|
if { [lindex [sc_cfg_tool_task_get {var} drt_disable_via_gen] 0] == "true" } {
|
|
20
22
|
lappend drt_arguments "-disable_via_gen"
|
|
@@ -38,12 +40,20 @@ set drt_repair_pdn_vias \
|
|
|
38
40
|
if { $drt_repair_pdn_vias != "" } {
|
|
39
41
|
lappend drt_arguments "-repair_pdn_vias" $drt_repair_pdn_vias
|
|
40
42
|
}
|
|
43
|
+
set drt_end_iteration [lindex [sc_cfg_tool_task_get {var} drt_end_iteration] 0]
|
|
44
|
+
if { $drt_end_iteration != "" } {
|
|
45
|
+
lappend drt_arguments "-droute_end_iter" $drt_end_iteration
|
|
46
|
+
}
|
|
47
|
+
lappend drt_arguments \
|
|
48
|
+
-drc_report_iter_step \
|
|
49
|
+
[lindex [sc_cfg_tool_task_get {var} drt_report_interval] 0]
|
|
41
50
|
|
|
42
51
|
set sc_minmetal [sc_cfg_get pdk $sc_pdk minlayer $sc_stackup]
|
|
43
52
|
set sc_minmetal [sc_get_layer_name $sc_minmetal]
|
|
44
53
|
set sc_maxmetal [sc_cfg_get pdk $sc_pdk maxlayer $sc_stackup]
|
|
45
54
|
set sc_maxmetal [sc_get_layer_name $sc_maxmetal]
|
|
46
55
|
|
|
56
|
+
sc_report_args -command detailed_route -args $drt_arguments
|
|
47
57
|
detailed_route \
|
|
48
58
|
-save_guide_updates \
|
|
49
59
|
-output_drc "reports/${sc_design}_drc.rpt" \
|
|
@@ -41,6 +41,7 @@ if { [lindex [sc_cfg_tool_task_get var enable_scan_chains] 0] == "true" } {
|
|
|
41
41
|
[lindex [sc_cfg_tool_task_get var scan_enable_port_pattern] 0]
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
sc_report_args -command set_dft_config -args $dft_args
|
|
44
45
|
set_dft_config -clock_mixing clock_mix {*}$dft_args
|
|
45
46
|
tee -file reports/scan_chain_config.rpt {report_dft_config}
|
|
46
47
|
scan_replace
|
|
@@ -16,6 +16,8 @@ source -echo "$sc_refdir/apr/preamble.tcl"
|
|
|
16
16
|
###############################
|
|
17
17
|
|
|
18
18
|
if { [lindex [sc_cfg_tool_task_get {var} grt_use_pin_access] 0] == "true" } {
|
|
19
|
+
sc_setup_detailed_route
|
|
20
|
+
|
|
19
21
|
set sc_minmetal [sc_cfg_get pdk $sc_pdk minlayer $sc_stackup]
|
|
20
22
|
set sc_minmetal [sc_get_layer_name $sc_minmetal]
|
|
21
23
|
set sc_maxmetal [sc_cfg_get pdk $sc_pdk maxlayer $sc_stackup]
|
|
@@ -27,6 +29,7 @@ if { [lindex [sc_cfg_tool_task_get {var} grt_use_pin_access] 0] == "true" } {
|
|
|
27
29
|
[lindex [sc_cfg_tool_task_get {var} drt_process_node] 0]
|
|
28
30
|
}
|
|
29
31
|
|
|
32
|
+
sc_report_args -command pin_access -args $pin_access_args
|
|
30
33
|
pin_access \
|
|
31
34
|
-bottom_routing_layer $sc_minmetal \
|
|
32
35
|
-top_routing_layer $sc_maxmetal \
|
|
@@ -45,11 +48,20 @@ if { [lindex [sc_cfg_tool_task_get {var} grt_allow_overflow] 0] == "true" } {
|
|
|
45
48
|
lappend sc_grt_arguments "-allow_overflow"
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
global_route -
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
sc_report_args -command global_route -args $sc_grt_arguments
|
|
52
|
+
if {
|
|
53
|
+
[catch {
|
|
54
|
+
global_route -guide_file "reports/route.guide" \
|
|
55
|
+
-congestion_iterations [lindex [sc_cfg_tool_task_get {var} grt_overflow_iter] 0] \
|
|
56
|
+
-congestion_report_file "reports/${sc_design}_congestion.rpt" \
|
|
57
|
+
-verbose \
|
|
58
|
+
{*}$sc_grt_arguments
|
|
59
|
+
}]
|
|
60
|
+
} {
|
|
61
|
+
write_db "reports/${sc_design}.globalroute-error.odb"
|
|
62
|
+
utl::error FLW 1 \
|
|
63
|
+
"Global routing failed, saving database to reports/${sc_design}.globalroute-error.odb"
|
|
64
|
+
}
|
|
53
65
|
|
|
54
66
|
# estimate for metrics
|
|
55
67
|
estimate_parasitics -global_routing
|
|
@@ -11,6 +11,14 @@ source ./sc_manifest.tcl > /dev/null
|
|
|
11
11
|
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
12
12
|
source -echo "$sc_refdir/apr/preamble.tcl"
|
|
13
13
|
|
|
14
|
+
###############################
|
|
15
|
+
# Macro placement constraints
|
|
16
|
+
###############################
|
|
17
|
+
foreach script [sc_cfg_tool_task_get file rtlmp_constraints] {
|
|
18
|
+
puts "Sourcing macro placement constraints: $script"
|
|
19
|
+
source -echo $script
|
|
20
|
+
}
|
|
21
|
+
|
|
14
22
|
# Need to check if we have any macros before performing macro placement,
|
|
15
23
|
# since we get an error otherwise.
|
|
16
24
|
if { [sc_design_has_unplaced_macros] } {
|
|
@@ -77,6 +85,10 @@ if { [sc_design_has_unplaced_macros] } {
|
|
|
77
85
|
if { $rtlmp_guidance_weight != "" } {
|
|
78
86
|
lappend rtlmp_args -guidance_weight $rtlmp_guidance_weight
|
|
79
87
|
}
|
|
88
|
+
set rtlmp_boundary_weight [lindex [sc_cfg_tool_task_get var rtlmp_boundary_weight] 0]
|
|
89
|
+
if { $rtlmp_boundary_weight != "" } {
|
|
90
|
+
lappend rtlmp_args -boundary_weight $rtlmp_boundary_weight
|
|
91
|
+
}
|
|
80
92
|
set rtlmp_fence_weight [lindex [sc_cfg_tool_task_get var rtlmp_fence_weight] 0]
|
|
81
93
|
if { $rtlmp_fence_weight != "" } {
|
|
82
94
|
lappend rtlmp_args -fence_weight $rtlmp_fence_weight
|
|
@@ -90,11 +102,12 @@ if { [sc_design_has_unplaced_macros] } {
|
|
|
90
102
|
lappend rtlmp_args -blockage_weight $rtlmp_blockage_weight
|
|
91
103
|
}
|
|
92
104
|
|
|
105
|
+
sc_report_args -command rtl_macro_placer -args $rtlmp_args
|
|
93
106
|
rtl_macro_placer \
|
|
94
107
|
-report_directory reports/rtlmp \
|
|
95
108
|
-halo_width $halo_x \
|
|
96
109
|
-halo_height $halo_y \
|
|
97
|
-
-target_util [sc_global_placement_density] \
|
|
110
|
+
-target_util [sc_global_placement_density -exclude_padding] \
|
|
98
111
|
{*}$rtlmp_args
|
|
99
112
|
}
|
|
100
113
|
|
|
@@ -19,6 +19,48 @@ if { [sc_design_has_unplaced_macros] } {
|
|
|
19
19
|
utl::error FLW 1 "Design contains unplaced macros."
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
###############################
|
|
23
|
+
# Add blockages
|
|
24
|
+
###############################
|
|
25
|
+
|
|
26
|
+
set pdn_blockages []
|
|
27
|
+
set pdn_pin_keepout [lindex [sc_cfg_tool_task_get var fixed_pin_keepout] 0]
|
|
28
|
+
if { $pdn_pin_keepout > 0 } {
|
|
29
|
+
foreach bterm [[ord::get_db_block] getBTerms] {
|
|
30
|
+
foreach bpin [$bterm getBPins] {
|
|
31
|
+
if {
|
|
32
|
+
[$bpin getPlacementStatus] != "FIRM" &&
|
|
33
|
+
[$bpin getPlacementStatus] != "LOCKED"
|
|
34
|
+
} {
|
|
35
|
+
continue
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
foreach box [$bpin getBoxes] {
|
|
39
|
+
set layer [$box getTechLayer]
|
|
40
|
+
if { $layer == "NULL" } {
|
|
41
|
+
continue
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
set tech_pitch [expr { [$layer getPitch] * $pdn_pin_keepout }]
|
|
45
|
+
|
|
46
|
+
set xmin [expr { [$box xMin] - $tech_pitch }]
|
|
47
|
+
set xmax [expr { [$box xMax] + $tech_pitch }]
|
|
48
|
+
set ymin [expr { [$box yMin] - $tech_pitch }]
|
|
49
|
+
set ymax [expr { [$box yMax] + $tech_pitch }]
|
|
50
|
+
|
|
51
|
+
set blockage [odb::dbObstruction_create \
|
|
52
|
+
[ord::get_db_block] \
|
|
53
|
+
$layer \
|
|
54
|
+
$xmin $ymin \
|
|
55
|
+
$xmax $ymax]
|
|
56
|
+
lappend pdn_blockages $blockage
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
utl::info FLW 1 "Added [llength $pdn_blockages] obstructions to pins"
|
|
62
|
+
}
|
|
63
|
+
|
|
22
64
|
###############################
|
|
23
65
|
# Power Network
|
|
24
66
|
###############################
|
|
@@ -57,6 +99,7 @@ foreach net [sc_psm_check_nets] {
|
|
|
57
99
|
lappend check_args -dont_require_terminals
|
|
58
100
|
}
|
|
59
101
|
|
|
102
|
+
sc_report_args -command check_power_grid -args $check_args
|
|
60
103
|
check_power_grid \
|
|
61
104
|
-floorplanning \
|
|
62
105
|
-error_file "reports/power_grid_${net}.rpt" \
|
|
@@ -64,6 +107,17 @@ foreach net [sc_psm_check_nets] {
|
|
|
64
107
|
{*}$check_args
|
|
65
108
|
}
|
|
66
109
|
|
|
110
|
+
###############################
|
|
111
|
+
# Remove blockages
|
|
112
|
+
###############################
|
|
113
|
+
|
|
114
|
+
if { [llength $pdn_blockages] > 0 } {
|
|
115
|
+
foreach obstruction $pdn_blockages {
|
|
116
|
+
odb::dbObstruction_destroy $obstruction
|
|
117
|
+
}
|
|
118
|
+
utl::info FLW 1 "Deleted [llength $pdn_blockages] obstructions"
|
|
119
|
+
}
|
|
120
|
+
|
|
67
121
|
###############################
|
|
68
122
|
# Task Postamble
|
|
69
123
|
###############################
|
|
@@ -40,6 +40,7 @@ if { [lindex [sc_cfg_tool_task_get var rsz_skip_setup_repair] 0] != "true" } {
|
|
|
40
40
|
|
|
41
41
|
estimate_parasitics -placement
|
|
42
42
|
|
|
43
|
+
sc_report_args -command repair_timing -args $repair_timing_args
|
|
43
44
|
repair_timing \
|
|
44
45
|
-setup \
|
|
45
46
|
-verbose \
|
|
@@ -64,6 +65,7 @@ if { [lindex [sc_cfg_tool_task_get var rsz_skip_hold_repair] 0] != "true" } {
|
|
|
64
65
|
# Enable hold cells
|
|
65
66
|
sc_set_dont_use -hold -scanchain -multibit -report dont_use.repair_timing.hold
|
|
66
67
|
|
|
68
|
+
sc_report_args -command repair_timing -args $repair_timing_args
|
|
67
69
|
repair_timing \
|
|
68
70
|
-hold \
|
|
69
71
|
-verbose \
|
|
@@ -88,6 +90,7 @@ if { [lindex [sc_cfg_tool_task_get var rsz_skip_recover_power] 0] != "true" } {
|
|
|
88
90
|
# Enable cells
|
|
89
91
|
sc_set_dont_use -hold -scanchain -multibit -report dont_use.repair_timing.power
|
|
90
92
|
|
|
93
|
+
sc_report_args -command repair_timing -args $repair_timing_args
|
|
91
94
|
repair_timing \
|
|
92
95
|
-recover_power $rsz_recover_power \
|
|
93
96
|
-verbose \
|
|
@@ -2,15 +2,24 @@
|
|
|
2
2
|
# Global Placement
|
|
3
3
|
#######################
|
|
4
4
|
|
|
5
|
-
proc sc_global_placement_density { } {
|
|
6
|
-
|
|
5
|
+
proc sc_global_placement_density { args } {
|
|
6
|
+
sta::parse_key_args "sc_global_placement_density" args \
|
|
7
|
+
keys {} \
|
|
8
|
+
flags {-exclude_padding}
|
|
9
|
+
sta::check_argc_eq0 "sc_global_placement_density" $args
|
|
10
|
+
|
|
7
11
|
set gpl_place_density [lindex [sc_cfg_tool_task_get var place_density] 0]
|
|
8
12
|
set gpl_uniform_placement_adjustment \
|
|
9
13
|
[lindex [sc_cfg_tool_task_get var gpl_uniform_placement_adjustment] 0]
|
|
10
14
|
|
|
11
|
-
set
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
set density_args []
|
|
16
|
+
if { ![info exists flags(-exclude_padding)] } {
|
|
17
|
+
set gpl_padding [lindex [sc_cfg_tool_task_get var pad_global_place] 0]
|
|
18
|
+
|
|
19
|
+
lappend density_args -pad_left $gpl_padding
|
|
20
|
+
lappend density_args -pad_right $gpl_padding
|
|
21
|
+
}
|
|
22
|
+
set or_uniform_density [gpl::get_global_placement_uniform_density {*}$density_args]
|
|
14
23
|
|
|
15
24
|
# Small adder to ensure requested density is slightly over the uniform density
|
|
16
25
|
set or_adjust_density_adder 0.001
|
|
@@ -77,6 +86,7 @@ proc sc_global_placement { args } {
|
|
|
77
86
|
|
|
78
87
|
set density [sc_global_placement_density]
|
|
79
88
|
|
|
89
|
+
sc_report_args -command global_placement -args $gpl_args
|
|
80
90
|
global_placement {*}$gpl_args \
|
|
81
91
|
-density $density \
|
|
82
92
|
-pad_left $gpl_padding \
|
|
@@ -101,6 +111,7 @@ proc sc_detailed_placement { } {
|
|
|
101
111
|
lappend dpl_args "-disallow_one_site_gaps"
|
|
102
112
|
}
|
|
103
113
|
|
|
114
|
+
sc_report_args -command detailed_placement -args $dpl_args
|
|
104
115
|
detailed_placement \
|
|
105
116
|
-max_displacement $dpl_max_displacement \
|
|
106
117
|
{*}$dpl_args
|
|
@@ -117,15 +128,6 @@ proc sc_pin_placement { args } {
|
|
|
117
128
|
flags {-random}
|
|
118
129
|
sta::check_argc_eq0 "sc_pin_placement" $args
|
|
119
130
|
|
|
120
|
-
global sc_pdk
|
|
121
|
-
global sc_stackup
|
|
122
|
-
global sc_tool
|
|
123
|
-
|
|
124
|
-
set sc_hpinmetal [sc_cfg_get pdk $sc_pdk {var} $sc_tool pin_layer_horizontal $sc_stackup]
|
|
125
|
-
set sc_hpinmetal [sc_get_layer_name $sc_hpinmetal]
|
|
126
|
-
set sc_vpinmetal [sc_cfg_get pdk $sc_pdk {var} $sc_tool pin_layer_vertical $sc_stackup]
|
|
127
|
-
set sc_vpinmetal [sc_get_layer_name $sc_vpinmetal]
|
|
128
|
-
|
|
129
131
|
if { [sc_cfg_tool_task_exists var pin_thickness_h] } {
|
|
130
132
|
set h_mult [lindex [sc_cfg_tool_task_get var pin_thickness_h] 0]
|
|
131
133
|
set_pin_thick_multiplier -hor_multiplier $h_mult
|
|
@@ -146,9 +148,19 @@ proc sc_pin_placement { args } {
|
|
|
146
148
|
lappend ppl_args "-random"
|
|
147
149
|
}
|
|
148
150
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
lappend ppl_args {*}[sc_cfg_tool_task_get {var} ppl_arguments]
|
|
152
|
+
|
|
153
|
+
global sc_pdk
|
|
154
|
+
global sc_stackup
|
|
155
|
+
global sc_tool
|
|
156
|
+
|
|
157
|
+
set sc_hpinmetal [sc_cfg_get pdk $sc_pdk {var} $sc_tool pin_layer_horizontal $sc_stackup]
|
|
158
|
+
set sc_vpinmetal [sc_cfg_get pdk $sc_pdk {var} $sc_tool pin_layer_vertical $sc_stackup]
|
|
159
|
+
|
|
160
|
+
sc_report_args -command place_pins -args $ppl_args
|
|
161
|
+
place_pins \
|
|
162
|
+
-hor_layers [sc_get_layer_name $sc_hpinmetal] \
|
|
163
|
+
-ver_layers [sc_get_layer_name $sc_vpinmetal] \
|
|
152
164
|
{*}$ppl_args
|
|
153
165
|
}
|
|
154
166
|
|
|
@@ -762,3 +774,29 @@ proc sc_set_dont_use { args } {
|
|
|
762
774
|
tee -quiet -file reports/$keys(-report).rpt {report_dont_use}
|
|
763
775
|
}
|
|
764
776
|
}
|
|
777
|
+
|
|
778
|
+
proc sc_setup_detailed_route { } {
|
|
779
|
+
foreach via [sc_cfg_tool_task_get var detailed_route_default_via] {
|
|
780
|
+
utl::info FLW 1 "Marking $via a default routing via"
|
|
781
|
+
detailed_route_set_default_via $via
|
|
782
|
+
}
|
|
783
|
+
foreach layer [sc_cfg_tool_task_get var detailed_route_unidirectional_layer] {
|
|
784
|
+
set layer [sc_get_layer_name $layer]
|
|
785
|
+
utl::info FLW 1 "Marking $layer as a unidirectional routing layer"
|
|
786
|
+
detailed_route_set_unidirectional_layer $layer
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
proc sc_report_args { args } {
|
|
791
|
+
sta::parse_key_args "sc_report_args" args \
|
|
792
|
+
keys {-command -args} \
|
|
793
|
+
flags {}
|
|
794
|
+
|
|
795
|
+
sta::check_argc_eq0 "sc_report_args" $args
|
|
796
|
+
|
|
797
|
+
if { [llength $keys(-args)] == 0 } {
|
|
798
|
+
return
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
puts "$keys(-command) siliconcompiler arguments: $keys(-args)"
|
|
802
|
+
}
|