siliconcompiler 0.28.9__py3-none-any.whl → 0.29.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_remote.py +15 -14
- siliconcompiler/apps/sc_show.py +5 -5
- siliconcompiler/apps/utils/replay.py +136 -0
- siliconcompiler/core.py +14 -12
- siliconcompiler/flows/_common.py +11 -13
- siliconcompiler/flows/asicflow.py +83 -42
- 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 +51 -9
- siliconcompiler/schema/schema_cfg.py +15 -3
- siliconcompiler/schema/schema_obj.py +16 -0
- siliconcompiler/sphinx_ext/dynamicgen.py +4 -3
- siliconcompiler/targets/gf180_demo.py +3 -3
- siliconcompiler/templates/replay/requirements.txt +6 -0
- siliconcompiler/templates/replay/run.py.j2 +22 -0
- siliconcompiler/templates/replay/setup.sh +17 -0
- siliconcompiler/tools/_common/__init__.py +15 -1
- siliconcompiler/tools/_common/asic.py +10 -3
- siliconcompiler/tools/builtin/concatenate.py +1 -1
- siliconcompiler/tools/openroad/__init__.py +103 -0
- siliconcompiler/tools/openroad/{openroad.py → _apr.py} +413 -422
- 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 +62 -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 +675 -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 +105 -0
- siliconcompiler/tools/openroad/show.py +28 -23
- siliconcompiler/tools/openroad/{export.py → write_data.py} +31 -26
- siliconcompiler/tools/opensta/__init__.py +1 -1
- siliconcompiler/tools/yosys/syn_asic.py +7 -0
- siliconcompiler/tools/yosys/syn_asic.tcl +27 -6
- siliconcompiler/tools/yosys/syn_fpga.tcl +26 -18
- siliconcompiler/toolscripts/_tools.json +4 -4
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.0.dist-info}/METADATA +14 -12
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.0.dist-info}/RECORD +90 -63
- 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/openroad/scripts/{sc_write.tcl → common/write_data.tcl} +0 -0
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.0.dist-info}/LICENSE +0 -0
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.0.dist-info}/WHEEL +0 -0
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.0.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.0.dist-info}/top_level.txt +0 -0
siliconcompiler/_metadata.py
CHANGED
|
@@ -5,9 +5,7 @@ import sys
|
|
|
5
5
|
|
|
6
6
|
from siliconcompiler import Chip
|
|
7
7
|
from siliconcompiler import SiliconCompilerError
|
|
8
|
-
from siliconcompiler.remote.client import
|
|
9
|
-
remote_ping, remote_run_loop, _remote_ping
|
|
10
|
-
from siliconcompiler.remote.client import configure_server, configure_whitelist, configure_print
|
|
8
|
+
from siliconcompiler.remote.client import Client, ConfigureClient
|
|
11
9
|
from siliconcompiler.scheduler import _finalize_run
|
|
12
10
|
from siliconcompiler.flowgraph import _get_flowgraph_entry_nodes, _get_flowgraph_node_outputs, \
|
|
13
11
|
nodes_to_execute
|
|
@@ -108,29 +106,33 @@ To delete a job, use:
|
|
|
108
106
|
|
|
109
107
|
if args['configure']:
|
|
110
108
|
if args['list']:
|
|
111
|
-
|
|
109
|
+
client = Client(chip)
|
|
110
|
+
client.print_configuration()
|
|
112
111
|
return 0
|
|
113
112
|
|
|
114
113
|
if not args['add'] and not args['remove']:
|
|
115
114
|
try:
|
|
116
|
-
|
|
115
|
+
client = ConfigureClient(chip)
|
|
116
|
+
client.configure_server(server=args['server'])
|
|
117
117
|
except ValueError as e:
|
|
118
118
|
chip.logger.error(e)
|
|
119
119
|
return 1
|
|
120
120
|
else:
|
|
121
121
|
try:
|
|
122
|
-
|
|
122
|
+
client = ConfigureClient(chip)
|
|
123
|
+
client.configure_whitelist(add=args['add'], remove=args['remove'])
|
|
123
124
|
except ValueError as e:
|
|
124
125
|
chip.logger.error(e)
|
|
125
126
|
return 1
|
|
126
127
|
|
|
127
128
|
return 0
|
|
128
129
|
|
|
130
|
+
client = Client(chip)
|
|
129
131
|
# Main logic.
|
|
130
132
|
# If no job-related options are specified, fetch and report basic info.
|
|
131
133
|
# Create temporary Chip object and check on the server.
|
|
132
134
|
try:
|
|
133
|
-
|
|
135
|
+
client.check()
|
|
134
136
|
except SiliconCompilerError as e:
|
|
135
137
|
chip.logger.error(f'{e}')
|
|
136
138
|
return 1
|
|
@@ -138,7 +140,7 @@ To delete a job, use:
|
|
|
138
140
|
# If the -cancel flag is specified, cancel the job.
|
|
139
141
|
if args['cancel']:
|
|
140
142
|
try:
|
|
141
|
-
cancel_job(
|
|
143
|
+
client.cancel_job()
|
|
142
144
|
except SiliconCompilerError as e:
|
|
143
145
|
chip.logger.error(f'{e}')
|
|
144
146
|
return 1
|
|
@@ -146,7 +148,7 @@ To delete a job, use:
|
|
|
146
148
|
# If the -delete flag is specified, delete the job.
|
|
147
149
|
elif args['delete']:
|
|
148
150
|
try:
|
|
149
|
-
delete_job(
|
|
151
|
+
client.delete_job()
|
|
150
152
|
except SiliconCompilerError as e:
|
|
151
153
|
chip.logger.error(f'{e}')
|
|
152
154
|
return 1
|
|
@@ -162,10 +164,8 @@ To delete a job, use:
|
|
|
162
164
|
outputs = _get_flowgraph_node_outputs(chip, flow, entry_node)
|
|
163
165
|
chip.set('option', 'from', list(map(lambda node: node[0], outputs)))
|
|
164
166
|
# Enter the remote run loop.
|
|
165
|
-
chip._init_logger(step='remote', index='0', in_run=True)
|
|
166
167
|
try:
|
|
167
|
-
|
|
168
|
-
remote_run_loop(chip, rsp['progress_interval'])
|
|
168
|
+
client._run_loop()
|
|
169
169
|
except SiliconCompilerError as e:
|
|
170
170
|
chip.logger.error(f'{e}')
|
|
171
171
|
return 1
|
|
@@ -185,8 +185,9 @@ To delete a job, use:
|
|
|
185
185
|
# If only a manifest is specified, make a 'check_progress/' request and report results:
|
|
186
186
|
elif chip_cfg:
|
|
187
187
|
try:
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
info = client.check_job_status()
|
|
189
|
+
client._report_job_status(info)
|
|
190
|
+
except Exception as e:
|
|
190
191
|
chip.logger.error(f'{e}')
|
|
191
192
|
return 1
|
|
192
193
|
|
siliconcompiler/apps/sc_show.py
CHANGED
|
@@ -19,10 +19,10 @@ def main():
|
|
|
19
19
|
Examples:
|
|
20
20
|
|
|
21
21
|
sc-show
|
|
22
|
-
(displays build/adder/job0/
|
|
22
|
+
(displays build/adder/job0/write.gds/0/outputs/adder.gds)
|
|
23
23
|
|
|
24
24
|
sc-show -design adder
|
|
25
|
-
(displays build/adder/job0/
|
|
25
|
+
(displays build/adder/job0/write.gds/0/outputs/adder.gds)
|
|
26
26
|
|
|
27
27
|
sc-show -design adder -arg_step floorplan
|
|
28
28
|
(displays build/adder/job0/floorplan/0/outputs/adder.def)
|
|
@@ -31,13 +31,13 @@ def main():
|
|
|
31
31
|
(displays build/adder/job0/place/1/outputs/adder.def)
|
|
32
32
|
|
|
33
33
|
sc-show -design adder -jobname rtl2gds
|
|
34
|
-
(displays build/adder/rtl2gds/
|
|
34
|
+
(displays build/adder/rtl2gds/write.gds/0/outputs/adder.gds)
|
|
35
35
|
|
|
36
36
|
sc-show -cfg build/adder/rtl2gds/adder.pkg.json
|
|
37
|
-
(displays build/adder/rtl2gds/
|
|
37
|
+
(displays build/adder/rtl2gds/write.gds/0/outputs/adder.gds)
|
|
38
38
|
|
|
39
39
|
sc-show -design adder -ext odb
|
|
40
|
-
(displays build/adder/job0/
|
|
40
|
+
(displays build/adder/job0/write.views/0/outputs/adder.odb)
|
|
41
41
|
|
|
42
42
|
sc-show build/adder/job0/route/1/outputs/adder.def
|
|
43
43
|
(displays build/adder/job0/route/1/outputs/adder.def)
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Copyright 2024 Silicon Compiler Authors. All Rights Reserved.
|
|
2
|
+
|
|
3
|
+
# Standard Modules
|
|
4
|
+
import os
|
|
5
|
+
import stat
|
|
6
|
+
import sys
|
|
7
|
+
|
|
8
|
+
import siliconcompiler
|
|
9
|
+
from siliconcompiler.apps._common import UNSET_DESIGN
|
|
10
|
+
from siliconcompiler import SiliconCompilerError
|
|
11
|
+
from siliconcompiler import utils
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
###########################
|
|
15
|
+
def main():
|
|
16
|
+
progname = "summarize"
|
|
17
|
+
description = """
|
|
18
|
+
------------------------------------------------------------
|
|
19
|
+
Utility script to print job record information from a manifest
|
|
20
|
+
needed to replay that manifest.
|
|
21
|
+
------------------------------------------------------------
|
|
22
|
+
"""
|
|
23
|
+
# Create a base chip class.
|
|
24
|
+
chip = siliconcompiler.Chip(UNSET_DESIGN)
|
|
25
|
+
|
|
26
|
+
# Read command-line inputs and generate Chip objects to run the flow on.
|
|
27
|
+
try:
|
|
28
|
+
generation_arg = {
|
|
29
|
+
'metavar': '<path>',
|
|
30
|
+
'help': '(optional) Path to generate replay files to, if specified.',
|
|
31
|
+
'sc_print': True
|
|
32
|
+
}
|
|
33
|
+
args = chip.create_cmdline(
|
|
34
|
+
progname,
|
|
35
|
+
description=description,
|
|
36
|
+
switchlist=['-cfg',
|
|
37
|
+
'-jobname',
|
|
38
|
+
'-loglevel'],
|
|
39
|
+
additional_args={
|
|
40
|
+
'-path': generation_arg
|
|
41
|
+
})
|
|
42
|
+
except SiliconCompilerError:
|
|
43
|
+
return 1
|
|
44
|
+
except Exception as e:
|
|
45
|
+
chip.logger.error(e)
|
|
46
|
+
return 1
|
|
47
|
+
|
|
48
|
+
design = chip.get('design')
|
|
49
|
+
if design == UNSET_DESIGN:
|
|
50
|
+
chip.logger.error('Design not loaded')
|
|
51
|
+
return 1
|
|
52
|
+
|
|
53
|
+
# Print Job Summary
|
|
54
|
+
jobname = chip.get('option', 'jobname')
|
|
55
|
+
pythonpackages = chip.get('record', 'pythonpackage', job=jobname)
|
|
56
|
+
|
|
57
|
+
pythonversion = set()
|
|
58
|
+
nodes = set()
|
|
59
|
+
for version, step, index in chip.schema._getvals('history', jobname, 'record', 'pythonversion'):
|
|
60
|
+
pythonversion.add(version)
|
|
61
|
+
nodes.add((step, index))
|
|
62
|
+
|
|
63
|
+
if len(pythonversion) > 1:
|
|
64
|
+
chip.logger.warning(f"More than one python version detected: {', '.join(pythonversion)}")
|
|
65
|
+
pythonversion = list(pythonversion)[0]
|
|
66
|
+
|
|
67
|
+
tools = {}
|
|
68
|
+
tool_versions = []
|
|
69
|
+
for step, index in nodes:
|
|
70
|
+
toolpath = chip.get('record', 'toolpath', job=jobname, step=step, index=index)
|
|
71
|
+
toolversion = chip.get('record', 'toolversion', job=jobname, step=step, index=index)
|
|
72
|
+
|
|
73
|
+
if toolpath is None:
|
|
74
|
+
continue
|
|
75
|
+
|
|
76
|
+
tools.setdefault(toolpath, set()).add(toolversion)
|
|
77
|
+
if toolversion:
|
|
78
|
+
tool = chip.get('flowgraph', chip.get('option', 'flow'), step, index, 'tool')
|
|
79
|
+
tool_versions.append(
|
|
80
|
+
((step, index), tool, toolversion)
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
print("SUMMARY :")
|
|
84
|
+
print(f"design : {chip.design}")
|
|
85
|
+
print(f"pythonversion : {pythonversion}")
|
|
86
|
+
|
|
87
|
+
print("Python packages requires:")
|
|
88
|
+
for pkg in sorted(pythonpackages):
|
|
89
|
+
print(f" {pkg}")
|
|
90
|
+
|
|
91
|
+
print("Tool requirements:")
|
|
92
|
+
tool_len = max([len(os.path.basename(tool)) for tool, _ in tools.items()])
|
|
93
|
+
for tool, version in tools.items():
|
|
94
|
+
print(f" {os.path.basename(tool):<{tool_len}}: {', '.join(version)}")
|
|
95
|
+
|
|
96
|
+
if 'path' in args and args['path']:
|
|
97
|
+
path = args['path']
|
|
98
|
+
os.makedirs(path, exist_ok=True)
|
|
99
|
+
with open(os.path.join(path, 'requirements.txt'), 'w', encoding='utf-8') as wf:
|
|
100
|
+
wf.write(utils.get_file_template('replay/requirements.txt').render(
|
|
101
|
+
design=chip.design,
|
|
102
|
+
source=', '.join(chip.find_files('option', 'cfg')),
|
|
103
|
+
jobname=jobname,
|
|
104
|
+
pkgs=pythonpackages
|
|
105
|
+
))
|
|
106
|
+
|
|
107
|
+
scripts = []
|
|
108
|
+
scripts.append(os.path.join(path, 'setup.sh'))
|
|
109
|
+
with open(scripts[-1], 'w', encoding='utf-8') as wf:
|
|
110
|
+
wf.write(utils.get_file_template('replay/setup.sh').render(
|
|
111
|
+
design=chip.design,
|
|
112
|
+
source=', '.join(chip.find_files('option', 'cfg')),
|
|
113
|
+
jobname=jobname,
|
|
114
|
+
pythonversion=pythonversion
|
|
115
|
+
))
|
|
116
|
+
|
|
117
|
+
scripts.append(os.path.join(path, 'run.py'))
|
|
118
|
+
with open(scripts[-1], 'w', encoding='utf-8') as wf:
|
|
119
|
+
wf.write(utils.get_file_template('replay/run.py.j2').render(
|
|
120
|
+
design=chip.design,
|
|
121
|
+
source=', '.join(chip.find_files('option', 'cfg')),
|
|
122
|
+
cfgs=chip.find_files('option', 'cfg'),
|
|
123
|
+
jobname=jobname,
|
|
124
|
+
tool_versions=sorted(tool_versions)
|
|
125
|
+
))
|
|
126
|
+
|
|
127
|
+
for script in scripts:
|
|
128
|
+
permissions = stat.S_IMODE(os.lstat(script).st_mode)
|
|
129
|
+
os.chmod(script, permissions | stat.S_IXUSR)
|
|
130
|
+
|
|
131
|
+
return 0
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
#########################
|
|
135
|
+
if __name__ == "__main__":
|
|
136
|
+
sys.exit(main())
|
siliconcompiler/core.py
CHANGED
|
@@ -2058,19 +2058,11 @@ class Chip:
|
|
|
2058
2058
|
dot.attr(bgcolor=background)
|
|
2059
2059
|
|
|
2060
2060
|
subgraphs = {
|
|
2061
|
-
"graphs": {
|
|
2062
|
-
"sc-inputs": {
|
|
2063
|
-
"graphs": {},
|
|
2064
|
-
"nodes": []
|
|
2065
|
-
}
|
|
2066
|
-
},
|
|
2061
|
+
"graphs": {},
|
|
2067
2062
|
"nodes": []
|
|
2068
2063
|
}
|
|
2069
2064
|
for node, info in nodes.items():
|
|
2070
|
-
|
|
2071
|
-
subgraph_temp = subgraphs["graphs"]["sc-inputs"]
|
|
2072
|
-
else:
|
|
2073
|
-
subgraph_temp = subgraphs
|
|
2065
|
+
subgraph_temp = subgraphs
|
|
2074
2066
|
|
|
2075
2067
|
for key in node.split(".")[0:-1]:
|
|
2076
2068
|
if key not in subgraph_temp["graphs"]:
|
|
@@ -2079,6 +2071,15 @@ class Chip:
|
|
|
2079
2071
|
"nodes": []
|
|
2080
2072
|
}
|
|
2081
2073
|
subgraph_temp = subgraph_temp["graphs"][key]
|
|
2074
|
+
|
|
2075
|
+
if info['is_input']:
|
|
2076
|
+
if "sc-inputs" not in subgraph_temp["graphs"]:
|
|
2077
|
+
subgraph_temp["graphs"]["sc-inputs"] = {
|
|
2078
|
+
"graphs": {},
|
|
2079
|
+
"nodes": []
|
|
2080
|
+
}
|
|
2081
|
+
subgraph_temp = subgraph_temp["graphs"]["sc-inputs"]
|
|
2082
|
+
|
|
2082
2083
|
subgraph_temp["nodes"].append(node)
|
|
2083
2084
|
|
|
2084
2085
|
with dot.subgraph(name='inputs') as input_graph:
|
|
@@ -2131,7 +2132,8 @@ class Chip:
|
|
|
2131
2132
|
for subgraph in graph_info["graphs"]:
|
|
2132
2133
|
child_prefix = prefix
|
|
2133
2134
|
if get_node_count(graph_info["graphs"][subgraph]) > 1:
|
|
2134
|
-
|
|
2135
|
+
if subgraph != "sc-inputs":
|
|
2136
|
+
child_prefix = f"{child_prefix}{subgraph}."
|
|
2135
2137
|
graph = graphviz.Digraph(name=f"cluster_{graph_idx}")
|
|
2136
2138
|
graph_idx += 1
|
|
2137
2139
|
|
|
@@ -3126,7 +3128,7 @@ class Chip:
|
|
|
3126
3128
|
extension (str): extension of file to show
|
|
3127
3129
|
|
|
3128
3130
|
Examples:
|
|
3129
|
-
>>> show('build/oh_add/job0/
|
|
3131
|
+
>>> show('build/oh_add/job0/write.gds/0/outputs/oh_add.gds')
|
|
3130
3132
|
Displays gds file with a viewer assigned by showtool
|
|
3131
3133
|
'''
|
|
3132
3134
|
|
siliconcompiler/flows/_common.py
CHANGED
|
@@ -22,17 +22,17 @@ def _make_docs(chip):
|
|
|
22
22
|
|
|
23
23
|
def __get_frontends(allow_system_verilog):
|
|
24
24
|
systemverilog_frontend = [
|
|
25
|
-
('import', surelog_parse)
|
|
25
|
+
('import.verilog', surelog_parse)
|
|
26
26
|
]
|
|
27
27
|
if not allow_system_verilog:
|
|
28
|
-
systemverilog_frontend.append(('convert', sv2v_convert))
|
|
28
|
+
systemverilog_frontend.append(('import.convert', sv2v_convert))
|
|
29
29
|
|
|
30
30
|
return {
|
|
31
31
|
"verilog": systemverilog_frontend,
|
|
32
|
-
"chisel": [('import', chisel_convert)],
|
|
33
|
-
"c": [('import', bambu_convert)],
|
|
34
|
-
"bluespec": [('import', bluespec_convert)],
|
|
35
|
-
"vhdl": [('import', ghdl_convert)]
|
|
32
|
+
"chisel": [('import.chisel', chisel_convert)],
|
|
33
|
+
"c": [('import.c', bambu_convert)],
|
|
34
|
+
"bluespec": [('import.bluespec', bluespec_convert)],
|
|
35
|
+
"vhdl": [('import.vhdl', ghdl_convert)]
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
|
|
@@ -45,21 +45,19 @@ def setup_multiple_frontends(flow, allow_system_verilog=False):
|
|
|
45
45
|
|
|
46
46
|
concat_nodes = []
|
|
47
47
|
flowname = flow.design
|
|
48
|
-
for
|
|
48
|
+
for _, pipe in __get_frontends(allow_system_verilog).items():
|
|
49
49
|
prev_step = None
|
|
50
50
|
for step, task in pipe:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
flow.node(flowname, step_name, task)
|
|
51
|
+
flow.node(flowname, step, task)
|
|
54
52
|
if prev_step:
|
|
55
|
-
flow.edge(flowname, prev_step,
|
|
53
|
+
flow.edge(flowname, prev_step, step)
|
|
56
54
|
|
|
57
|
-
prev_step =
|
|
55
|
+
prev_step = step
|
|
58
56
|
|
|
59
57
|
if prev_step:
|
|
60
58
|
concat_nodes.append(prev_step)
|
|
61
59
|
|
|
62
|
-
final_node = 'combine'
|
|
60
|
+
final_node = 'import.combine'
|
|
63
61
|
flow.node(flowname, final_node, concatenate)
|
|
64
62
|
for node in concat_nodes:
|
|
65
63
|
flow.edge(flowname, node, final_node)
|
|
@@ -4,13 +4,22 @@ from siliconcompiler.flows._common import setup_multiple_frontends
|
|
|
4
4
|
from siliconcompiler.flows._common import _make_docs
|
|
5
5
|
|
|
6
6
|
from siliconcompiler.tools.yosys import syn_asic
|
|
7
|
-
from siliconcompiler.tools.openroad import
|
|
8
|
-
from siliconcompiler.tools.openroad import
|
|
9
|
-
from siliconcompiler.tools.openroad import
|
|
10
|
-
from siliconcompiler.tools.openroad import
|
|
11
|
-
from siliconcompiler.tools.openroad import
|
|
12
|
-
from siliconcompiler.tools.openroad import
|
|
13
|
-
from siliconcompiler.tools.openroad import
|
|
7
|
+
from siliconcompiler.tools.openroad import init_floorplan
|
|
8
|
+
from siliconcompiler.tools.openroad import macro_placement
|
|
9
|
+
from siliconcompiler.tools.openroad import endcap_tapcell_insertion
|
|
10
|
+
from siliconcompiler.tools.openroad import power_grid
|
|
11
|
+
from siliconcompiler.tools.openroad import pin_placement
|
|
12
|
+
from siliconcompiler.tools.openroad import global_placement
|
|
13
|
+
from siliconcompiler.tools.openroad import repair_design
|
|
14
|
+
from siliconcompiler.tools.openroad import detailed_placement
|
|
15
|
+
from siliconcompiler.tools.openroad import clock_tree_synthesis
|
|
16
|
+
from siliconcompiler.tools.openroad import repair_timing
|
|
17
|
+
from siliconcompiler.tools.openroad import fillercell_insertion
|
|
18
|
+
from siliconcompiler.tools.openroad import global_route
|
|
19
|
+
from siliconcompiler.tools.openroad import antenna_repair
|
|
20
|
+
from siliconcompiler.tools.openroad import detailed_route
|
|
21
|
+
from siliconcompiler.tools.openroad import fillmetal_insertion
|
|
22
|
+
from siliconcompiler.tools.openroad import write_data
|
|
14
23
|
from siliconcompiler.tools.klayout import export as klayout_export
|
|
15
24
|
|
|
16
25
|
from siliconcompiler.tools.builtin import minimum
|
|
@@ -70,33 +79,53 @@ def setup(flowname='asicflow',
|
|
|
70
79
|
flow = siliconcompiler.Flow(flowname)
|
|
71
80
|
|
|
72
81
|
# Linear flow, up until branch to run parallel verification steps.
|
|
73
|
-
longpipe = [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
longpipe = [
|
|
83
|
+
'syn',
|
|
84
|
+
'syn.min',
|
|
85
|
+
'floorplan.init',
|
|
86
|
+
'floorplan.macro_placement',
|
|
87
|
+
'floorplan.tapcell',
|
|
88
|
+
'floorplan.power_grid',
|
|
89
|
+
'floorplan.pin_placement',
|
|
90
|
+
'floorplan.min',
|
|
91
|
+
'place.global',
|
|
92
|
+
'place.repair_design',
|
|
93
|
+
'place.detailed',
|
|
94
|
+
'place.min',
|
|
95
|
+
'cts.clock_tree_synthesis',
|
|
96
|
+
'cts.repair_timing',
|
|
97
|
+
'cts.fillcell',
|
|
98
|
+
'cts.min',
|
|
99
|
+
'route.global',
|
|
100
|
+
'route.antenna_repair',
|
|
101
|
+
'route.detailed',
|
|
102
|
+
'route.min',
|
|
103
|
+
'dfm.metal_fill'
|
|
104
|
+
]
|
|
84
105
|
|
|
85
106
|
# step --> task
|
|
86
107
|
tasks = {
|
|
87
108
|
'syn': syn_asic,
|
|
88
|
-
'
|
|
89
|
-
'floorplan':
|
|
90
|
-
'
|
|
91
|
-
'
|
|
92
|
-
'
|
|
93
|
-
'
|
|
94
|
-
'
|
|
95
|
-
'
|
|
96
|
-
'
|
|
97
|
-
'
|
|
98
|
-
'
|
|
99
|
-
'
|
|
109
|
+
'syn.min': minimum,
|
|
110
|
+
'floorplan.init': init_floorplan,
|
|
111
|
+
'floorplan.macro_placement': macro_placement,
|
|
112
|
+
'floorplan.tapcell': endcap_tapcell_insertion,
|
|
113
|
+
'floorplan.power_grid': power_grid,
|
|
114
|
+
'floorplan.pin_placement': pin_placement,
|
|
115
|
+
'floorplan.min': minimum,
|
|
116
|
+
'place.global': global_placement,
|
|
117
|
+
'place.repair_design': repair_design,
|
|
118
|
+
'place.detailed': detailed_placement,
|
|
119
|
+
'place.min': minimum,
|
|
120
|
+
'cts.clock_tree_synthesis': clock_tree_synthesis,
|
|
121
|
+
'cts.repair_timing': repair_timing,
|
|
122
|
+
'cts.fillcell': fillercell_insertion,
|
|
123
|
+
'cts.min': minimum,
|
|
124
|
+
'route.global': global_route,
|
|
125
|
+
'route.antenna_repair': antenna_repair,
|
|
126
|
+
'route.detailed': detailed_route,
|
|
127
|
+
'route.min': minimum,
|
|
128
|
+
'dfm.metal_fill': fillmetal_insertion
|
|
100
129
|
}
|
|
101
130
|
|
|
102
131
|
np = {
|
|
@@ -114,7 +143,8 @@ def setup(flowname='asicflow',
|
|
|
114
143
|
for step in longpipe:
|
|
115
144
|
task = tasks[step]
|
|
116
145
|
if task == minimum:
|
|
117
|
-
|
|
146
|
+
np_step = prevstep.split('.')[0]
|
|
147
|
+
if np_step in np and np[np_step] > 1:
|
|
118
148
|
flowpipe.append(step)
|
|
119
149
|
else:
|
|
120
150
|
flowpipe.append(step)
|
|
@@ -126,24 +156,30 @@ def setup(flowname='asicflow',
|
|
|
126
156
|
|
|
127
157
|
# Programmatically build linear portion of flowgraph and fanin/fanout args
|
|
128
158
|
prevstep = setup_multiple_frontends(flow)
|
|
159
|
+
prev_fanout = 1
|
|
129
160
|
for step, task in flowtasks:
|
|
130
161
|
fanout = 1
|
|
131
|
-
|
|
132
|
-
|
|
162
|
+
np_step = step.split('.')[0]
|
|
163
|
+
if np_step in np and task != minimum:
|
|
164
|
+
fanout = np[np_step]
|
|
165
|
+
|
|
133
166
|
# create nodes
|
|
134
167
|
for index in range(fanout):
|
|
135
168
|
# nodes
|
|
136
169
|
flow.node(flowname, step, task, index=index)
|
|
137
170
|
|
|
171
|
+
# create edges
|
|
172
|
+
for index in range(fanout):
|
|
138
173
|
# edges
|
|
174
|
+
fanin = prev_fanout
|
|
139
175
|
if task == minimum:
|
|
140
|
-
fanin = 1
|
|
141
|
-
if prevstep in np:
|
|
142
|
-
fanin = np[prevstep]
|
|
143
176
|
for i in range(fanin):
|
|
144
177
|
flow.edge(flowname, prevstep, step, tail_index=i)
|
|
145
178
|
elif prevstep:
|
|
146
|
-
|
|
179
|
+
if fanin == fanout:
|
|
180
|
+
flow.edge(flowname, prevstep, step, tail_index=index, head_index=index)
|
|
181
|
+
else:
|
|
182
|
+
flow.edge(flowname, prevstep, step, head_index=index)
|
|
147
183
|
|
|
148
184
|
# metrics
|
|
149
185
|
goal_metrics = ()
|
|
@@ -151,7 +187,11 @@ def setup(flowname='asicflow',
|
|
|
151
187
|
if task in (syn_asic, ):
|
|
152
188
|
goal_metrics = ('errors',)
|
|
153
189
|
weight_metrics = ()
|
|
154
|
-
elif task in (
|
|
190
|
+
elif task in (init_floorplan, macro_placement, endcap_tapcell_insertion,
|
|
191
|
+
power_grid, pin_placement, global_placement, repair_design,
|
|
192
|
+
detailed_placement, clock_tree_synthesis, repair_timing,
|
|
193
|
+
fillercell_insertion, global_route, antenna_repair, detailed_route,
|
|
194
|
+
fillmetal_insertion):
|
|
155
195
|
goal_metrics = ('errors', 'setupwns', 'setuptns')
|
|
156
196
|
weight_metrics = ('cellarea', 'peakpower', 'leakagepower')
|
|
157
197
|
|
|
@@ -160,12 +200,13 @@ def setup(flowname='asicflow',
|
|
|
160
200
|
for metric in weight_metrics:
|
|
161
201
|
flow.set('flowgraph', flowname, step, str(index), 'weight', metric, 1.0)
|
|
162
202
|
prevstep = step
|
|
203
|
+
prev_fanout = fanout
|
|
163
204
|
|
|
164
205
|
# add write information steps
|
|
165
|
-
flow.node(flowname, '
|
|
166
|
-
flow.edge(flowname, prevstep, '
|
|
167
|
-
flow.node(flowname, '
|
|
168
|
-
flow.edge(flowname, prevstep, '
|
|
206
|
+
flow.node(flowname, 'write.gds', klayout_export)
|
|
207
|
+
flow.edge(flowname, prevstep, 'write.gds')
|
|
208
|
+
flow.node(flowname, 'write.views', write_data)
|
|
209
|
+
flow.edge(flowname, prevstep, 'write.views')
|
|
169
210
|
|
|
170
211
|
return flow
|
|
171
212
|
|