siliconcompiler 0.26.5__py3-none-any.whl → 0.27.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 +7 -5
- siliconcompiler/apps/sc_issue.py +2 -16
- siliconcompiler/checklists/oh_tapeout.py +2 -2
- siliconcompiler/core.py +99 -56
- siliconcompiler/flows/_common.py +2 -2
- siliconcompiler/flows/asicflow.py +4 -5
- siliconcompiler/flows/asictopflow.py +3 -3
- siliconcompiler/flows/dvflow.py +3 -4
- siliconcompiler/flows/fpgaflow.py +4 -8
- siliconcompiler/flows/generate_openroad_rcx.py +3 -3
- siliconcompiler/flows/lintflow.py +3 -3
- siliconcompiler/flows/screenshotflow.py +3 -3
- siliconcompiler/flows/showflow.py +11 -6
- siliconcompiler/flows/signoffflow.py +3 -3
- siliconcompiler/flows/synflow.py +4 -5
- siliconcompiler/fpgas/lattice_ice40.py +3 -4
- siliconcompiler/fpgas/vpr_example.py +3 -4
- siliconcompiler/scheduler/send_messages.py +2 -1
- siliconcompiler/schema/schema_cfg.py +1 -14
- siliconcompiler/schema/schema_obj.py +35 -24
- siliconcompiler/sphinx_ext/dynamicgen.py +4 -4
- siliconcompiler/targets/asic_demo.py +1 -1
- siliconcompiler/targets/fpgaflow_demo.py +1 -1
- siliconcompiler/tools/klayout/klayout.py +2 -1
- siliconcompiler/tools/magic/magic.py +2 -1
- siliconcompiler/tools/openroad/openroad.py +2 -1
- siliconcompiler/tools/opensta/__init__.py +2 -1
- siliconcompiler/tools/verilator/verilator.py +2 -1
- siliconcompiler/tools/vivado/vivado.py +2 -1
- siliconcompiler/tools/vpr/vpr.py +2 -1
- siliconcompiler/tools/yosys/syn_asic.py +2 -1
- siliconcompiler/tools/yosys/syn_fpga.py +2 -1
- siliconcompiler/tools/yosys/yosys.py +2 -1
- siliconcompiler/use.py +20 -20
- {siliconcompiler-0.26.5.dist-info → siliconcompiler-0.27.0.dist-info}/METADATA +10 -8
- {siliconcompiler-0.26.5.dist-info → siliconcompiler-0.27.0.dist-info}/RECORD +41 -41
- {siliconcompiler-0.26.5.dist-info → siliconcompiler-0.27.0.dist-info}/WHEEL +1 -1
- {siliconcompiler-0.26.5.dist-info → siliconcompiler-0.27.0.dist-info}/LICENSE +0 -0
- {siliconcompiler-0.26.5.dist-info → siliconcompiler-0.27.0.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.26.5.dist-info → siliconcompiler-0.27.0.dist-info}/top_level.txt +0 -0
siliconcompiler/_metadata.py
CHANGED
siliconcompiler/apps/sc.py
CHANGED
|
@@ -39,9 +39,11 @@ def main():
|
|
|
39
39
|
|
|
40
40
|
# Read command-line inputs and generate Chip objects to run the flow on.
|
|
41
41
|
try:
|
|
42
|
-
chip.create_cmdline(progname,
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
args = chip.create_cmdline(progname,
|
|
43
|
+
description=description,
|
|
44
|
+
input_map=get_default_iomap())
|
|
45
|
+
except SiliconCompilerError:
|
|
46
|
+
return 1
|
|
45
47
|
except Exception as e:
|
|
46
48
|
chip.logger.error(e)
|
|
47
49
|
return 1
|
|
@@ -69,8 +71,8 @@ def main():
|
|
|
69
71
|
chip.set('design', topmodule)
|
|
70
72
|
|
|
71
73
|
# Set demo target if none specified
|
|
72
|
-
if
|
|
73
|
-
chip.
|
|
74
|
+
if 'target' not in args or not args['target']:
|
|
75
|
+
chip.use(skywater130_demo)
|
|
74
76
|
|
|
75
77
|
try:
|
|
76
78
|
# Run flow
|
siliconcompiler/apps/sc_issue.py
CHANGED
|
@@ -4,7 +4,6 @@ import os
|
|
|
4
4
|
import siliconcompiler
|
|
5
5
|
import tarfile
|
|
6
6
|
import json
|
|
7
|
-
import importlib
|
|
8
7
|
from siliconcompiler.scheduler import _runtask, _executenode
|
|
9
8
|
from siliconcompiler.issue import generate_testcase
|
|
10
9
|
from siliconcompiler.tools._common import get_tool_task
|
|
@@ -18,7 +17,8 @@ def main():
|
|
|
18
17
|
'-arg_index',
|
|
19
18
|
'-tool_task_var',
|
|
20
19
|
'-tool_task_option',
|
|
21
|
-
'-loglevel'
|
|
20
|
+
'-loglevel',
|
|
21
|
+
'-use']
|
|
22
22
|
description = """
|
|
23
23
|
-----------------------------------------------------------
|
|
24
24
|
Restricted SC app that generates a sharable testcase from a
|
|
@@ -54,11 +54,6 @@ To run a testcase, use:
|
|
|
54
54
|
'help': 'run a provided testcase',
|
|
55
55
|
'sc_print': False},
|
|
56
56
|
|
|
57
|
-
'-use': {'action': 'append',
|
|
58
|
-
'help': 'modules to load into test run',
|
|
59
|
-
'metavar': '<module>',
|
|
60
|
-
'sc_print': False},
|
|
61
|
-
|
|
62
57
|
'-add_library': {'action': 'append',
|
|
63
58
|
'help': 'library to include in the testcase, if not provided all '
|
|
64
59
|
'libraries will be added according to the -exclude_libraries flag',
|
|
@@ -155,15 +150,6 @@ To run a testcase, use:
|
|
|
155
150
|
chip.logger.info(f"Changing {builddir_key} to '{new_builddir}'")
|
|
156
151
|
chip.set(*builddir_key, new_builddir)
|
|
157
152
|
|
|
158
|
-
if switches['use']:
|
|
159
|
-
for use in switches['use']:
|
|
160
|
-
try:
|
|
161
|
-
module = importlib.import_module(use)
|
|
162
|
-
chip.logger.info(f"Loading '{use}' module")
|
|
163
|
-
chip.use(module)
|
|
164
|
-
except ModuleNotFoundError:
|
|
165
|
-
chip.logger.error(f"Unable to use '{use}' module")
|
|
166
|
-
|
|
167
153
|
# Run task
|
|
168
154
|
# Rerun setup task, assumed to be running in its own thread so
|
|
169
155
|
# multiprocess is not needed
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import siliconcompiler
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
def setup(
|
|
4
|
+
def setup():
|
|
5
5
|
'''Subset of OH! library tapeout checklist.
|
|
6
6
|
|
|
7
7
|
https://github.com/aolofsson/oh/blob/master/docs/tapeout_checklist.md
|
|
8
8
|
'''
|
|
9
9
|
standard = 'oh_tapeout'
|
|
10
10
|
|
|
11
|
-
checklist = siliconcompiler.Checklist(
|
|
11
|
+
checklist = siliconcompiler.Checklist(standard)
|
|
12
12
|
|
|
13
13
|
# Automated
|
|
14
14
|
checklist.set('checklist', standard, 'drc_clean', 'description',
|
siliconcompiler/core.py
CHANGED
|
@@ -16,6 +16,7 @@ import textwrap
|
|
|
16
16
|
import graphviz
|
|
17
17
|
import codecs
|
|
18
18
|
import copy
|
|
19
|
+
from inspect import getfullargspec
|
|
19
20
|
from siliconcompiler.remote import client
|
|
20
21
|
from siliconcompiler.schema import Schema, SCHEMA_VERSION
|
|
21
22
|
from siliconcompiler.schema import utils as schema_utils
|
|
@@ -34,6 +35,7 @@ from siliconcompiler.flowgraph import _get_flowgraph_nodes, nodes_to_execute, \
|
|
|
34
35
|
_get_flowgraph_execution_order, _check_flowgraph_io, \
|
|
35
36
|
_get_flowgraph_information
|
|
36
37
|
from siliconcompiler.tools._common import get_tool_task
|
|
38
|
+
from types import FunctionType, ModuleType
|
|
37
39
|
|
|
38
40
|
|
|
39
41
|
class Chip:
|
|
@@ -226,6 +228,7 @@ class Chip:
|
|
|
226
228
|
log_format.append('%(lineno)-4s')
|
|
227
229
|
|
|
228
230
|
if in_run:
|
|
231
|
+
max_column_width = 20
|
|
229
232
|
# Figure out how wide to make step and index fields
|
|
230
233
|
max_step_len = 1
|
|
231
234
|
max_index_len = 1
|
|
@@ -235,7 +238,8 @@ class Chip:
|
|
|
235
238
|
for future_step, future_index in nodes_to_run:
|
|
236
239
|
max_step_len = max(len(future_step), max_step_len)
|
|
237
240
|
max_index_len = max(len(future_index), max_index_len)
|
|
238
|
-
max_step_len = min(max_step_len,
|
|
241
|
+
max_step_len = min(max_step_len, max_column_width)
|
|
242
|
+
max_index_len = min(max_index_len, max_column_width)
|
|
239
243
|
|
|
240
244
|
jobname = self.get('option', 'jobname')
|
|
241
245
|
|
|
@@ -244,9 +248,9 @@ class Chip:
|
|
|
244
248
|
if index is None:
|
|
245
249
|
index = '-' * max(max_index_len // 4, 1)
|
|
246
250
|
|
|
247
|
-
log_format.append(jobname)
|
|
251
|
+
log_format.append(utils.truncate_text(jobname, max_column_width))
|
|
248
252
|
log_format.append(f'{utils.truncate_text(step, max_step_len): <{max_step_len}}')
|
|
249
|
-
log_format.append(f'{index: >{max_index_len}}')
|
|
253
|
+
log_format.append(f'{utils.truncate_text(index, max_step_len): >{max_index_len}}')
|
|
250
254
|
|
|
251
255
|
log_format.append('%(message)s')
|
|
252
256
|
logformat = '| ' + ' | '.join(log_format)
|
|
@@ -298,7 +302,7 @@ class Chip:
|
|
|
298
302
|
2. read_manifest([cfg])
|
|
299
303
|
3. read compiler inputs
|
|
300
304
|
4. all other switches
|
|
301
|
-
5.
|
|
305
|
+
5. use(target)
|
|
302
306
|
|
|
303
307
|
The cmdline interface is implemented using the Python argparse package
|
|
304
308
|
and the following use restrictions apply.
|
|
@@ -360,7 +364,7 @@ class Chip:
|
|
|
360
364
|
return 'O' + item
|
|
361
365
|
return item
|
|
362
366
|
|
|
363
|
-
def post_process(cmdargs):
|
|
367
|
+
def post_process(cmdargs, extra_params):
|
|
364
368
|
# Ensure files and dir packages are set
|
|
365
369
|
for key in self.allkeys():
|
|
366
370
|
paramtype = self.get(*key, field='type')
|
|
@@ -387,13 +391,58 @@ class Chip:
|
|
|
387
391
|
self.set(*key, packages, field='package', step=step, index=index)
|
|
388
392
|
|
|
389
393
|
# Read in target if set
|
|
390
|
-
if
|
|
391
|
-
|
|
392
|
-
|
|
394
|
+
if "target" in extra_params:
|
|
395
|
+
if extra_params["target"]:
|
|
396
|
+
# running target command
|
|
397
|
+
# Search order "{name}", and "siliconcompiler.targets.{name}"
|
|
398
|
+
modules = []
|
|
399
|
+
module = extra_params["target"]
|
|
400
|
+
for mod_name in [module, f'siliconcompiler.targets.{module}']:
|
|
401
|
+
mod = self._load_module(mod_name)
|
|
402
|
+
if mod:
|
|
403
|
+
modules.append(mod)
|
|
404
|
+
|
|
405
|
+
if len(modules) == 0:
|
|
406
|
+
raise SiliconCompilerError(f'Could not find target {module}', chip=self)
|
|
407
|
+
|
|
408
|
+
self.use(modules[0])
|
|
409
|
+
extra_params["target"] = modules[0].__name__
|
|
410
|
+
|
|
411
|
+
if "use" in extra_params:
|
|
412
|
+
if extra_params["use"]:
|
|
413
|
+
for use in extra_params["use"]:
|
|
414
|
+
mod = self._load_module(use)
|
|
415
|
+
if mod is not None:
|
|
416
|
+
self.use(mod)
|
|
417
|
+
else:
|
|
418
|
+
raise ValueError(f'{use} is not a valid module.')
|
|
419
|
+
del extra_params["use"]
|
|
420
|
+
|
|
421
|
+
return extra_params
|
|
393
422
|
|
|
394
423
|
if not progname:
|
|
395
424
|
progname = self.design
|
|
396
425
|
|
|
426
|
+
if not additional_args:
|
|
427
|
+
additional_args = {}
|
|
428
|
+
|
|
429
|
+
if "-target" in additional_args:
|
|
430
|
+
raise ValueError('-target cannot be used as an additional argument')
|
|
431
|
+
|
|
432
|
+
additional_args["-target"] = {
|
|
433
|
+
"help": "target to load",
|
|
434
|
+
"metavar": "<target>"
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if "-use" in additional_args:
|
|
438
|
+
raise ValueError('-use cannot be used as an additional argument')
|
|
439
|
+
|
|
440
|
+
additional_args["-use"] = {
|
|
441
|
+
"action": "append",
|
|
442
|
+
"help": "modules to load",
|
|
443
|
+
"metavar": "<module>"
|
|
444
|
+
}
|
|
445
|
+
|
|
397
446
|
try:
|
|
398
447
|
return self.schema.create_cmdline(
|
|
399
448
|
progname=progname,
|
|
@@ -464,53 +513,18 @@ class Chip:
|
|
|
464
513
|
"""
|
|
465
514
|
Loads a target module and runs the setup() function.
|
|
466
515
|
|
|
467
|
-
The function searches the installed Python packages for <name> and
|
|
468
|
-
siliconcompiler.targets.<name> and runs the setup function in that module
|
|
469
|
-
if found.
|
|
470
|
-
|
|
471
516
|
Args:
|
|
472
|
-
module (
|
|
517
|
+
module (module): Module name
|
|
473
518
|
**kwargs (str): Options to pass along to the target
|
|
474
519
|
|
|
475
520
|
Examples:
|
|
476
|
-
>>> chip.
|
|
521
|
+
>>> chip.use(freepdk45_demo, syn_np=5)
|
|
477
522
|
Loads the 'freepdk45_demo' target with 5 parallel synthesis tasks
|
|
478
523
|
"""
|
|
479
524
|
|
|
480
|
-
|
|
481
|
-
# Search order "{name}", and "siliconcompiler.targets.{name}"
|
|
482
|
-
modules = []
|
|
483
|
-
for mod_name in [module, f'siliconcompiler.targets.{module}']:
|
|
484
|
-
mod = self._load_module(mod_name)
|
|
485
|
-
if mod:
|
|
486
|
-
modules.append(mod)
|
|
525
|
+
self.logger.warning(".load_target is deprecated, use .use() instead.")
|
|
487
526
|
|
|
488
|
-
|
|
489
|
-
raise SiliconCompilerError(f'Could not find target {module}', chip=self)
|
|
490
|
-
else:
|
|
491
|
-
modules = [module]
|
|
492
|
-
|
|
493
|
-
# Check for setup in modules
|
|
494
|
-
load_function = None
|
|
495
|
-
for mod in modules:
|
|
496
|
-
load_function = getattr(mod, 'setup', None)
|
|
497
|
-
if load_function:
|
|
498
|
-
module_name = mod.__name__
|
|
499
|
-
break
|
|
500
|
-
|
|
501
|
-
if not load_function:
|
|
502
|
-
raise SiliconCompilerError(
|
|
503
|
-
f'Could not find setup function for {module} target',
|
|
504
|
-
chip=self)
|
|
505
|
-
|
|
506
|
-
try:
|
|
507
|
-
load_function(self, **kwargs)
|
|
508
|
-
except Exception as e:
|
|
509
|
-
self.logger.error(f'Failed to load target {module}')
|
|
510
|
-
raise e
|
|
511
|
-
|
|
512
|
-
# Record target
|
|
513
|
-
self.set('option', 'target', module_name)
|
|
527
|
+
self.use(module, **kwargs)
|
|
514
528
|
|
|
515
529
|
##########################################################################
|
|
516
530
|
def use(self, module, **kwargs):
|
|
@@ -526,6 +540,8 @@ class Chip:
|
|
|
526
540
|
- Action
|
|
527
541
|
* - Module with setup function
|
|
528
542
|
- Call `setup()` and import returned objects
|
|
543
|
+
* - A setup function
|
|
544
|
+
- Call `function()` and import returned objects
|
|
529
545
|
* - Chip
|
|
530
546
|
- Import as a library
|
|
531
547
|
* - Library
|
|
@@ -547,18 +563,45 @@ class Chip:
|
|
|
547
563
|
from siliconcompiler import Library
|
|
548
564
|
from siliconcompiler import Checklist
|
|
549
565
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
566
|
+
func = None
|
|
567
|
+
|
|
568
|
+
if module is None:
|
|
569
|
+
raise ValueError('module parameter cannot be None')
|
|
570
|
+
|
|
571
|
+
if isinstance(module, ModuleType):
|
|
572
|
+
func = getattr(module, 'setup', None)
|
|
573
|
+
if func is None:
|
|
574
|
+
raise NotImplementedError(f'{module} does not have a setup()')
|
|
575
|
+
elif isinstance(module, FunctionType):
|
|
576
|
+
func = module
|
|
558
577
|
else:
|
|
559
578
|
# Import directly
|
|
560
579
|
use_modules = module
|
|
561
580
|
|
|
581
|
+
if func:
|
|
582
|
+
# Call the setup function.
|
|
583
|
+
try:
|
|
584
|
+
func_spec = getfullargspec(func)
|
|
585
|
+
|
|
586
|
+
args_len = len(func_spec.args or []) - len(func_spec.defaults or [])
|
|
587
|
+
|
|
588
|
+
args = []
|
|
589
|
+
if args_len == 1:
|
|
590
|
+
args.append(self)
|
|
591
|
+
elif args_len > 1:
|
|
592
|
+
raise RuntimeError('function signature cannot have more than 1 argument')
|
|
593
|
+
use_modules = func(*args, **kwargs)
|
|
594
|
+
|
|
595
|
+
if args_len == 1 and use_modules:
|
|
596
|
+
self.logger.warning('Target returned items, which it should not have')
|
|
597
|
+
except Exception as e:
|
|
598
|
+
self.logger.error(f'Unable to run {func.__name__}() for {module.__name__}')
|
|
599
|
+
raise e
|
|
600
|
+
|
|
601
|
+
if use_modules is None:
|
|
602
|
+
# loaded a target so done
|
|
603
|
+
return
|
|
604
|
+
|
|
562
605
|
# Make it a list for consistency
|
|
563
606
|
if not isinstance(use_modules, list):
|
|
564
607
|
use_modules = [use_modules]
|
|
@@ -3040,7 +3083,7 @@ class Chip:
|
|
|
3040
3083
|
|
|
3041
3084
|
try:
|
|
3042
3085
|
from siliconcompiler.flows import showflow
|
|
3043
|
-
self.use(showflow, filetype=filetype, screenshot=screenshot)
|
|
3086
|
+
self.use(showflow, filetype=filetype, screenshot=screenshot, showtools=self._showtools)
|
|
3044
3087
|
except Exception as e:
|
|
3045
3088
|
self.logger.error(f"Flow setup failed: {e}")
|
|
3046
3089
|
# restore environment
|
siliconcompiler/flows/_common.py
CHANGED
|
@@ -17,7 +17,7 @@ def _make_docs(chip):
|
|
|
17
17
|
chip.set('input', 'hll', 'bsv', 'test')
|
|
18
18
|
chip.set('input', 'hll', 'scala', 'test')
|
|
19
19
|
|
|
20
|
-
chip.
|
|
20
|
+
chip.use(freepdk45_demo)
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
def __get_frontends(allow_system_verilog):
|
|
@@ -36,7 +36,7 @@ def __get_frontends(allow_system_verilog):
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
def setup_multiple_frontends(
|
|
39
|
+
def setup_multiple_frontends(flow, allow_system_verilog=False):
|
|
40
40
|
'''
|
|
41
41
|
Sets of multiple frontends if different frontends are required.
|
|
42
42
|
|
|
@@ -22,14 +22,13 @@ from siliconcompiler.tools.builtin import minimum
|
|
|
22
22
|
def make_docs(chip):
|
|
23
23
|
n = 3
|
|
24
24
|
_make_docs(chip)
|
|
25
|
-
return setup(
|
|
25
|
+
return setup(syn_np=n, floorplan_np=n, physyn_np=n, place_np=n, cts_np=n, route_np=n)
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
###########################################################################
|
|
29
29
|
# Flowgraph Setup
|
|
30
30
|
############################################################################
|
|
31
|
-
def setup(
|
|
32
|
-
flowname='asicflow',
|
|
31
|
+
def setup(flowname='asicflow',
|
|
33
32
|
syn_np=1,
|
|
34
33
|
floorplan_np=1,
|
|
35
34
|
physyn_np=1,
|
|
@@ -68,7 +67,7 @@ def setup(chip,
|
|
|
68
67
|
* route_np : Number of parallel routing jobs to launch
|
|
69
68
|
'''
|
|
70
69
|
|
|
71
|
-
flow = siliconcompiler.Flow(
|
|
70
|
+
flow = siliconcompiler.Flow(flowname)
|
|
72
71
|
|
|
73
72
|
# Linear flow, up until branch to run parallel verification steps.
|
|
74
73
|
longpipe = ['syn',
|
|
@@ -126,7 +125,7 @@ def setup(chip,
|
|
|
126
125
|
flowtasks.append((step, tasks[step]))
|
|
127
126
|
|
|
128
127
|
# Programmatically build linear portion of flowgraph and fanin/fanout args
|
|
129
|
-
prevstep = setup_multiple_frontends(
|
|
128
|
+
prevstep = setup_multiple_frontends(flow)
|
|
130
129
|
for step, task in flowtasks:
|
|
131
130
|
fanout = 1
|
|
132
131
|
if step in np:
|
|
@@ -6,14 +6,14 @@ from siliconcompiler.tools.klayout import export
|
|
|
6
6
|
from siliconcompiler.flows._common import _make_docs
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
def setup(
|
|
9
|
+
def setup():
|
|
10
10
|
'''A flow for stitching together hardened blocks without doing any automated
|
|
11
11
|
place-and-route.
|
|
12
12
|
|
|
13
13
|
This flow generates a GDS and a netlist for passing to a
|
|
14
14
|
verification/signoff flow.
|
|
15
15
|
'''
|
|
16
|
-
flow = siliconcompiler.Flow(
|
|
16
|
+
flow = siliconcompiler.Flow('asictopflow')
|
|
17
17
|
|
|
18
18
|
flow.node(flow.design, 'import', surelog_parse)
|
|
19
19
|
flow.node(flow.design, 'syn', syn_asic)
|
|
@@ -33,6 +33,6 @@ def setup(chip):
|
|
|
33
33
|
if __name__ == "__main__":
|
|
34
34
|
chip = siliconcompiler.Chip('design')
|
|
35
35
|
_make_docs(chip)
|
|
36
|
-
flow = setup(
|
|
36
|
+
flow = setup()
|
|
37
37
|
chip.use(flow)
|
|
38
38
|
chip.write_flowgraph(f"{flow.top()}.png", flow=flow.top())
|
siliconcompiler/flows/dvflow.py
CHANGED
|
@@ -10,14 +10,13 @@ from siliconcompiler.tools.execute import exec_input
|
|
|
10
10
|
############################################################################
|
|
11
11
|
def make_docs(chip):
|
|
12
12
|
chip.set('input', 'rtl', 'netlist', 'test')
|
|
13
|
-
return setup(
|
|
13
|
+
return setup(np=5)
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
#############################################################################
|
|
17
17
|
# Flowgraph Setup
|
|
18
18
|
#############################################################################
|
|
19
|
-
def setup(
|
|
20
|
-
flowname='dvflow',
|
|
19
|
+
def setup(flowname='dvflow',
|
|
21
20
|
tool='icarus',
|
|
22
21
|
np=1):
|
|
23
22
|
'''
|
|
@@ -35,7 +34,7 @@ def setup(chip,
|
|
|
35
34
|
This flow is a WIP
|
|
36
35
|
'''
|
|
37
36
|
|
|
38
|
-
flow = siliconcompiler.Flow(
|
|
37
|
+
flow = siliconcompiler.Flow(flowname)
|
|
39
38
|
|
|
40
39
|
tasks = {
|
|
41
40
|
'compile': None,
|
|
@@ -23,14 +23,13 @@ from siliconcompiler.tools.nextpnr import apr as nextpnr_apr
|
|
|
23
23
|
############################################################################
|
|
24
24
|
def make_docs(chip):
|
|
25
25
|
_make_docs(chip)
|
|
26
|
-
|
|
27
|
-
return setup(chip)
|
|
26
|
+
return setup(partname='example_arch')
|
|
28
27
|
|
|
29
28
|
|
|
30
29
|
############################################################################
|
|
31
30
|
# Flowgraph Setup
|
|
32
31
|
############################################################################
|
|
33
|
-
def setup(
|
|
32
|
+
def setup(flowname='fpgaflow', fpgaflow_type=None, partname=None):
|
|
34
33
|
'''
|
|
35
34
|
A configurable FPGA compilation flow.
|
|
36
35
|
|
|
@@ -60,10 +59,7 @@ def setup(chip, flowname='fpgaflow', fpgaflow_type=None, partname=None):
|
|
|
60
59
|
flow instead of one selected from the partname set in the schema.
|
|
61
60
|
'''
|
|
62
61
|
|
|
63
|
-
flow = siliconcompiler.Flow(
|
|
64
|
-
|
|
65
|
-
if not partname:
|
|
66
|
-
partname = chip.get('fpga', 'partname')
|
|
62
|
+
flow = siliconcompiler.Flow(flowname)
|
|
67
63
|
|
|
68
64
|
if fpgaflow_type:
|
|
69
65
|
flow_pipe = flow_lookup_by_type(fpgaflow_type)
|
|
@@ -71,7 +67,7 @@ def setup(chip, flowname='fpgaflow', fpgaflow_type=None, partname=None):
|
|
|
71
67
|
flow_pipe = flow_lookup(partname)
|
|
72
68
|
|
|
73
69
|
# Minimal setup
|
|
74
|
-
prevstep = setup_multiple_frontends(
|
|
70
|
+
prevstep = setup_multiple_frontends(flow)
|
|
75
71
|
for step, tool_module in flow_pipe:
|
|
76
72
|
# Flow
|
|
77
73
|
flow.node(flowname, step, tool_module)
|
|
@@ -11,20 +11,20 @@ from siliconcompiler.flows._common import _make_docs
|
|
|
11
11
|
############################################################################
|
|
12
12
|
def make_docs(chip):
|
|
13
13
|
_make_docs(chip)
|
|
14
|
-
return setup(
|
|
14
|
+
return setup(corners=5)
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
###########################################################################
|
|
18
18
|
# Flowgraph Setup
|
|
19
19
|
############################################################################
|
|
20
|
-
def setup(
|
|
20
|
+
def setup(extraction_task=None, corners=1, serial_extraction=False):
|
|
21
21
|
'''
|
|
22
22
|
Flow to generate the OpenRCX decks needed by OpenROAD to do parasitic
|
|
23
23
|
extraction.
|
|
24
24
|
'''
|
|
25
25
|
|
|
26
26
|
flowname = 'generate_rcx'
|
|
27
|
-
flow = siliconcompiler.Flow(
|
|
27
|
+
flow = siliconcompiler.Flow(flowname)
|
|
28
28
|
|
|
29
29
|
if not extraction_task:
|
|
30
30
|
chip.logger.warning('Valid extraction not specified, defaulting to builtin/nop')
|
|
@@ -8,13 +8,13 @@ from siliconcompiler.tools.slang import lint as slang_lint
|
|
|
8
8
|
###########################################################################
|
|
9
9
|
# Flowgraph Setup
|
|
10
10
|
############################################################################
|
|
11
|
-
def setup(
|
|
11
|
+
def setup(tool='verilator'):
|
|
12
12
|
'''
|
|
13
13
|
An RTL linting flow.
|
|
14
14
|
'''
|
|
15
15
|
|
|
16
16
|
flowname = 'lintflow'
|
|
17
|
-
flow = siliconcompiler.Flow(
|
|
17
|
+
flow = siliconcompiler.Flow(flowname)
|
|
18
18
|
|
|
19
19
|
if tool == 'verilator':
|
|
20
20
|
flow.node(flowname, 'lint', verilator_lint)
|
|
@@ -30,6 +30,6 @@ def setup(chip, tool='verilator'):
|
|
|
30
30
|
if __name__ == "__main__":
|
|
31
31
|
chip = siliconcompiler.Chip('design')
|
|
32
32
|
_make_docs(chip)
|
|
33
|
-
flow = setup(
|
|
33
|
+
flow = setup()
|
|
34
34
|
chip.use(flow)
|
|
35
35
|
chip.write_flowgraph(f"{flow.top()}.png", flow=flow.top())
|
|
@@ -11,10 +11,10 @@ def make_docs(chip):
|
|
|
11
11
|
chip.set('tool', 'klayout', 'task', 'screenshot', 'var', 'ybins', 2)
|
|
12
12
|
chip.set('tool', 'montage', 'task', 'tile', 'var', 'xbins', 2)
|
|
13
13
|
chip.set('tool', 'montage', 'task', 'tile', 'var', 'ybins', 2)
|
|
14
|
-
return setup(
|
|
14
|
+
return setup()
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
def setup(
|
|
17
|
+
def setup(flowname='screenshotflow'):
|
|
18
18
|
'''
|
|
19
19
|
Flow to generate a high resolution design image from a GDS or OAS file.
|
|
20
20
|
|
|
@@ -31,7 +31,7 @@ def setup(chip, flowname='screenshotflow'):
|
|
|
31
31
|
('merge', tile)
|
|
32
32
|
]
|
|
33
33
|
|
|
34
|
-
flow = Flow(
|
|
34
|
+
flow = Flow(flowname)
|
|
35
35
|
|
|
36
36
|
prevstep = None
|
|
37
37
|
for step, task in pipe:
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import siliconcompiler
|
|
2
2
|
from siliconcompiler import SiliconCompilerError
|
|
3
|
+
from siliconcompiler.targets import freepdk45_demo
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
############################################################################
|
|
6
7
|
# DOCS
|
|
7
8
|
############################################################################
|
|
8
9
|
def make_docs(chip):
|
|
9
|
-
chip.
|
|
10
|
-
return setup(
|
|
10
|
+
chip.use(freepdk45_demo)
|
|
11
|
+
return setup(filetype='gds', showtools=chip._showtools, np=3)
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
###########################################################################
|
|
14
15
|
# Flowgraph Setup
|
|
15
16
|
############################################################################
|
|
16
|
-
def setup(
|
|
17
|
+
def setup(flowname='showflow', filetype=None, screenshot=False, showtools=None, np=1):
|
|
17
18
|
'''
|
|
18
19
|
A flow to show the output files generated from other flows.
|
|
19
20
|
|
|
@@ -25,18 +26,22 @@ def setup(chip, flowname='showflow', filetype=None, screenshot=False, np=1):
|
|
|
25
26
|
|
|
26
27
|
* np : Number of parallel show jobs to launch
|
|
27
28
|
* screenshot : true/false, indicate if this should be configured as a screenshot
|
|
29
|
+
* showtools: dictionary of file extensions with the associated show and screenshot tasks
|
|
28
30
|
'''
|
|
29
31
|
|
|
30
|
-
flow = siliconcompiler.Flow(
|
|
32
|
+
flow = siliconcompiler.Flow(flowname)
|
|
31
33
|
|
|
32
34
|
# Get required parameters first
|
|
33
35
|
if not filetype:
|
|
34
36
|
raise ValueError('filetype is a required argument')
|
|
35
37
|
|
|
36
|
-
if
|
|
38
|
+
if not showtools:
|
|
39
|
+
raise ValueError('showtools is a required argument')
|
|
40
|
+
|
|
41
|
+
if filetype not in showtools:
|
|
37
42
|
raise SiliconCompilerError(f'Show tool for {filetype} is not defined.')
|
|
38
43
|
|
|
39
|
-
show_tool =
|
|
44
|
+
show_tool = showtools[filetype]
|
|
40
45
|
|
|
41
46
|
stepname = 'show'
|
|
42
47
|
if screenshot:
|
|
@@ -9,10 +9,10 @@ from siliconcompiler.tools.builtin import join
|
|
|
9
9
|
|
|
10
10
|
def make_docs(chip):
|
|
11
11
|
chip.set('input', 'netlist', 'verilog', 'test')
|
|
12
|
-
return setup(
|
|
12
|
+
return setup()
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
def setup(
|
|
15
|
+
def setup():
|
|
16
16
|
'''A flow for running LVS/DRC signoff on a GDS layout.
|
|
17
17
|
|
|
18
18
|
Inputs must be passed to this flow as follows::
|
|
@@ -22,7 +22,7 @@ def setup(chip):
|
|
|
22
22
|
'''
|
|
23
23
|
flowname = 'signoffflow'
|
|
24
24
|
|
|
25
|
-
flow = siliconcompiler.Flow(
|
|
25
|
+
flow = siliconcompiler.Flow(flowname)
|
|
26
26
|
|
|
27
27
|
# nop import since we don't need to pull in any sources
|
|
28
28
|
flow.node(flowname, 'import', nop)
|
siliconcompiler/flows/synflow.py
CHANGED
|
@@ -15,14 +15,13 @@ from siliconcompiler.tools.builtin import minimum
|
|
|
15
15
|
def make_docs(chip):
|
|
16
16
|
n = 3
|
|
17
17
|
_make_docs(chip)
|
|
18
|
-
return setup(
|
|
18
|
+
return setup(syn_np=n, timing_np=n)
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
###########################################################################
|
|
22
22
|
# Flowgraph Setup
|
|
23
23
|
############################################################################
|
|
24
|
-
def setup(
|
|
25
|
-
flowname='synflow',
|
|
24
|
+
def setup(flowname='synflow',
|
|
26
25
|
syn_np=1,
|
|
27
26
|
timing_np=1):
|
|
28
27
|
'''
|
|
@@ -44,7 +43,7 @@ def setup(chip,
|
|
|
44
43
|
* timing_np : Number of parallel timing jobs to launch
|
|
45
44
|
'''
|
|
46
45
|
|
|
47
|
-
flow = siliconcompiler.Flow(
|
|
46
|
+
flow = siliconcompiler.Flow(flowname)
|
|
48
47
|
|
|
49
48
|
# Linear flow, up until branch to run parallel verification steps.
|
|
50
49
|
longpipe = ['syn',
|
|
@@ -80,7 +79,7 @@ def setup(chip,
|
|
|
80
79
|
flowtasks.append((step, tasks[step]))
|
|
81
80
|
|
|
82
81
|
# Programmatically build linear portion of flowgraph and fanin/fanout args
|
|
83
|
-
prevstep = setup_multiple_frontends(
|
|
82
|
+
prevstep = setup_multiple_frontends(flow)
|
|
84
83
|
for step, task in flowtasks:
|
|
85
84
|
fanout = 1
|
|
86
85
|
if step in np:
|