siliconcompiler 0.32.1__py3-none-any.whl → 0.32.2__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 +13 -5
- siliconcompiler/apps/sc_remote.py +2 -1
- siliconcompiler/core.py +30 -13
- siliconcompiler/scheduler/__init__.py +37 -8
- siliconcompiler/scheduler/docker_runner.py +2 -1
- siliconcompiler/sphinx_ext/dynamicgen.py +11 -11
- siliconcompiler/templates/tcl/manifest.tcl.j2 +4 -120
- siliconcompiler/tools/_common/tcl/sc_schema_access.tcl +126 -0
- siliconcompiler/tools/openroad/_apr.py +3 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +53 -7
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +19 -1
- siliconcompiler/tools/openroad/scripts/common/reports.tcl +16 -5
- siliconcompiler/tools/slang/__init__.py +7 -8
- siliconcompiler/tools/sv2v/sv2v.py +4 -1
- siliconcompiler/tools/yosys/__init__.py +4 -36
- siliconcompiler/tools/yosys/lec.py +3 -4
- siliconcompiler/tools/yosys/{syn_asic.tcl → sc_synth_asic.tcl} +79 -0
- siliconcompiler/tools/yosys/{syn_fpga.tcl → sc_synth_fpga.tcl} +78 -0
- siliconcompiler/tools/yosys/syn_asic.py +26 -10
- siliconcompiler/tools/yosys/syn_fpga.py +23 -16
- siliconcompiler/toolscripts/_tools.json +17 -8
- siliconcompiler/toolscripts/rhel9/install-gtkwave.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-vpr.sh +29 -0
- siliconcompiler/toolscripts/rhel9/install-yosys-parmys.sh +59 -0
- siliconcompiler/toolscripts/ubuntu20/install-yosys-parmys.sh +59 -0
- siliconcompiler/toolscripts/ubuntu22/install-bluespec.sh +25 -2
- siliconcompiler/toolscripts/ubuntu22/install-ghdl.sh +2 -2
- siliconcompiler/toolscripts/ubuntu22/install-yosys-parmys.sh +59 -0
- siliconcompiler/toolscripts/ubuntu24/install-ghdl.sh +2 -2
- siliconcompiler/toolscripts/ubuntu24/install-yosys-parmys.sh +59 -0
- siliconcompiler/utils/__init__.py +4 -1
- siliconcompiler/utils/logging.py +1 -1
- {siliconcompiler-0.32.1.dist-info → siliconcompiler-0.32.2.dist-info}/METADATA +12 -9
- {siliconcompiler-0.32.1.dist-info → siliconcompiler-0.32.2.dist-info}/RECORD +39 -35
- {siliconcompiler-0.32.1.dist-info → siliconcompiler-0.32.2.dist-info}/WHEEL +1 -1
- siliconcompiler/tools/yosys/sc_syn.tcl +0 -87
- siliconcompiler/toolscripts/ubuntu20/install-yosys-slang.sh +0 -22
- {siliconcompiler-0.32.1.dist-info → siliconcompiler-0.32.2.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.32.1.dist-info → siliconcompiler-0.32.2.dist-info/licenses}/LICENSE +0 -0
- {siliconcompiler-0.32.1.dist-info → siliconcompiler-0.32.2.dist-info}/top_level.txt +0 -0
siliconcompiler/_metadata.py
CHANGED
|
@@ -139,8 +139,8 @@ def _get_tools_list():
|
|
|
139
139
|
|
|
140
140
|
def _recommended_tool_groups(tools):
|
|
141
141
|
groups = {
|
|
142
|
-
"asic": {"
|
|
143
|
-
"fpga": {"
|
|
142
|
+
"asic": {"sv2v", "yosys", "openroad", "klayout"},
|
|
143
|
+
"fpga": {"sv2v", "yosys", "vpr"},
|
|
144
144
|
"digital-simulation": {"verilator", "icarus", "gtkwave"},
|
|
145
145
|
"analog-simulation": {"xyce"}
|
|
146
146
|
}
|
|
@@ -162,7 +162,13 @@ class HelpFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescript
|
|
|
162
162
|
|
|
163
163
|
def main():
|
|
164
164
|
progname = "sc-install"
|
|
165
|
-
|
|
165
|
+
|
|
166
|
+
tools = _get_tools_list()
|
|
167
|
+
group_desc = "\n".join(
|
|
168
|
+
[f" {grp}: {', '.join(grp_tools)}"
|
|
169
|
+
for grp, grp_tools in _recommended_tool_groups(tools).items()])
|
|
170
|
+
|
|
171
|
+
description = f"""
|
|
166
172
|
-----------------------------------------------------------
|
|
167
173
|
SC app install supported tools.
|
|
168
174
|
|
|
@@ -187,14 +193,16 @@ To show the install script:
|
|
|
187
193
|
To system debugging information (this should only be used to debug):
|
|
188
194
|
sc-install -debug_machine
|
|
189
195
|
-----------------------------------------------------------
|
|
196
|
+
Tool groups:
|
|
197
|
+
{group_desc}
|
|
198
|
+
-----------------------------------------------------------
|
|
190
199
|
"""
|
|
200
|
+
|
|
191
201
|
parser = argparse.ArgumentParser(
|
|
192
202
|
prog=progname,
|
|
193
203
|
description=description,
|
|
194
204
|
formatter_class=HelpFormatter)
|
|
195
205
|
|
|
196
|
-
tools = _get_tools_list()
|
|
197
|
-
|
|
198
206
|
if _get_os_name() is None:
|
|
199
207
|
print("Unsupported operating system", file=sys.stderr)
|
|
200
208
|
print_machine_info()
|
|
@@ -97,8 +97,9 @@ To delete a job, use:
|
|
|
97
97
|
chip.logger.error(f'Error: {", ".join(["-"+e for e in exclusive])} are mutually exclusive')
|
|
98
98
|
return 1
|
|
99
99
|
chip_cfg = chip.get('option', 'cfg')
|
|
100
|
-
if chip_cfg and
|
|
100
|
+
if not chip_cfg and any([args[arg] for arg in cfg_only]):
|
|
101
101
|
chip.logger.error(f'Error: -cfg is required for {", ".join(["-"+e for e in cfg_only])}')
|
|
102
|
+
return 2
|
|
102
103
|
if any([args[arg] for arg in cfg_only]) and args['server']:
|
|
103
104
|
chip.logger.error('Error: -server cannot be specified with '
|
|
104
105
|
f'{", ".join(["-"+e for e in cfg_only])}')
|
siliconcompiler/core.py
CHANGED
|
@@ -203,13 +203,11 @@ class Chip:
|
|
|
203
203
|
|
|
204
204
|
def _add_file_logger(self, filename):
|
|
205
205
|
# Add a file handler for logging
|
|
206
|
-
logformat = self.logger.handlers[0].formatter
|
|
207
|
-
|
|
208
206
|
file_handler = logging.FileHandler(filename)
|
|
209
|
-
file_handler.setFormatter(logformat)
|
|
210
|
-
|
|
211
207
|
self.logger.addHandler(file_handler)
|
|
212
208
|
|
|
209
|
+
self._init_logger_formats()
|
|
210
|
+
|
|
213
211
|
return file_handler
|
|
214
212
|
|
|
215
213
|
###########################################################################
|
|
@@ -227,13 +225,35 @@ class Chip:
|
|
|
227
225
|
else:
|
|
228
226
|
in_run = False
|
|
229
227
|
|
|
228
|
+
# Save in run flag
|
|
229
|
+
self.logger._in_run = in_run
|
|
230
|
+
self.logger._in_step = step
|
|
231
|
+
self.logger._in_index = index
|
|
232
|
+
|
|
233
|
+
self.logger.setLevel(schema_utils.translate_loglevel(loglevel))
|
|
234
|
+
|
|
235
|
+
if not self.logger.hasHandlers():
|
|
236
|
+
stream_handler = logging.StreamHandler(stream=sys.stdout)
|
|
237
|
+
# Save console handler
|
|
238
|
+
self.logger._console = stream_handler
|
|
239
|
+
self.logger.addHandler(stream_handler)
|
|
240
|
+
|
|
241
|
+
self.logger._support_color = ColorStreamFormatter.supports_color(stream_handler)
|
|
242
|
+
|
|
243
|
+
self._init_logger_formats(loglevel=loglevel)
|
|
244
|
+
|
|
245
|
+
def _init_logger_formats(self, loglevel=None):
|
|
246
|
+
if not loglevel:
|
|
247
|
+
self.schema.get('option', 'loglevel',
|
|
248
|
+
step=self.logger._in_step, index=self.logger._in_index)
|
|
249
|
+
|
|
230
250
|
level_format = '%(levelname)-7s'
|
|
231
251
|
log_format = [level_format]
|
|
232
252
|
if loglevel == 'debug':
|
|
233
253
|
log_format.append('%(funcName)-10s')
|
|
234
254
|
log_format.append('%(lineno)-4s')
|
|
235
255
|
|
|
236
|
-
if
|
|
256
|
+
if self.logger._in_run:
|
|
237
257
|
max_column_width = 20
|
|
238
258
|
# Figure out how wide to make step and index fields
|
|
239
259
|
max_step_len = 1
|
|
@@ -249,6 +269,9 @@ class Chip:
|
|
|
249
269
|
|
|
250
270
|
jobname = self.get('option', 'jobname')
|
|
251
271
|
|
|
272
|
+
step = self.logger._in_step
|
|
273
|
+
index = self.logger._in_index
|
|
274
|
+
|
|
252
275
|
if step is None:
|
|
253
276
|
step = '-' * max(max_step_len // 4, 1)
|
|
254
277
|
if index is None:
|
|
@@ -266,19 +289,13 @@ class Chip:
|
|
|
266
289
|
log_format.append('%(message)s')
|
|
267
290
|
stream_logformat = log_formatprefix + ' | '.join(log_format[1:])
|
|
268
291
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
self.logger.addHandler(stream_handler)
|
|
272
|
-
|
|
273
|
-
for handler in self.logger.handlers:
|
|
274
|
-
if ColorStreamFormatter.supports_color(handler):
|
|
292
|
+
for handler in self.logger.handlers.copy():
|
|
293
|
+
if handler == self.logger._console and self.logger._support_color:
|
|
275
294
|
formatter = ColorStreamFormatter(log_formatprefix, level_format, stream_logformat)
|
|
276
295
|
else:
|
|
277
296
|
formatter = LoggerFormatter(log_formatprefix, level_format, stream_logformat)
|
|
278
297
|
handler.setFormatter(formatter)
|
|
279
298
|
|
|
280
|
-
self.logger.setLevel(schema_utils.translate_loglevel(loglevel))
|
|
281
|
-
|
|
282
299
|
###########################################################################
|
|
283
300
|
def _init_codecs(self):
|
|
284
301
|
# Custom error handlers used to provide warnings when invalid characters
|
|
@@ -2,6 +2,7 @@ import contextlib
|
|
|
2
2
|
import distro
|
|
3
3
|
import getpass
|
|
4
4
|
import multiprocessing
|
|
5
|
+
import logging
|
|
5
6
|
import os
|
|
6
7
|
import platform
|
|
7
8
|
import psutil
|
|
@@ -17,6 +18,7 @@ import packaging.specifiers
|
|
|
17
18
|
from io import StringIO
|
|
18
19
|
import traceback
|
|
19
20
|
from datetime import datetime
|
|
21
|
+
from logging.handlers import QueueHandler, QueueListener
|
|
20
22
|
from siliconcompiler import sc_open
|
|
21
23
|
from siliconcompiler import utils
|
|
22
24
|
from siliconcompiler import _metadata
|
|
@@ -275,7 +277,12 @@ def _local_process(chip, flow):
|
|
|
275
277
|
nodes_to_run = {}
|
|
276
278
|
processes = {}
|
|
277
279
|
local_processes = []
|
|
278
|
-
_prepare_nodes(chip, nodes_to_run, processes, local_processes, flow)
|
|
280
|
+
log_queue = _prepare_nodes(chip, nodes_to_run, processes, local_processes, flow)
|
|
281
|
+
|
|
282
|
+
# Handle logs across threads
|
|
283
|
+
log_listener = QueueListener(log_queue, chip.logger._console)
|
|
284
|
+
chip.logger._console.setFormatter(logging.Formatter("%(message)s"))
|
|
285
|
+
log_listener.start()
|
|
279
286
|
|
|
280
287
|
# Update dashboard before run begins
|
|
281
288
|
if chip._dash:
|
|
@@ -285,6 +292,7 @@ def _local_process(chip, flow):
|
|
|
285
292
|
_launch_nodes(chip, nodes_to_run, processes, local_processes)
|
|
286
293
|
except KeyboardInterrupt:
|
|
287
294
|
# exit immediately
|
|
295
|
+
log_listener.stop()
|
|
288
296
|
sys.exit(0)
|
|
289
297
|
|
|
290
298
|
if _get_callback('post_run'):
|
|
@@ -292,6 +300,10 @@ def _local_process(chip, flow):
|
|
|
292
300
|
|
|
293
301
|
_check_nodes_status(chip, flow)
|
|
294
302
|
|
|
303
|
+
# Cleanup logger
|
|
304
|
+
log_listener.stop()
|
|
305
|
+
chip._init_logger_formats()
|
|
306
|
+
|
|
295
307
|
|
|
296
308
|
def __is_posix():
|
|
297
309
|
return sys.platform != 'win32'
|
|
@@ -421,7 +433,7 @@ def _check_version(chip, reported_version, tool, step, index):
|
|
|
421
433
|
|
|
422
434
|
|
|
423
435
|
###########################################################################
|
|
424
|
-
def _runtask(chip, flow, step, index, exec_func, pipe=None, replay=False):
|
|
436
|
+
def _runtask(chip, flow, step, index, exec_func, pipe=None, queue=None, replay=False):
|
|
425
437
|
'''
|
|
426
438
|
Private per node run method called by run().
|
|
427
439
|
|
|
@@ -437,6 +449,11 @@ def _runtask(chip, flow, step, index, exec_func, pipe=None, replay=False):
|
|
|
437
449
|
chip._init_codecs()
|
|
438
450
|
|
|
439
451
|
chip._init_logger(step, index, in_run=True)
|
|
452
|
+
if queue:
|
|
453
|
+
chip.logger.removeHandler(chip.logger._console)
|
|
454
|
+
chip.logger._console = QueueHandler(queue)
|
|
455
|
+
chip.logger.addHandler(chip.logger._console)
|
|
456
|
+
chip._init_logger_formats()
|
|
440
457
|
|
|
441
458
|
chip.set('arg', 'step', step, clobber=True)
|
|
442
459
|
chip.set('arg', 'index', index, clobber=True)
|
|
@@ -541,13 +558,12 @@ def _select_inputs(chip, step, index, trial=False):
|
|
|
541
558
|
'_select_inputs',
|
|
542
559
|
None)
|
|
543
560
|
if select_inputs:
|
|
544
|
-
|
|
561
|
+
log_level = chip.logger.level
|
|
545
562
|
if trial:
|
|
546
|
-
|
|
547
|
-
chip.logger.handlers.clear()
|
|
563
|
+
chip.logger.setLevel(logging.CRITICAL)
|
|
548
564
|
sel_inputs = select_inputs(chip, step, index)
|
|
549
|
-
if
|
|
550
|
-
chip.logger.
|
|
565
|
+
if trial:
|
|
566
|
+
chip.logger.setLevel(log_level)
|
|
551
567
|
else:
|
|
552
568
|
sel_inputs = _get_pruned_node_inputs(chip, flow, (step, index))
|
|
553
569
|
|
|
@@ -862,9 +878,16 @@ def _run_executable_or_builtin(chip, step, index, version, toolpath, workdir, ru
|
|
|
862
878
|
stderr_writer.close()
|
|
863
879
|
stderr_writer = sys.stdout
|
|
864
880
|
|
|
881
|
+
# Handle logger stdout suppression if quiet
|
|
882
|
+
stdout_handler_level = chip.logger._console.level
|
|
883
|
+
if chip.get('option', 'quiet', step=step, index=index):
|
|
884
|
+
chip.logger._console.setLevel(logging.CRITICAL)
|
|
885
|
+
|
|
865
886
|
with contextlib.redirect_stderr(stderr_writer), \
|
|
866
887
|
contextlib.redirect_stdout(stdout_writer):
|
|
867
888
|
retcode = run_func(chip)
|
|
889
|
+
|
|
890
|
+
chip.logger._console.setLevel(stdout_handler_level)
|
|
868
891
|
except Exception as e:
|
|
869
892
|
chip.logger.error(f'Failed in run() for {tool}/{task}: {e}')
|
|
870
893
|
retcode = 1 # default to non-zero
|
|
@@ -1491,6 +1514,9 @@ def _prepare_nodes(chip, nodes_to_run, processes, local_processes, flow):
|
|
|
1491
1514
|
# Call this in case this was invoked without __main__
|
|
1492
1515
|
multiprocessing.freeze_support()
|
|
1493
1516
|
|
|
1517
|
+
# Log queue for logging messages
|
|
1518
|
+
log_queue = multiprocessing.Queue(-1)
|
|
1519
|
+
|
|
1494
1520
|
init_funcs = set()
|
|
1495
1521
|
for (step, index) in nodes_to_execute(chip, flow):
|
|
1496
1522
|
node = (step, index)
|
|
@@ -1525,13 +1551,16 @@ def _prepare_nodes(chip, nodes_to_run, processes, local_processes, flow):
|
|
|
1525
1551
|
process["proc"] = multiprocessing.Process(
|
|
1526
1552
|
target=_runtask,
|
|
1527
1553
|
args=(chip, flow, step, index, exec_func),
|
|
1528
|
-
kwargs={"pipe": process["child_pipe"]
|
|
1554
|
+
kwargs={"pipe": process["child_pipe"],
|
|
1555
|
+
"queue": log_queue})
|
|
1529
1556
|
|
|
1530
1557
|
processes[node] = process
|
|
1531
1558
|
|
|
1532
1559
|
for init_func in init_funcs:
|
|
1533
1560
|
init_func(chip)
|
|
1534
1561
|
|
|
1562
|
+
return log_queue
|
|
1563
|
+
|
|
1535
1564
|
|
|
1536
1565
|
def _check_node_dependencies(chip, node, deps, deps_was_successful):
|
|
1537
1566
|
had_deps = len(deps) > 0
|
|
@@ -115,7 +115,8 @@ def run(chip, step, index, replay):
|
|
|
115
115
|
start_cwd = os.getcwd()
|
|
116
116
|
|
|
117
117
|
# Remove handlers from logger
|
|
118
|
-
chip.logger.handlers.
|
|
118
|
+
for handler in chip.logger.handlers.copy():
|
|
119
|
+
chip.logger.removeHandler(handler)
|
|
119
120
|
|
|
120
121
|
# Reinit logger
|
|
121
122
|
chip._init_logger(step=step, index=index, in_run=True)
|
|
@@ -325,7 +325,7 @@ class DynamicGen(SphinxDirective):
|
|
|
325
325
|
|
|
326
326
|
return True
|
|
327
327
|
|
|
328
|
-
def _document_free_params(self, cfg, type, key_path, reference_prefix, s):
|
|
328
|
+
def _document_free_params(self, cfg, type, key_path, reference_prefix, s, show_type=False):
|
|
329
329
|
if type in cfg:
|
|
330
330
|
cfg = cfg[type]
|
|
331
331
|
else:
|
|
@@ -337,8 +337,12 @@ class DynamicGen(SphinxDirective):
|
|
|
337
337
|
type_heading = "Files"
|
|
338
338
|
elif type == "dir":
|
|
339
339
|
type_heading = "Directories"
|
|
340
|
+
else:
|
|
341
|
+
raise ValueError(type)
|
|
340
342
|
|
|
341
343
|
table = [[strong('Parameters'), strong('Help')]]
|
|
344
|
+
if show_type:
|
|
345
|
+
table[0].insert(1, strong('Type'))
|
|
342
346
|
for key, params in cfg.items():
|
|
343
347
|
if key == "default":
|
|
344
348
|
continue
|
|
@@ -346,7 +350,10 @@ class DynamicGen(SphinxDirective):
|
|
|
346
350
|
key_node = nodes.paragraph()
|
|
347
351
|
key_node += keypath(key_path + [key], self.env.docname,
|
|
348
352
|
key_text=["...", f"'{type}'", f"'{key}'"])
|
|
349
|
-
|
|
353
|
+
entry = [key_node, para(params["help"])]
|
|
354
|
+
if show_type:
|
|
355
|
+
entry.insert(1, code(params["type"]))
|
|
356
|
+
table.append(entry)
|
|
350
357
|
|
|
351
358
|
if len(table) > 1:
|
|
352
359
|
s += build_section(type_heading, self.get_ref(*reference_prefix, type))
|
|
@@ -710,14 +717,6 @@ class ToolGen(DynamicGen):
|
|
|
710
717
|
self.__tool = None
|
|
711
718
|
self.__task = None
|
|
712
719
|
|
|
713
|
-
# Annotate the target used for default values
|
|
714
|
-
if chip.valid('option', 'target') and chip.get('option', 'target'):
|
|
715
|
-
p = docutils.nodes.inline('')
|
|
716
|
-
target = chip.get('option', 'target').split('.')[-1]
|
|
717
|
-
targetid = get_ref_id(DynamicGen.get_ref_key(TargetGen.REF_PREFIX, target))
|
|
718
|
-
self.parse_rst(f"Built using target: :ref:`{target}<{targetid}>`", p)
|
|
719
|
-
s += p
|
|
720
|
-
|
|
721
720
|
try:
|
|
722
721
|
task_setup(chip)
|
|
723
722
|
|
|
@@ -780,7 +779,8 @@ class ToolGen(DynamicGen):
|
|
|
780
779
|
|
|
781
780
|
def document_free_params(self, cfg, reference_prefix, s):
|
|
782
781
|
key_path = ['tool', '<tool>', 'task', '<task>']
|
|
783
|
-
self._document_free_params(cfg, 'var', key_path + ['var'], reference_prefix, s
|
|
782
|
+
self._document_free_params(cfg, 'var', key_path + ['var'], reference_prefix, s,
|
|
783
|
+
show_type=True)
|
|
784
784
|
self._document_free_params(cfg, 'file', key_path + ['file'], reference_prefix, s)
|
|
785
785
|
self._document_free_params(cfg, 'dir', key_path + ['dir'], reference_prefix, s)
|
|
786
786
|
|
|
@@ -11,129 +11,13 @@
|
|
|
11
11
|
# Helper functions
|
|
12
12
|
#############################################
|
|
13
13
|
|
|
14
|
-
# Shortcut to get values from configuration
|
|
15
|
-
proc sc_cfg_get { args } {
|
|
16
|
-
# Refer to global sc_cfg dictionary
|
|
17
|
-
global sc_cfg
|
|
18
|
-
|
|
19
|
-
{% if record_access %}puts "{{ record_access_id }} [join $args ,]"{% endif %}
|
|
20
|
-
|
|
21
|
-
if { ![sc_cfg_exists {*}$args] } {
|
|
22
|
-
throw {FLOW KEYERROR} "key \"$args\" is not in the siliconcompiler configuration"
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return [dict get $sc_cfg {*}$args]
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
proc sc_cfg_exists { args } {
|
|
29
|
-
# Refer to global sc_cfg dictionary
|
|
30
|
-
global sc_cfg
|
|
31
|
-
|
|
32
|
-
return [dict exists $sc_cfg {*}$args]
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
proc sc_top {} {
|
|
36
|
-
set sc_entrypoint [sc_cfg_get option entrypoint]
|
|
37
|
-
if {$sc_entrypoint == {{ '{}' }}} {
|
|
38
|
-
return [sc_cfg_get design]
|
|
39
|
-
}
|
|
40
|
-
return $sc_entrypoint
|
|
41
|
-
}
|
|
42
|
-
|
|
43
14
|
proc sc_root {} {
|
|
44
15
|
return "{{ scroot }}"
|
|
45
16
|
}
|
|
46
17
|
|
|
47
|
-
|
|
48
|
-
proc sc_cfg_tool_task_get { args } {
|
|
49
|
-
set sc_step [sc_cfg_get arg step]
|
|
50
|
-
set sc_index [sc_cfg_get arg index]
|
|
51
|
-
|
|
52
|
-
set sc_flow [sc_cfg_get option flow]
|
|
53
|
-
|
|
54
|
-
set sc_task [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index task]
|
|
55
|
-
set sc_tool [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index tool]
|
|
56
|
-
|
|
57
|
-
return [sc_cfg_get tool $sc_tool task $sc_task {*}$args]
|
|
58
|
-
}
|
|
18
|
+
{% include 'tools/_common/tcl/sc_schema_access.tcl' %}
|
|
59
19
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
set sc_flow [sc_cfg_get option flow]
|
|
65
|
-
|
|
66
|
-
set sc_task [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index task]
|
|
67
|
-
set sc_tool [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index tool]
|
|
68
|
-
|
|
69
|
-
return [sc_cfg_exists tool $sc_tool task $sc_task {*}$args]
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
# Check if an item is present in a list
|
|
73
|
-
proc sc_cfg_tool_task_check_in_list { item args } {
|
|
74
|
-
set result [sc_cfg_tool_task_get {*}$args]
|
|
75
|
-
|
|
76
|
-
if { [lsearch -exact $result $item] != -1 } {
|
|
77
|
-
return 1
|
|
78
|
-
} else {
|
|
79
|
-
return 0
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
proc sc_section_banner { text { method puts } } {
|
|
84
|
-
$method "============================================================"
|
|
85
|
-
$method "| $text"
|
|
86
|
-
$method "============================================================"
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
# Get list of soft libraries
|
|
90
|
-
proc sc_get_libraries { {library {}} {libraries {}} } {
|
|
91
|
-
set key []
|
|
92
|
-
if { [llength $library] != 0 } {
|
|
93
|
-
lappend key library $library
|
|
94
|
-
}
|
|
95
|
-
lappend key option library
|
|
96
|
-
|
|
97
|
-
set libs []
|
|
98
|
-
foreach lib [sc_cfg_get {*}$key] {
|
|
99
|
-
if { [lsearch -exact $libs $lib] != -1 || [lsearch -exact $libraries $lib] != -1 } {
|
|
100
|
-
continue
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
lappend libs $lib
|
|
104
|
-
|
|
105
|
-
foreach sublib [sc_get_libraries $lib $libs] {
|
|
106
|
-
lappend libs $sublib
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return [lsort -unique $libs]
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
# Get list of asic libraries
|
|
114
|
-
proc sc_get_asic_libraries { type } {
|
|
115
|
-
set libs []
|
|
116
|
-
|
|
117
|
-
foreach lib [sc_cfg_get asic ${type}lib] {
|
|
118
|
-
if { [lsearch -exact $libs $lib] != -1 } {
|
|
119
|
-
continue
|
|
120
|
-
}
|
|
121
|
-
lappend libs $lib
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
foreach lib [sc_get_libraries] {
|
|
125
|
-
if { ![sc_cfg_exists library $lib asic ${type}lib] } {
|
|
126
|
-
continue
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
foreach sublib [sc_cfg_get library $lib asic ${type}lib] {
|
|
130
|
-
if { [lsearch -exact $libs $sublib] != -1 } {
|
|
131
|
-
continue
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
lappend libs $sublib
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
return $libs
|
|
20
|
+
# Redefine
|
|
21
|
+
proc _sc_cfg_get_debug { args } {
|
|
22
|
+
{% if record_access %}puts "{{ record_access_id }} [join $args ,]"{% endif %}
|
|
139
23
|
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
proc _sc_cfg_get_debug { args } {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
# Shortcut to get values from configuration
|
|
6
|
+
proc sc_cfg_get { args } {
|
|
7
|
+
_sc_cfg_get_debug $args
|
|
8
|
+
|
|
9
|
+
# Refer to global sc_cfg dictionary
|
|
10
|
+
global sc_cfg
|
|
11
|
+
|
|
12
|
+
if { ![sc_cfg_exists {*}$args] } {
|
|
13
|
+
throw {FLOW KEYERROR} "key \"$args\" is not in the siliconcompiler configuration"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return [dict get $sc_cfg {*}$args]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
proc sc_cfg_exists { args } {
|
|
20
|
+
# Refer to global sc_cfg dictionary
|
|
21
|
+
global sc_cfg
|
|
22
|
+
|
|
23
|
+
return [dict exists $sc_cfg {*}$args]
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
proc sc_top { } {
|
|
27
|
+
set sc_entrypoint [sc_cfg_get option entrypoint]
|
|
28
|
+
if { $sc_entrypoint == {{ '{}' }} } {
|
|
29
|
+
return [sc_cfg_get design]
|
|
30
|
+
}
|
|
31
|
+
return $sc_entrypoint
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
# Shortcut to get tool vars
|
|
35
|
+
proc sc_cfg_tool_task_get { args } {
|
|
36
|
+
set sc_step [sc_cfg_get arg step]
|
|
37
|
+
set sc_index [sc_cfg_get arg index]
|
|
38
|
+
|
|
39
|
+
set sc_flow [sc_cfg_get option flow]
|
|
40
|
+
|
|
41
|
+
set sc_task [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index task]
|
|
42
|
+
set sc_tool [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index tool]
|
|
43
|
+
|
|
44
|
+
return [sc_cfg_get tool $sc_tool task $sc_task {*}$args]
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
proc sc_cfg_tool_task_exists { args } {
|
|
48
|
+
set sc_step [sc_cfg_get arg step]
|
|
49
|
+
set sc_index [sc_cfg_get arg index]
|
|
50
|
+
|
|
51
|
+
set sc_flow [sc_cfg_get option flow]
|
|
52
|
+
|
|
53
|
+
set sc_task [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index task]
|
|
54
|
+
set sc_tool [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index tool]
|
|
55
|
+
|
|
56
|
+
return [sc_cfg_exists tool $sc_tool task $sc_task {*}$args]
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
# Check if an item is present in a list
|
|
60
|
+
proc sc_cfg_tool_task_check_in_list { item args } {
|
|
61
|
+
set result [sc_cfg_tool_task_get {*}$args]
|
|
62
|
+
|
|
63
|
+
if { [lsearch -exact $result $item] != -1 } {
|
|
64
|
+
return 1
|
|
65
|
+
} else {
|
|
66
|
+
return 0
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
proc sc_section_banner { text { method puts } } {
|
|
71
|
+
$method "============================================================"
|
|
72
|
+
$method "| $text"
|
|
73
|
+
$method "============================================================"
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
# Get list of soft libraries
|
|
77
|
+
proc sc_get_libraries { { library {} } { libraries {} } } {
|
|
78
|
+
set key []
|
|
79
|
+
if { [llength $library] != 0 } {
|
|
80
|
+
lappend key library $library
|
|
81
|
+
}
|
|
82
|
+
lappend key option library
|
|
83
|
+
|
|
84
|
+
set libs []
|
|
85
|
+
foreach lib [sc_cfg_get {*}$key] {
|
|
86
|
+
if { [lsearch -exact $libs $lib] != -1 || [lsearch -exact $libraries $lib] != -1 } {
|
|
87
|
+
continue
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
lappend libs $lib
|
|
91
|
+
|
|
92
|
+
foreach sublib [sc_get_libraries $lib $libs] {
|
|
93
|
+
lappend libs $sublib
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return [lsort -unique $libs]
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
# Get list of asic libraries
|
|
101
|
+
proc sc_get_asic_libraries { type } {
|
|
102
|
+
set libs []
|
|
103
|
+
|
|
104
|
+
foreach lib [sc_cfg_get asic ${type}lib] {
|
|
105
|
+
if { [lsearch -exact $libs $lib] != -1 } {
|
|
106
|
+
continue
|
|
107
|
+
}
|
|
108
|
+
lappend libs $lib
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
foreach lib [sc_get_libraries] {
|
|
112
|
+
if { ![sc_cfg_exists library $lib asic ${type}lib] } {
|
|
113
|
+
continue
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
foreach sublib [sc_cfg_get library $lib asic ${type}lib] {
|
|
117
|
+
if { [lsearch -exact $libs $sublib] != -1 } {
|
|
118
|
+
continue
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
lappend libs $sublib
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return $libs
|
|
126
|
+
}
|
|
@@ -555,6 +555,9 @@ def define_pad_params(chip):
|
|
|
555
555
|
|
|
556
556
|
|
|
557
557
|
def define_rsz_params(chip):
|
|
558
|
+
set_tool_task_var(chip, param_key='rsz_skip_drv_repair',
|
|
559
|
+
default_value=False,
|
|
560
|
+
schelp='skip design rule violation repair')
|
|
558
561
|
set_tool_task_var(chip, param_key='rsz_skip_setup_repair',
|
|
559
562
|
default_value=False,
|
|
560
563
|
schelp='skip setup timing repair')
|