siliconcompiler 0.29.2__py3-none-any.whl → 0.29.3__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_install.py +1 -1
- siliconcompiler/core.py +8 -3
- siliconcompiler/flowgraph.py +23 -5
- siliconcompiler/scheduler/__init__.py +21 -9
- siliconcompiler/tools/bambu/convert.py +2 -1
- siliconcompiler/tools/bluespec/convert.py +2 -1
- siliconcompiler/tools/chisel/convert.py +2 -1
- siliconcompiler/tools/genfasm/bitstream.py +2 -2
- siliconcompiler/tools/ghdl/convert.py +2 -2
- siliconcompiler/tools/gtkwave/show.py +2 -1
- siliconcompiler/tools/icarus/compile.py +2 -2
- siliconcompiler/tools/klayout/drc.py +2 -1
- siliconcompiler/tools/magic/magic.py +1 -1
- siliconcompiler/tools/netgen/lvs.py +2 -1
- siliconcompiler/tools/openroad/_apr.py +5 -4
- siliconcompiler/tools/openroad/rdlroute.py +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +78 -94
- siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +11 -1
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/common/reports.tcl +4 -0
- siliconcompiler/tools/openroad/scripts/common/write_data.tcl +2 -5
- siliconcompiler/tools/openroad/scripts/common/write_data_physical.tcl +3 -0
- siliconcompiler/tools/openroad/scripts/common/write_data_timing.tcl +1 -0
- siliconcompiler/tools/openroad/scripts/sc_rdlroute.tcl +1 -1
- siliconcompiler/tools/opensta/__init__.py +2 -2
- siliconcompiler/tools/opensta/report_libraries.py +2 -2
- siliconcompiler/tools/opensta/timing.py +2 -1
- siliconcompiler/tools/slang/__init__.py +78 -2
- siliconcompiler/tools/slang/elaborate.py +46 -0
- siliconcompiler/tools/slang/lint.py +10 -76
- siliconcompiler/tools/surelog/parse.py +1 -1
- siliconcompiler/tools/sv2v/convert.py +2 -2
- siliconcompiler/tools/template/template.py +2 -2
- siliconcompiler/tools/verilator/verilator.py +2 -1
- siliconcompiler/tools/vivado/vivado.py +2 -1
- siliconcompiler/tools/vpr/place.py +2 -2
- siliconcompiler/tools/vpr/route.py +2 -2
- siliconcompiler/tools/vpr/show.py +2 -1
- siliconcompiler/tools/yosys/syn_asic.py +8 -0
- siliconcompiler/tools/yosys/syn_asic.tcl +4 -0
- siliconcompiler/toolscripts/_tools.json +3 -3
- siliconcompiler/toolscripts/rhel8/install-slang.sh +0 -0
- siliconcompiler/toolscripts/rhel8/install-sv2v.sh +7 -1
- siliconcompiler/toolscripts/rhel9/install-slang.sh +0 -0
- siliconcompiler/toolscripts/rhel9/install-sv2v.sh +7 -1
- siliconcompiler/toolscripts/ubuntu20/install-slang.sh +0 -0
- siliconcompiler/toolscripts/ubuntu20/install-surelog.sh +1 -0
- siliconcompiler/toolscripts/ubuntu20/install-sv2v.sh +7 -1
- siliconcompiler/toolscripts/ubuntu22/install-surelog.sh +7 -1
- siliconcompiler/toolscripts/ubuntu22/install-sv2v.sh +7 -1
- siliconcompiler/toolscripts/ubuntu24/install-bambu.sh +3 -4
- siliconcompiler/toolscripts/ubuntu24/install-slang.sh +0 -0
- siliconcompiler/toolscripts/ubuntu24/install-surelog.sh +7 -1
- siliconcompiler/toolscripts/ubuntu24/install-sv2v.sh +7 -1
- siliconcompiler/utils/__init__.py +22 -0
- siliconcompiler/utils/logging.py +67 -0
- {siliconcompiler-0.29.2.dist-info → siliconcompiler-0.29.3.dist-info}/METADATA +6 -6
- {siliconcompiler-0.29.2.dist-info → siliconcompiler-0.29.3.dist-info}/RECORD +59 -55
- {siliconcompiler-0.29.2.dist-info → siliconcompiler-0.29.3.dist-info}/LICENSE +0 -0
- {siliconcompiler-0.29.2.dist-info → siliconcompiler-0.29.3.dist-info}/WHEEL +0 -0
- {siliconcompiler-0.29.2.dist-info → siliconcompiler-0.29.3.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.29.2.dist-info → siliconcompiler-0.29.3.dist-info}/top_level.txt +0 -0
siliconcompiler/_metadata.py
CHANGED
|
@@ -168,7 +168,7 @@ To system debugging information (this should only be used to debug):
|
|
|
168
168
|
parser = argparse.ArgumentParser(
|
|
169
169
|
prog=progname,
|
|
170
170
|
description=description,
|
|
171
|
-
formatter_class=argparse.
|
|
171
|
+
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
|
172
172
|
|
|
173
173
|
tools = _get_tools_list()
|
|
174
174
|
|
siliconcompiler/core.py
CHANGED
|
@@ -21,6 +21,7 @@ from siliconcompiler.remote import client
|
|
|
21
21
|
from siliconcompiler.schema import Schema, SCHEMA_VERSION
|
|
22
22
|
from siliconcompiler.schema import utils as schema_utils
|
|
23
23
|
from siliconcompiler import utils
|
|
24
|
+
from siliconcompiler.utils.logging import LoggerFormatter, ColorStreamFormatter
|
|
24
25
|
from siliconcompiler import _metadata
|
|
25
26
|
from siliconcompiler import NodeStatus, SiliconCompilerError
|
|
26
27
|
from siliconcompiler.report import _show_summary_table
|
|
@@ -225,7 +226,8 @@ class Chip:
|
|
|
225
226
|
else:
|
|
226
227
|
in_run = False
|
|
227
228
|
|
|
228
|
-
|
|
229
|
+
level_format = '%(levelname)-7s'
|
|
230
|
+
log_format = [level_format]
|
|
229
231
|
if loglevel == 'debug':
|
|
230
232
|
log_format.append('%(funcName)-10s')
|
|
231
233
|
log_format.append('%(lineno)-4s')
|
|
@@ -261,14 +263,17 @@ class Chip:
|
|
|
261
263
|
log_formatprefix = ""
|
|
262
264
|
|
|
263
265
|
log_format.append('%(message)s')
|
|
264
|
-
|
|
266
|
+
stream_logformat = log_formatprefix + ' | '.join(log_format[1:])
|
|
265
267
|
|
|
266
268
|
if not self.logger.hasHandlers():
|
|
267
269
|
stream_handler = logging.StreamHandler(stream=sys.stdout)
|
|
268
270
|
self.logger.addHandler(stream_handler)
|
|
269
271
|
|
|
270
272
|
for handler in self.logger.handlers:
|
|
271
|
-
|
|
273
|
+
if ColorStreamFormatter.supports_color(handler):
|
|
274
|
+
formatter = ColorStreamFormatter(log_formatprefix, level_format, stream_logformat)
|
|
275
|
+
else:
|
|
276
|
+
formatter = LoggerFormatter(log_formatprefix, level_format, stream_logformat)
|
|
272
277
|
handler.setFormatter(formatter)
|
|
273
278
|
|
|
274
279
|
self.logger.setLevel(schema_utils.translate_loglevel(loglevel))
|
siliconcompiler/flowgraph.py
CHANGED
|
@@ -205,18 +205,36 @@ def _get_flowgraph_execution_order(chip, flow, reverse=False):
|
|
|
205
205
|
else:
|
|
206
206
|
ex_map.setdefault((istep, iindex), set()).add((step, index))
|
|
207
207
|
|
|
208
|
+
rev_ex_map = {}
|
|
209
|
+
for node, edges in ex_map.items():
|
|
210
|
+
for step, index in edges:
|
|
211
|
+
rev_ex_map.setdefault((step, index), set()).add(node)
|
|
212
|
+
|
|
208
213
|
# Collect execution order of nodes
|
|
209
214
|
if reverse:
|
|
210
215
|
order = [set(_get_flowgraph_exit_nodes(chip, flow))]
|
|
211
216
|
else:
|
|
212
217
|
order = [set(_get_flowgraph_entry_nodes(chip, flow))]
|
|
213
218
|
|
|
219
|
+
visited = set()
|
|
214
220
|
while True:
|
|
215
221
|
next_level = set()
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
222
|
+
next_visited = set()
|
|
223
|
+
for step, index in sorted(order[-1]):
|
|
224
|
+
if (step, index) not in rev_ex_map:
|
|
225
|
+
# No edges so assume inputs are okay
|
|
226
|
+
inputs_valid = True
|
|
227
|
+
else:
|
|
228
|
+
inputs_valid = all([node in visited for node in rev_ex_map[(step, index)]])
|
|
229
|
+
|
|
230
|
+
if inputs_valid:
|
|
231
|
+
next_visited.add((step, index))
|
|
232
|
+
if (step, index) in ex_map:
|
|
233
|
+
next_level.update(ex_map.pop((step, index)))
|
|
234
|
+
else:
|
|
235
|
+
next_level.add((step, index))
|
|
236
|
+
|
|
237
|
+
visited.update(next_visited)
|
|
220
238
|
|
|
221
239
|
if not next_level:
|
|
222
240
|
break
|
|
@@ -233,7 +251,7 @@ def _get_flowgraph_execution_order(chip, flow, reverse=False):
|
|
|
233
251
|
|
|
234
252
|
exec_order.reverse()
|
|
235
253
|
|
|
236
|
-
return exec_order
|
|
254
|
+
return [sorted(level) for level in exec_order]
|
|
237
255
|
|
|
238
256
|
|
|
239
257
|
def get_executed_nodes(chip, flow):
|
|
@@ -55,6 +55,10 @@ def _get_callback(hook):
|
|
|
55
55
|
return None
|
|
56
56
|
|
|
57
57
|
|
|
58
|
+
# Max lines to print from failed node log
|
|
59
|
+
_failed_log_lines = 20
|
|
60
|
+
|
|
61
|
+
|
|
58
62
|
###############################################################################
|
|
59
63
|
class SiliconCompilerTimeout(Exception):
|
|
60
64
|
''' Minimal Exception wrapper used to raise sc timeout errors.
|
|
@@ -833,6 +837,8 @@ def _run_executable_or_builtin(chip, step, index, version, toolpath, workdir, ru
|
|
|
833
837
|
is_stderr_log = chip.get('tool', tool, 'task', task, 'stderr', 'destination',
|
|
834
838
|
step=step, index=index) == 'log' and stderr_file != stdout_file
|
|
835
839
|
|
|
840
|
+
chip.logger.info(f'Running in {workdir}')
|
|
841
|
+
|
|
836
842
|
retcode = 0
|
|
837
843
|
cmdlist = []
|
|
838
844
|
cmd_args = []
|
|
@@ -877,7 +883,6 @@ def _run_executable_or_builtin(chip, step, index, version, toolpath, workdir, ru
|
|
|
877
883
|
# Make record of tool options
|
|
878
884
|
__record_tool(chip, step, index, version, toolpath, cmd_args)
|
|
879
885
|
|
|
880
|
-
chip.logger.info('Running in %s', workdir)
|
|
881
886
|
chip.logger.info('%s', printable_cmd)
|
|
882
887
|
timeout = chip.get('option', 'timeout', step=step, index=index)
|
|
883
888
|
logfile = step + '.log'
|
|
@@ -988,10 +993,10 @@ def _run_executable_or_builtin(chip, step, index, version, toolpath, workdir, ru
|
|
|
988
993
|
msg = f'Command failed with code {retcode}.'
|
|
989
994
|
if logfile:
|
|
990
995
|
if quiet:
|
|
991
|
-
# Print last
|
|
996
|
+
# Print last N lines of log when in quiet mode
|
|
992
997
|
with sc_open(logfile) as logfd:
|
|
993
998
|
loglines = logfd.read().splitlines()
|
|
994
|
-
for logline in loglines[-
|
|
999
|
+
for logline in loglines[-_failed_log_lines:]:
|
|
995
1000
|
chip.logger.error(logline)
|
|
996
1001
|
# No log file for pure-Python tools.
|
|
997
1002
|
msg += f' See log file {os.path.abspath(logfile)}'
|
|
@@ -1239,6 +1244,13 @@ def _finalizenode(chip, step, index, replay):
|
|
|
1239
1244
|
|
|
1240
1245
|
if not is_skipped:
|
|
1241
1246
|
_check_logfile(chip, step, index, quiet, run_func)
|
|
1247
|
+
|
|
1248
|
+
# Report metrics
|
|
1249
|
+
for metric in ['errors', 'warnings']:
|
|
1250
|
+
val = chip.get('metric', metric, step=step, index=index)
|
|
1251
|
+
if val is not None:
|
|
1252
|
+
chip.logger.info(f'Number of {metric}: {val}')
|
|
1253
|
+
|
|
1242
1254
|
_hash_files(chip, step, index)
|
|
1243
1255
|
|
|
1244
1256
|
# Capture wall runtime and cpu cores
|
|
@@ -1535,12 +1547,13 @@ def _check_node_dependencies(chip, node, deps, deps_was_successful):
|
|
|
1535
1547
|
def _launch_nodes(chip, nodes_to_run, processes, local_processes):
|
|
1536
1548
|
running_nodes = {}
|
|
1537
1549
|
max_parallel_run = chip.get('option', 'scheduler', 'maxnodes')
|
|
1538
|
-
|
|
1550
|
+
max_cores = utils.get_cores(chip)
|
|
1551
|
+
max_threads = utils.get_cores(chip)
|
|
1539
1552
|
if not max_parallel_run:
|
|
1540
|
-
max_parallel_run =
|
|
1553
|
+
max_parallel_run = utils.get_cores(chip)
|
|
1541
1554
|
|
|
1542
|
-
# clip max parallel jobs to 1 <= jobs <=
|
|
1543
|
-
max_parallel_run = max(1, min(max_parallel_run,
|
|
1555
|
+
# clip max parallel jobs to 1 <= jobs <= max_cores
|
|
1556
|
+
max_parallel_run = max(1, min(max_parallel_run, max_cores))
|
|
1544
1557
|
|
|
1545
1558
|
def allow_start(node):
|
|
1546
1559
|
if node not in local_processes:
|
|
@@ -1561,7 +1574,7 @@ def _launch_nodes(chip, nodes_to_run, processes, local_processes):
|
|
|
1561
1574
|
# clamp to max_parallel to avoid getting locked up
|
|
1562
1575
|
requested_threads = max(1, min(requested_threads, max_threads))
|
|
1563
1576
|
|
|
1564
|
-
if requested_threads + sum(running_nodes.values()) >
|
|
1577
|
+
if requested_threads + sum(running_nodes.values()) > max_cores:
|
|
1565
1578
|
# delay until there are enough core available
|
|
1566
1579
|
return False, 0
|
|
1567
1580
|
|
|
@@ -2062,7 +2075,6 @@ def check_logfile(chip, jobname=None, step=None, index='0',
|
|
|
2062
2075
|
chip.logger.info(f'{suffix}: {line_with_num}')
|
|
2063
2076
|
|
|
2064
2077
|
for suffix in ordered_suffixes:
|
|
2065
|
-
chip.logger.info(f'Number of {suffix}: {matches[suffix]}')
|
|
2066
2078
|
checks[suffix]['report'].close()
|
|
2067
2079
|
|
|
2068
2080
|
return matches
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import shutil
|
|
3
|
+
from siliconcompiler import utils
|
|
3
4
|
from siliconcompiler.tools._common import \
|
|
4
5
|
add_frontend_requires, add_require_input, get_frontend_options, get_input_files, \
|
|
5
6
|
get_tool_task, has_input_files
|
|
@@ -27,7 +28,7 @@ def setup(chip):
|
|
|
27
28
|
chip.set('tool', tool, 'task', task, 'refdir', refdir,
|
|
28
29
|
step=step, index=index,
|
|
29
30
|
package='siliconcompiler', clobber=False)
|
|
30
|
-
chip.set('tool', tool, 'task', task, 'threads',
|
|
31
|
+
chip.set('tool', tool, 'task', task, 'threads', utils.get_cores(chip),
|
|
31
32
|
step=step, index=index, clobber=False)
|
|
32
33
|
|
|
33
34
|
# Input/Output requirements
|
|
@@ -3,6 +3,7 @@ import shutil
|
|
|
3
3
|
from siliconcompiler.tools._common import \
|
|
4
4
|
add_require_input, add_frontend_requires, get_frontend_options, get_input_files, \
|
|
5
5
|
get_tool_task, has_input_files
|
|
6
|
+
from siliconcompiler import utils
|
|
6
7
|
from siliconcompiler import sc_open
|
|
7
8
|
|
|
8
9
|
# Directory inside step/index dir to store bsc intermediate results.
|
|
@@ -33,7 +34,7 @@ def setup(chip):
|
|
|
33
34
|
chip.set('tool', tool, 'task', task, 'refdir', refdir,
|
|
34
35
|
step=step, index=index,
|
|
35
36
|
package='siliconcompiler', clobber=False)
|
|
36
|
-
chip.set('tool', tool, 'task', task, 'threads',
|
|
37
|
+
chip.set('tool', tool, 'task', task, 'threads', utils.get_cores(chip),
|
|
37
38
|
step=step, index=index, clobber=False)
|
|
38
39
|
|
|
39
40
|
# Input/Output requirements
|
|
@@ -3,6 +3,7 @@ import shutil
|
|
|
3
3
|
import glob
|
|
4
4
|
from siliconcompiler.tools._common import add_frontend_requires, get_tool_task, has_input_files
|
|
5
5
|
from siliconcompiler import sc_open, SiliconCompilerError
|
|
6
|
+
from siliconcompiler import utils
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
def setup(chip):
|
|
@@ -28,7 +29,7 @@ def setup(chip):
|
|
|
28
29
|
chip.set('tool', tool, 'task', task, 'refdir', refdir,
|
|
29
30
|
step=step, index=index,
|
|
30
31
|
package='siliconcompiler', clobber=False)
|
|
31
|
-
chip.set('tool', tool, 'task', task, 'threads',
|
|
32
|
+
chip.set('tool', tool, 'task', task, 'threads', utils.get_cores(chip),
|
|
32
33
|
step=step, index=index, clobber=False)
|
|
33
34
|
|
|
34
35
|
chip.set('tool', tool, 'task', task, 'option', ['-batch',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import os
|
|
2
1
|
import shutil
|
|
2
|
+
from siliconcompiler import utils
|
|
3
3
|
from siliconcompiler.tools.genfasm import genfasm
|
|
4
4
|
from siliconcompiler.tools.vpr import vpr
|
|
5
5
|
from siliconcompiler.tools._common import get_tool_task
|
|
@@ -15,7 +15,7 @@ def setup(chip):
|
|
|
15
15
|
index = chip.get('arg', 'index')
|
|
16
16
|
tool, task = get_tool_task(chip, step, index)
|
|
17
17
|
|
|
18
|
-
chip.set('tool', tool, 'task', task, 'threads',
|
|
18
|
+
chip.set('tool', tool, 'task', task, 'threads', utils.get_cores(chip),
|
|
19
19
|
step=step, index=index, clobber=False)
|
|
20
20
|
|
|
21
21
|
chip.set('tool', tool, 'task', task, 'regex', 'warnings', "^Warning",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import os
|
|
2
1
|
from siliconcompiler.tools._common import add_require_input, add_frontend_requires, \
|
|
3
2
|
get_input_files, get_tool_task, has_input_files
|
|
3
|
+
from siliconcompiler import utils
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
def setup(chip):
|
|
@@ -23,7 +23,7 @@ def setup(chip):
|
|
|
23
23
|
chip.set('tool', tool, 'vswitch', '--version')
|
|
24
24
|
chip.set('tool', tool, 'version', '>=4.0.0-dev', clobber=clobber)
|
|
25
25
|
|
|
26
|
-
chip.set('tool', tool, 'task', task, 'threads',
|
|
26
|
+
chip.set('tool', tool, 'task', task, 'threads', utils.get_cores(chip),
|
|
27
27
|
step=step, index=index, clobber=clobber)
|
|
28
28
|
chip.set('tool', tool, 'task', task, 'option', '',
|
|
29
29
|
step=step, index=index, clobber=clobber)
|
|
@@ -3,6 +3,7 @@ import os
|
|
|
3
3
|
from siliconcompiler.tools.gtkwave import setup as tool_setup
|
|
4
4
|
from siliconcompiler.tools._common import \
|
|
5
5
|
add_require_input, get_tool_task, input_provides
|
|
6
|
+
from siliconcompiler import utils
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
def setup(chip):
|
|
@@ -16,7 +17,7 @@ def setup(chip):
|
|
|
16
17
|
index = chip.get('arg', 'index')
|
|
17
18
|
tool, task = get_tool_task(chip, step, index)
|
|
18
19
|
|
|
19
|
-
chip.set('tool', tool, 'task', task, 'threads',
|
|
20
|
+
chip.set('tool', tool, 'task', task, 'threads', utils.get_cores(chip),
|
|
20
21
|
step=step, index=index)
|
|
21
22
|
|
|
22
23
|
chip.set('tool', tool, 'task', task, 'refdir',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import os
|
|
2
1
|
from siliconcompiler.tools._common import \
|
|
3
2
|
add_require_input, add_frontend_requires, get_input_files, get_frontend_options, \
|
|
4
3
|
get_tool_task
|
|
4
|
+
from siliconcompiler import utils
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
def setup(chip):
|
|
@@ -20,7 +20,7 @@ def setup(chip):
|
|
|
20
20
|
chip.set('tool', tool, 'vswitch', '-V')
|
|
21
21
|
chip.set('tool', tool, 'version', '>=10.3', clobber=False)
|
|
22
22
|
|
|
23
|
-
chip.set('tool', tool, 'task', task, 'threads',
|
|
23
|
+
chip.set('tool', tool, 'task', task, 'threads', utils.get_cores(chip),
|
|
24
24
|
step=step, index=index, clobber=False)
|
|
25
25
|
|
|
26
26
|
chip.set('tool', tool, 'task', task, 'var', 'verilog_generation',
|
|
@@ -7,6 +7,7 @@ from siliconcompiler.tools._common.asic import set_tool_task_var, get_tool_task_
|
|
|
7
7
|
|
|
8
8
|
from siliconcompiler.tools.klayout.klayout import setup as setup_tool
|
|
9
9
|
import xml.etree.ElementTree as ET
|
|
10
|
+
from siliconcompiler import utils
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
def make_docs(chip):
|
|
@@ -35,7 +36,7 @@ def setup(chip):
|
|
|
35
36
|
chip.set('tool', tool, 'task', task, 'option', option,
|
|
36
37
|
step=step, index=index, clobber=clobber)
|
|
37
38
|
|
|
38
|
-
chip.set('tool', tool, 'task', task, 'threads',
|
|
39
|
+
chip.set('tool', tool, 'task', task, 'threads', utils.get_cores(chip),
|
|
39
40
|
step=step, index=index, clobber=clobber)
|
|
40
41
|
|
|
41
42
|
chip.add('tool', tool, 'task', task, 'require', 'option,pdk')
|
|
@@ -47,7 +47,7 @@ def setup(chip):
|
|
|
47
47
|
chip.set('tool', tool, 'version', '>=8.3.196', clobber=False)
|
|
48
48
|
chip.set('tool', tool, 'format', 'tcl')
|
|
49
49
|
|
|
50
|
-
chip.set('tool', tool, 'task', task, 'threads',
|
|
50
|
+
chip.set('tool', tool, 'task', task, 'threads', utils.get_cores(chip),
|
|
51
51
|
step=step, index=index, clobber=False)
|
|
52
52
|
chip.set('tool', tool, 'task', task, 'refdir', refdir,
|
|
53
53
|
step=step, index=index,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
2
|
|
|
3
|
+
from siliconcompiler import utils
|
|
3
4
|
from siliconcompiler.tools.netgen import count_lvs
|
|
4
5
|
from siliconcompiler import sc_open
|
|
5
6
|
from siliconcompiler.tools._common import get_tool_task, record_metric
|
|
@@ -24,7 +25,7 @@ def setup(chip):
|
|
|
24
25
|
chip.set('tool', tool, 'version', '>=1.5.192', clobber=False)
|
|
25
26
|
chip.set('tool', tool, 'format', 'tcl')
|
|
26
27
|
|
|
27
|
-
chip.set('tool', tool, 'task', task, 'threads',
|
|
28
|
+
chip.set('tool', tool, 'task', task, 'threads', utils.get_cores(chip),
|
|
28
29
|
step=step, index=index, clobber=False)
|
|
29
30
|
chip.set('tool', tool, 'task', task, 'refdir', refdir,
|
|
30
31
|
step=step, index=index,
|
|
@@ -16,7 +16,7 @@ def setup(chip, exit=True):
|
|
|
16
16
|
index = chip.get('arg', 'index')
|
|
17
17
|
tool, task = get_tool_task(chip, step, index)
|
|
18
18
|
|
|
19
|
-
chip.set('tool', tool, 'task', task, 'threads',
|
|
19
|
+
chip.set('tool', tool, 'task', task, 'threads', utils.get_cores(chip),
|
|
20
20
|
step=step, index=index)
|
|
21
21
|
|
|
22
22
|
pdkname = chip.get('option', 'pdk')
|
|
@@ -792,6 +792,10 @@ def define_psm_params(chip):
|
|
|
792
792
|
'list of nets to skip power grid analysis on',
|
|
793
793
|
field='help')
|
|
794
794
|
|
|
795
|
+
chip.set('tool', tool, 'task', task, 'var', 'psm_allow_missing_terminal_nets',
|
|
796
|
+
'list of nets where a missing terminal is acceptable',
|
|
797
|
+
field='help')
|
|
798
|
+
|
|
795
799
|
|
|
796
800
|
def define_fin_params(chip):
|
|
797
801
|
set_tool_task_var(chip, param_key='fin_add_fill',
|
|
@@ -810,9 +814,6 @@ def define_mpl_params(chip):
|
|
|
810
814
|
schelp='macro channel to use when performing automated '
|
|
811
815
|
'macro placement ([x, y] in microns)')
|
|
812
816
|
|
|
813
|
-
set_tool_task_var(chip, param_key='rtlmp_enable',
|
|
814
|
-
default_value=True,
|
|
815
|
-
schelp='true/false, enables the RTLMP macro placement')
|
|
816
817
|
set_tool_task_var(chip, param_key='rtlmp_min_instances',
|
|
817
818
|
schelp='minimum number of instances to use while clustering for '
|
|
818
819
|
'macro placement')
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
2
|
|
|
3
|
+
from siliconcompiler import utils
|
|
3
4
|
from siliconcompiler.tools._common import input_provides, get_tool_task
|
|
4
5
|
from siliconcompiler.tools._common.asic import set_tool_task_var
|
|
5
6
|
from siliconcompiler.tools.openroad._apr import build_pex_corners
|
|
@@ -44,7 +45,7 @@ def setup(chip):
|
|
|
44
45
|
package='siliconcompiler')
|
|
45
46
|
chip.set('tool', tool, 'task', task, 'script', script,
|
|
46
47
|
step=step, index=index)
|
|
47
|
-
chip.set('tool', tool, 'task', task, 'threads',
|
|
48
|
+
chip.set('tool', tool, 'task', task, 'threads', utils.get_cores(chip),
|
|
48
49
|
step=step, index=index, clobber=False)
|
|
49
50
|
|
|
50
51
|
if chip.get('option', 'nodisplay'):
|
|
@@ -83,7 +84,6 @@ def setup(chip):
|
|
|
83
84
|
','.join(['input', 'netlist', 'verilog']),
|
|
84
85
|
step=step, index=index)
|
|
85
86
|
|
|
86
|
-
chip.add('tool', tool, 'task', task, 'output', design + '.sdc', step=step, index=index)
|
|
87
87
|
chip.add('tool', tool, 'task', task, 'output', design + '.vg', step=step, index=index)
|
|
88
88
|
chip.add('tool', tool, 'task', task, 'output', design + '.def', step=step, index=index)
|
|
89
89
|
chip.add('tool', tool, 'task', task, 'output', design + '.odb', step=step, index=index)
|
|
@@ -14,104 +14,88 @@ source -echo "$sc_refdir/apr/preamble.tcl"
|
|
|
14
14
|
# Need to check if we have any macros before performing macro placement,
|
|
15
15
|
# since we get an error otherwise.
|
|
16
16
|
if { [sc_design_has_unplaced_macros] } {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
###############################
|
|
17
|
+
###############################
|
|
18
|
+
# Macro placement
|
|
19
|
+
###############################
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
lassign [sc_cfg_tool_task_get var macro_place_halo] halo_x halo_y
|
|
23
22
|
|
|
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
|
-
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
|
-
###############################
|
|
23
|
+
set rtlmp_args []
|
|
24
|
+
set rtlmp_max_levels [lindex [sc_cfg_tool_task_get var rtlmp_max_levels] 0]
|
|
25
|
+
if { $rtlmp_max_levels != "" } {
|
|
26
|
+
lappend rtlmp_args -max_num_level $rtlmp_max_levels
|
|
27
|
+
}
|
|
28
|
+
set rtlmp_min_instances [lindex [sc_cfg_tool_task_get var rtlmp_min_instances] 0]
|
|
29
|
+
if { $rtlmp_min_instances != "" } {
|
|
30
|
+
lappend rtlmp_args -min_num_inst $rtlmp_min_instances
|
|
31
|
+
}
|
|
32
|
+
set rtlmp_max_instances [lindex [sc_cfg_tool_task_get var rtlmp_max_instances] 0]
|
|
33
|
+
if { $rtlmp_max_instances != "" } {
|
|
34
|
+
lappend rtlmp_args -max_num_inst $rtlmp_max_instances
|
|
35
|
+
}
|
|
36
|
+
set rtlmp_min_macros [lindex [sc_cfg_tool_task_get var rtlmp_min_macros] 0]
|
|
37
|
+
if { $rtlmp_min_macros != "" } {
|
|
38
|
+
lappend rtlmp_args -min_num_macro $rtlmp_min_macros
|
|
39
|
+
}
|
|
40
|
+
set rtlmp_max_macros [lindex [sc_cfg_tool_task_get var rtlmp_max_macros] 0]
|
|
41
|
+
if { $rtlmp_max_macros != "" } {
|
|
42
|
+
lappend rtlmp_args -max_num_macro $rtlmp_max_macros
|
|
43
|
+
}
|
|
44
|
+
set rtlmp_min_aspect_ratio [lindex [sc_cfg_tool_task_get var rtlmp_min_aspect_ratio] 0]
|
|
45
|
+
if { $rtlmp_min_aspect_ratio != "" } {
|
|
46
|
+
lappend rtlmp_args -min_ar $rtlmp_min_aspect_ratio
|
|
47
|
+
}
|
|
48
|
+
set rtlmp_fence [sc_cfg_tool_task_get var rtlmp_fence]
|
|
49
|
+
if { $rtlmp_fence != "" } {
|
|
50
|
+
lappend rtlmp_args -fence_lx [lindex $rtlmp_fence 0]
|
|
51
|
+
lappend rtlmp_args -fence_ly [lindex $rtlmp_fence 1]
|
|
52
|
+
lappend rtlmp_args -fence_ux [lindex $rtlmp_fence 2]
|
|
53
|
+
lappend rtlmp_args -fence_uy [lindex $rtlmp_fence 3]
|
|
54
|
+
}
|
|
55
|
+
set rtlmp_bus_planning [lindex [sc_cfg_tool_task_get var rtlmp_bus_planning] 0]
|
|
56
|
+
if { $rtlmp_bus_planning == "true" } {
|
|
57
|
+
lappend rtlmp_args -bus_planning
|
|
58
|
+
}
|
|
59
|
+
set rtlmp_target_dead_space [lindex [sc_cfg_tool_task_get var rtlmp_target_dead_space] 0]
|
|
60
|
+
if { $rtlmp_target_dead_space != "" } {
|
|
61
|
+
lappend rtlmp_args -target_dead_space $rtlmp_target_dead_space
|
|
62
|
+
}
|
|
110
63
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
64
|
+
set rtlmp_area_weight [lindex [sc_cfg_tool_task_get var rtlmp_area_weight] 0]
|
|
65
|
+
if { $rtlmp_area_weight != "" } {
|
|
66
|
+
lappend rtlmp_args -area_weight $rtlmp_area_weight
|
|
67
|
+
}
|
|
68
|
+
set rtlmp_outline_weight [lindex [sc_cfg_tool_task_get var rtlmp_outline_weight] 0]
|
|
69
|
+
if { $rtlmp_outline_weight != "" } {
|
|
70
|
+
lappend rtlmp_args -outline_weight $rtlmp_outline_weight
|
|
71
|
+
}
|
|
72
|
+
set rtlmp_wirelength_weight [lindex [sc_cfg_tool_task_get var rtlmp_wirelength_weight] 0]
|
|
73
|
+
if { $rtlmp_wirelength_weight != "" } {
|
|
74
|
+
lappend rtlmp_args -wirelength_weight $rtlmp_wirelength_weight
|
|
114
75
|
}
|
|
76
|
+
set rtlmp_guidance_weight [lindex [sc_cfg_tool_task_get var rtlmp_guidance_weight] 0]
|
|
77
|
+
if { $rtlmp_guidance_weight != "" } {
|
|
78
|
+
lappend rtlmp_args -guidance_weight $rtlmp_guidance_weight
|
|
79
|
+
}
|
|
80
|
+
set rtlmp_fence_weight [lindex [sc_cfg_tool_task_get var rtlmp_fence_weight] 0]
|
|
81
|
+
if { $rtlmp_fence_weight != "" } {
|
|
82
|
+
lappend rtlmp_args -fence_weight $rtlmp_fence_weight
|
|
83
|
+
}
|
|
84
|
+
set rtlmp_notch_weight [lindex [sc_cfg_tool_task_get var rtlmp_notch_weight] 0]
|
|
85
|
+
if { $rtlmp_notch_weight != "" } {
|
|
86
|
+
lappend rtlmp_args -notch_weight $rtlmp_notch_weight
|
|
87
|
+
}
|
|
88
|
+
set rtlmp_blockage_weight [lindex [sc_cfg_tool_task_get var rtlmp_blockage_weight] 0]
|
|
89
|
+
if { $rtlmp_blockage_weight != "" } {
|
|
90
|
+
lappend rtlmp_args -blockage_weight $rtlmp_blockage_weight
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
rtl_macro_placer \
|
|
94
|
+
-report_directory reports/rtlmp \
|
|
95
|
+
-halo_width $halo_x \
|
|
96
|
+
-halo_height $halo_y \
|
|
97
|
+
-target_util [sc_global_placement_density] \
|
|
98
|
+
{*}$rtlmp_args
|
|
115
99
|
}
|
|
116
100
|
|
|
117
101
|
sc_print_macro_information
|
|
@@ -47,10 +47,20 @@ foreach net [sc_supply_nets] {
|
|
|
47
47
|
|
|
48
48
|
foreach net [sc_psm_check_nets] {
|
|
49
49
|
puts "Check supply net: $net"
|
|
50
|
+
|
|
51
|
+
set check_args []
|
|
52
|
+
if {
|
|
53
|
+
[sc_check_version 18610] &&
|
|
54
|
+
[sc_cfg_tool_task_check_in_list $net var psm_allow_missing_terminal_nets]
|
|
55
|
+
} {
|
|
56
|
+
lappend check_args -dont_require_terminals
|
|
57
|
+
}
|
|
58
|
+
|
|
50
59
|
check_power_grid \
|
|
51
60
|
-floorplanning \
|
|
52
61
|
-error_file "reports/power_grid_${net}.rpt" \
|
|
53
|
-
-net $net
|
|
62
|
+
-net $net \
|
|
63
|
+
{*}$check_args
|
|
54
64
|
}
|
|
55
65
|
|
|
56
66
|
###############################
|
|
@@ -581,7 +581,7 @@ proc sc_setup_sta { } {
|
|
|
581
581
|
|
|
582
582
|
# Check timing setup
|
|
583
583
|
if { [sc_cfg_tool_task_check_in_list check_setup var reports] } {
|
|
584
|
-
check_setup
|
|
584
|
+
tee -file "reports/check_timing_setup.rpt" {check_setup -verbose}
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
if { [llength [all_clocks]] == 0 } {
|
|
@@ -98,6 +98,10 @@ if { [sc_cfg_tool_task_check_in_list fmax var reports] } {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
if { [llength [all_clocks]] > 0 } {
|
|
102
|
+
tee -file "reports/timing/clocks.rpt" {report_clock_properties}
|
|
103
|
+
}
|
|
104
|
+
|
|
101
105
|
# get logic depth of design
|
|
102
106
|
utl::metric_int "design__logic__depth" [sc_count_logic_depth]
|
|
103
107
|
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
write_def "outputs/${sc_design}.def"
|
|
5
|
-
write_verilog -include_pwr_gnd "outputs/${sc_design}.vg"
|
|
1
|
+
source "$sc_refdir/common/write_data_physical.tcl"
|
|
2
|
+
source "$sc_refdir/common/write_data_timing.tcl"
|