siliconcompiler 0.29.0__py3-none-any.whl → 0.29.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/__init__.py +26 -0
- siliconcompiler/apps/sc_install.py +1 -1
- siliconcompiler/apps/utils/replay.py +96 -38
- siliconcompiler/checklists/__init__.py +12 -0
- siliconcompiler/core.py +85 -15
- siliconcompiler/flows/__init__.py +34 -0
- siliconcompiler/flows/showflow.py +1 -1
- siliconcompiler/libs/__init__.py +5 -0
- siliconcompiler/optimizer/__init__.py +199 -0
- siliconcompiler/optimizer/vizier.py +259 -0
- siliconcompiler/pdks/__init__.py +5 -0
- siliconcompiler/scheduler/__init__.py +67 -49
- siliconcompiler/scheduler/send_messages.py +1 -1
- siliconcompiler/schema/schema_cfg.py +2 -2
- siliconcompiler/schema/schema_obj.py +13 -10
- siliconcompiler/schema/utils.py +2 -0
- siliconcompiler/sphinx_ext/__init__.py +85 -0
- siliconcompiler/sphinx_ext/dynamicgen.py +17 -33
- siliconcompiler/sphinx_ext/schemagen.py +3 -2
- siliconcompiler/targets/__init__.py +26 -0
- siliconcompiler/templates/replay/replay.py.j2 +62 -0
- siliconcompiler/templates/replay/requirements.txt +2 -1
- siliconcompiler/templates/replay/setup.sh +119 -6
- siliconcompiler/tools/__init__.py +62 -0
- siliconcompiler/tools/_common/asic.py +77 -6
- siliconcompiler/tools/_common/tcl/sc_pin_constraints.tcl +2 -2
- siliconcompiler/tools/ghdl/ghdl.py +1 -2
- siliconcompiler/tools/gtkwave/__init__.py +39 -0
- siliconcompiler/tools/gtkwave/scripts/sc_show.tcl +34 -0
- siliconcompiler/tools/gtkwave/show.py +70 -0
- siliconcompiler/tools/icarus/compile.py +4 -0
- siliconcompiler/tools/klayout/convert_drc_db.py +1 -1
- siliconcompiler/tools/klayout/drc.py +1 -1
- siliconcompiler/tools/klayout/export.py +8 -1
- siliconcompiler/tools/klayout/klayout.py +2 -2
- siliconcompiler/tools/klayout/klayout_convert_drc_db.py +2 -2
- siliconcompiler/tools/klayout/klayout_export.py +7 -5
- siliconcompiler/tools/klayout/klayout_operations.py +4 -3
- siliconcompiler/tools/klayout/klayout_show.py +3 -2
- siliconcompiler/tools/klayout/klayout_utils.py +1 -1
- siliconcompiler/tools/klayout/operations.py +8 -0
- siliconcompiler/tools/klayout/screenshot.py +6 -1
- siliconcompiler/tools/klayout/show.py +8 -1
- siliconcompiler/tools/magic/magic.py +1 -1
- siliconcompiler/tools/openroad/__init__.py +1 -1
- siliconcompiler/tools/openroad/_apr.py +11 -2
- siliconcompiler/tools/openroad/global_placement.py +23 -2
- siliconcompiler/tools/openroad/init_floorplan.py +1 -1
- siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +4 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +64 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +4 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +8 -2
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +88 -0
- siliconcompiler/tools/openroad/scripts/common/reports.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/common/write_images.tcl +10 -1
- siliconcompiler/tools/openroad/scripts/sc_show.tcl +5 -0
- siliconcompiler/tools/opensta/__init__.py +1 -1
- siliconcompiler/tools/opensta/check_library.py +27 -0
- siliconcompiler/tools/opensta/scripts/sc_check_library.tcl +255 -0
- siliconcompiler/tools/opensta/scripts/sc_timing.tcl +1 -1
- siliconcompiler/tools/sv2v/sv2v.py +1 -2
- siliconcompiler/tools/verilator/compile.py +11 -0
- siliconcompiler/tools/verilator/verilator.py +7 -8
- siliconcompiler/tools/vivado/vivado.py +1 -1
- siliconcompiler/tools/yosys/__init__.py +149 -0
- siliconcompiler/tools/yosys/lec.py +22 -9
- siliconcompiler/tools/yosys/sc_lec.tcl +94 -49
- siliconcompiler/tools/yosys/sc_syn.tcl +1 -0
- siliconcompiler/tools/yosys/screenshot.py +2 -2
- siliconcompiler/tools/yosys/syn_asic.py +98 -74
- siliconcompiler/tools/yosys/syn_asic.tcl +31 -6
- siliconcompiler/tools/yosys/syn_fpga.py +2 -3
- siliconcompiler/tools/yosys/syn_fpga.tcl +0 -1
- siliconcompiler/toolscripts/_tools.json +8 -3
- siliconcompiler/toolscripts/rhel9/install-gtkwave.sh +40 -0
- siliconcompiler/toolscripts/ubuntu20/install-gtkwave.sh +28 -0
- siliconcompiler/toolscripts/ubuntu22/install-gtkwave.sh +28 -0
- siliconcompiler/toolscripts/ubuntu22/install-slang.sh +0 -0
- siliconcompiler/toolscripts/ubuntu24/install-gtkwave.sh +29 -0
- siliconcompiler/utils/__init__.py +7 -3
- siliconcompiler/utils/showtools.py +3 -0
- {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.2.dist-info}/METADATA +14 -11
- {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.2.dist-info}/RECORD +88 -91
- {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.2.dist-info}/WHEEL +1 -1
- {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.2.dist-info}/entry_points.txt +13 -0
- siliconcompiler/libs/asap7sc7p5t.py +0 -8
- siliconcompiler/libs/gf180mcu.py +0 -8
- siliconcompiler/libs/interposer.py +0 -8
- siliconcompiler/libs/nangate45.py +0 -8
- siliconcompiler/libs/sg13g2_stdcell.py +0 -8
- siliconcompiler/libs/sky130hd.py +0 -8
- siliconcompiler/libs/sky130io.py +0 -8
- siliconcompiler/pdks/asap7.py +0 -8
- siliconcompiler/pdks/freepdk45.py +0 -8
- siliconcompiler/pdks/gf180.py +0 -8
- siliconcompiler/pdks/ihp130.py +0 -8
- siliconcompiler/pdks/interposer.py +0 -8
- siliconcompiler/pdks/skywater130.py +0 -8
- siliconcompiler/templates/replay/run.py.j2 +0 -22
- siliconcompiler/tools/yosys/yosys.py +0 -148
- {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.2.dist-info}/LICENSE +0 -0
- {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
from siliconcompiler.tools.gtkwave import setup as tool_setup
|
|
4
|
+
from siliconcompiler.tools._common import \
|
|
5
|
+
add_require_input, get_tool_task, input_provides
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def setup(chip):
|
|
9
|
+
'''
|
|
10
|
+
Show a VCD file.
|
|
11
|
+
'''
|
|
12
|
+
|
|
13
|
+
tool_setup(chip)
|
|
14
|
+
|
|
15
|
+
step = chip.get('arg', 'step')
|
|
16
|
+
index = chip.get('arg', 'index')
|
|
17
|
+
tool, task = get_tool_task(chip, step, index)
|
|
18
|
+
|
|
19
|
+
chip.set('tool', tool, 'task', task, 'threads', os.cpu_count(),
|
|
20
|
+
step=step, index=index)
|
|
21
|
+
|
|
22
|
+
chip.set('tool', tool, 'task', task, 'refdir',
|
|
23
|
+
'tools/gtkwave/scripts',
|
|
24
|
+
step=step, index=index, package='siliconcompiler')
|
|
25
|
+
|
|
26
|
+
chip.set('tool', tool, 'task', task, 'refdir',
|
|
27
|
+
'tools/gtkwave/scripts',
|
|
28
|
+
step=step, index=index, package='siliconcompiler')
|
|
29
|
+
chip.set('tool', tool, 'task', task, 'script', 'sc_show.tcl',
|
|
30
|
+
step=step, index=index)
|
|
31
|
+
|
|
32
|
+
if f'{chip.top()}.vcd' in input_provides(chip, step, index):
|
|
33
|
+
chip.set('tool', tool, 'task', task, 'input', f'{chip.top()}.vcd', step=step, index=index)
|
|
34
|
+
elif chip.valid('tool', tool, 'task', task, 'var', 'show_filepath') and \
|
|
35
|
+
chip.get('tool', tool, 'task', task, 'var', 'show_filepath', step=step, index=index):
|
|
36
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
37
|
+
",".join(['tool', tool, 'task', task, 'var', 'show_filepath']),
|
|
38
|
+
step=step, index=index)
|
|
39
|
+
else:
|
|
40
|
+
add_require_input(chip, 'input', 'waveform', 'vcd')
|
|
41
|
+
|
|
42
|
+
chip.set('tool', tool, 'task', task, 'var', 'show_exit', False,
|
|
43
|
+
step=step, index=index, clobber=False)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def runtime_options(chip):
|
|
47
|
+
step = chip.get('arg', 'step')
|
|
48
|
+
index = chip.get('arg', 'index')
|
|
49
|
+
tool, task = get_tool_task(chip, step, index)
|
|
50
|
+
|
|
51
|
+
options = []
|
|
52
|
+
|
|
53
|
+
threads = chip.get('tool', tool, 'task', task, 'threads', step=step, index=index)
|
|
54
|
+
if threads:
|
|
55
|
+
options.append(f'--cpu={threads}')
|
|
56
|
+
|
|
57
|
+
script = chip.find_files('tool', tool, 'task', task, 'script', step=step, index=index)[0]
|
|
58
|
+
options.append(f'--script={script}')
|
|
59
|
+
|
|
60
|
+
if os.path.exists(f'inputs/{chip.top()}.vcd'):
|
|
61
|
+
dump = f'inputs/{chip.top()}.vcd'
|
|
62
|
+
elif chip.valid('tool', tool, 'task', task, 'var', 'show_filepath') and \
|
|
63
|
+
chip.get('tool', tool, 'task', task, 'var', 'show_filepath', step=step, index=index):
|
|
64
|
+
dump = chip.get('tool', tool, 'task', task, 'var', 'show_filepath',
|
|
65
|
+
step=step, index=index)[0]
|
|
66
|
+
else:
|
|
67
|
+
dump = chip.find_files('input', 'waveform', 'vcd', step=step, index=index)[0]
|
|
68
|
+
options.append(f'--dump={dump}')
|
|
69
|
+
|
|
70
|
+
return options
|
|
@@ -75,6 +75,10 @@ def runtime_options(chip):
|
|
|
75
75
|
cmdlist.append('-I' + value)
|
|
76
76
|
for value in opts['define']:
|
|
77
77
|
cmdlist.append('-D' + value)
|
|
78
|
+
|
|
79
|
+
# add siliconcompiler specific defines
|
|
80
|
+
cmdlist.append(f"-DSILICONCOMPILER_TRACE_FILE=\\\"reports/{design}.vcd\\\"")
|
|
81
|
+
|
|
78
82
|
for value in get_input_files(chip, 'input', 'cmdfile', 'f'):
|
|
79
83
|
cmdlist.append('-f ' + value)
|
|
80
84
|
for value in get_input_files(chip, 'input', 'rtl', 'netlist'):
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
from siliconcompiler.tools._common import input_provides, input_file_node_name, get_tool_task
|
|
2
2
|
|
|
3
|
-
from siliconcompiler.tools.klayout import klayout
|
|
4
3
|
from siliconcompiler.tools.klayout.klayout import setup as setup_tool
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
def make_docs(chip):
|
|
7
|
+
from siliconcompiler.tools.klayout import klayout
|
|
8
8
|
klayout.make_docs(chip)
|
|
9
9
|
|
|
10
10
|
|
|
@@ -5,12 +5,12 @@ from siliconcompiler.tools._common import input_provides, has_input_files, \
|
|
|
5
5
|
get_input_files, get_tool_task, record_metric
|
|
6
6
|
from siliconcompiler.tools._common.asic import set_tool_task_var, get_tool_task_var
|
|
7
7
|
|
|
8
|
-
from siliconcompiler.tools.klayout import klayout
|
|
9
8
|
from siliconcompiler.tools.klayout.klayout import setup as setup_tool
|
|
10
9
|
import xml.etree.ElementTree as ET
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
def make_docs(chip):
|
|
13
|
+
from siliconcompiler.tools.klayout import klayout
|
|
14
14
|
klayout.make_docs(chip)
|
|
15
15
|
chip.set('tool', 'klayout', 'task', 'drc', 'var', 'drc_name', '<drc_name>',
|
|
16
16
|
step='<step>', index='<index>')
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import os
|
|
2
2
|
from siliconcompiler.tools.klayout.klayout import setup as setup_tool
|
|
3
|
+
from siliconcompiler.tools.klayout.klayout import runtime_options as runtime_options_tool
|
|
3
4
|
from siliconcompiler.tools.klayout.screenshot import setup_gui_screenshot
|
|
4
5
|
from siliconcompiler.tools._common import input_provides, get_tool_task
|
|
5
6
|
from siliconcompiler.tools._common.asic import get_libraries
|
|
@@ -120,3 +121,9 @@ def setup(chip):
|
|
|
120
121
|
if chip.get('tool', tool, 'task', task, 'var', 'screenshot',
|
|
121
122
|
step=step, index=index) == ['true']:
|
|
122
123
|
setup_gui_screenshot(chip, require_input=False)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def runtime_options(chip):
|
|
127
|
+
return runtime_options_tool(chip) + [
|
|
128
|
+
'-rd', f'SC_TOOLS_ROOT={os.path.dirname(os.path.dirname(__file__))}'
|
|
129
|
+
]
|
|
@@ -15,13 +15,13 @@ from pathlib import Path
|
|
|
15
15
|
import platform
|
|
16
16
|
import shutil
|
|
17
17
|
from siliconcompiler.tools._common import get_tool_task
|
|
18
|
-
from siliconcompiler.targets import freepdk45_demo
|
|
19
18
|
|
|
20
19
|
|
|
21
20
|
####################################################################
|
|
22
21
|
# Make Docs
|
|
23
22
|
####################################################################
|
|
24
23
|
def make_docs(chip):
|
|
24
|
+
from siliconcompiler.targets import freepdk45_demo
|
|
25
25
|
chip.use(freepdk45_demo)
|
|
26
26
|
|
|
27
27
|
|
|
@@ -102,7 +102,7 @@ def runtime_options(chip):
|
|
|
102
102
|
# that has no 3rd-party dependencies.
|
|
103
103
|
# This must be done at runtime to work in a remote context.
|
|
104
104
|
|
|
105
|
-
return ['-rd', f'
|
|
105
|
+
return ['-rd', f'SC_KLAYOUT_ROOT={os.path.dirname(__file__)}']
|
|
106
106
|
|
|
107
107
|
|
|
108
108
|
################################
|
|
@@ -150,9 +150,9 @@ def convert_drc(view, path):
|
|
|
150
150
|
|
|
151
151
|
def main():
|
|
152
152
|
# SC_ROOT provided by CLI
|
|
153
|
-
sys.path.append(
|
|
153
|
+
sys.path.append(SC_KLAYOUT_ROOT) # noqa: F821
|
|
154
154
|
|
|
155
|
-
from
|
|
155
|
+
from klayout_utils import get_schema
|
|
156
156
|
|
|
157
157
|
schema = get_schema(manifest='sc_manifest.json')
|
|
158
158
|
|
|
@@ -42,7 +42,7 @@ import fnmatch
|
|
|
42
42
|
def gds_export(design_name, in_def, in_files, out_file, tech, allow_missing, config_file='',
|
|
43
43
|
seal_file='',
|
|
44
44
|
timestamps=True):
|
|
45
|
-
from
|
|
45
|
+
from klayout_utils import get_write_options # noqa E402
|
|
46
46
|
|
|
47
47
|
# Load def file
|
|
48
48
|
main_layout = pya.Layout()
|
|
@@ -119,16 +119,18 @@ def gds_export(design_name, in_def, in_files, out_file, tech, allow_missing, con
|
|
|
119
119
|
|
|
120
120
|
def main():
|
|
121
121
|
# SC_ROOT provided by CLI
|
|
122
|
-
sys.path.append(
|
|
122
|
+
sys.path.append(SC_KLAYOUT_ROOT) # noqa: F821
|
|
123
|
+
sys.path.append(SC_TOOLS_ROOT) # noqa: F821
|
|
124
|
+
print(sys.path)
|
|
123
125
|
|
|
124
|
-
from
|
|
126
|
+
from klayout_utils import (
|
|
125
127
|
technology,
|
|
126
128
|
get_streams,
|
|
127
129
|
save_technology,
|
|
128
130
|
get_schema
|
|
129
131
|
)
|
|
130
|
-
from
|
|
131
|
-
from
|
|
132
|
+
from klayout_show import show
|
|
133
|
+
from _common.asic import get_libraries
|
|
132
134
|
|
|
133
135
|
schema = get_schema(manifest='sc_manifest.json')
|
|
134
136
|
|
|
@@ -148,7 +148,7 @@ def rename_cell(base_layout, old_name, new_name):
|
|
|
148
148
|
|
|
149
149
|
|
|
150
150
|
def write_stream(layout, outfile, timestamps):
|
|
151
|
-
from
|
|
151
|
+
from klayout_utils import get_write_options
|
|
152
152
|
|
|
153
153
|
print(f"[INFO] Writing layout: '{outfile}'")
|
|
154
154
|
|
|
@@ -324,9 +324,10 @@ def parse_operations(schema, base_layout, steps):
|
|
|
324
324
|
|
|
325
325
|
if __name__ == "__main__":
|
|
326
326
|
# SC_ROOT provided by CLI
|
|
327
|
-
sys.path.append(
|
|
327
|
+
sys.path.append(SC_KLAYOUT_ROOT) # noqa: F821
|
|
328
|
+
sys.path.append(SC_TOOLS_ROOT) # noqa: F821
|
|
328
329
|
|
|
329
|
-
from
|
|
330
|
+
from klayout_utils import (
|
|
330
331
|
technology,
|
|
331
332
|
get_streams,
|
|
332
333
|
get_schema
|
|
@@ -205,9 +205,10 @@ def __screenshot_montage(schema, view, xbins, ybins):
|
|
|
205
205
|
|
|
206
206
|
def main():
|
|
207
207
|
# SC_ROOT provided by CLI, and is only accessible when this is main module
|
|
208
|
-
sys.path.append(
|
|
208
|
+
sys.path.append(SC_KLAYOUT_ROOT) # noqa: F821
|
|
209
|
+
sys.path.append(SC_TOOLS_ROOT) # noqa: F821
|
|
209
210
|
|
|
210
|
-
from
|
|
211
|
+
from klayout_utils import (
|
|
211
212
|
technology,
|
|
212
213
|
get_schema
|
|
213
214
|
)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import os
|
|
1
2
|
from siliconcompiler import SiliconCompilerError
|
|
2
3
|
from siliconcompiler.tools.klayout.klayout import setup as setup_tool
|
|
4
|
+
from siliconcompiler.tools.klayout.klayout import runtime_options as runtime_options_tool
|
|
3
5
|
from siliconcompiler.tools._common import input_provides, get_tool_task
|
|
4
6
|
|
|
5
7
|
|
|
@@ -194,3 +196,9 @@ def setup(chip):
|
|
|
194
196
|
raise SiliconCompilerError('write requires a filename to save to', chip=chip)
|
|
195
197
|
chip.add('tool', tool, 'task', task, 'output', args,
|
|
196
198
|
step=step, index=index)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
def runtime_options(chip):
|
|
202
|
+
return runtime_options_tool(chip) + [
|
|
203
|
+
'-rd', f'SC_TOOLS_ROOT={os.path.dirname(os.path.dirname(__file__))}'
|
|
204
|
+
]
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
from siliconcompiler.tools.klayout import klayout
|
|
2
1
|
from siliconcompiler.tools.klayout.klayout import setup as setup_tool
|
|
3
2
|
from siliconcompiler.tools.klayout.show import general_gui_setup
|
|
4
3
|
from siliconcompiler.tools.klayout.show import pre_process as show_pre_process
|
|
4
|
+
from siliconcompiler.tools.klayout.show import runtime_options as show_runtime_options
|
|
5
5
|
from siliconcompiler.tools._common import get_tool_task
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def make_docs(chip):
|
|
9
|
+
from siliconcompiler.tools.klayout import klayout
|
|
9
10
|
klayout.make_docs(chip)
|
|
10
11
|
chip.set('tool', 'klayout', 'task', 'screenshot', 'var', 'show_filepath', '<path>')
|
|
11
12
|
|
|
@@ -98,3 +99,7 @@ def setup_gui_screenshot(chip, require_input=True):
|
|
|
98
99
|
for y in range(ybins):
|
|
99
100
|
chip.add('tool', tool, 'task', task, 'output', f'{design}_X{x}_Y{y}.png',
|
|
100
101
|
step=step, index=index)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def runtime_options(chip):
|
|
105
|
+
return show_runtime_options(chip)
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import shutil
|
|
3
3
|
|
|
4
|
-
from siliconcompiler.tools.klayout import klayout
|
|
5
4
|
from siliconcompiler.tools.klayout.klayout import setup as setup_tool
|
|
5
|
+
from siliconcompiler.tools.klayout.klayout import runtime_options as runtime_options_tool
|
|
6
6
|
from siliconcompiler.tools._common import find_incoming_ext, get_tool_task
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def make_docs(chip):
|
|
10
|
+
from siliconcompiler.tools.klayout import klayout
|
|
10
11
|
klayout.make_docs(chip)
|
|
11
12
|
chip.set('tool', 'klayout', 'task', 'show', 'var', 'show_filepath', '<path>')
|
|
12
13
|
|
|
@@ -99,3 +100,9 @@ def pre_process(chip):
|
|
|
99
100
|
ext_file = os.path.join(rel_path, f'{chip.top()}.{ext}')
|
|
100
101
|
if ext_file and os.path.exists(ext_file):
|
|
101
102
|
shutil.copy2(ext_file, f"inputs/{chip.top()}.{ext}")
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def runtime_options(chip):
|
|
106
|
+
return runtime_options_tool(chip) + [
|
|
107
|
+
'-rd', f'SC_TOOLS_ROOT={os.path.dirname(os.path.dirname(__file__))}'
|
|
108
|
+
]
|
|
@@ -13,7 +13,6 @@ import gzip
|
|
|
13
13
|
import shutil
|
|
14
14
|
import os
|
|
15
15
|
from siliconcompiler.tools._common import input_provides, get_tool_task
|
|
16
|
-
from siliconcompiler.targets import freepdk45_demo
|
|
17
16
|
from siliconcompiler import utils
|
|
18
17
|
|
|
19
18
|
|
|
@@ -21,6 +20,7 @@ from siliconcompiler import utils
|
|
|
21
20
|
# Make Docs
|
|
22
21
|
####################################################################
|
|
23
22
|
def make_docs(chip):
|
|
23
|
+
from siliconcompiler.targets import freepdk45_demo
|
|
24
24
|
chip.use(freepdk45_demo)
|
|
25
25
|
|
|
26
26
|
|
|
@@ -11,13 +11,13 @@ Sources: https://github.com/The-OpenROAD-Project/OpenROAD
|
|
|
11
11
|
Installation: https://github.com/The-OpenROAD-Project/OpenROAD
|
|
12
12
|
'''
|
|
13
13
|
from siliconcompiler.tools._common import get_tool_task
|
|
14
|
-
from siliconcompiler.targets import asap7_demo
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
####################################################################
|
|
18
17
|
# Make Docs
|
|
19
18
|
####################################################################
|
|
20
19
|
def make_docs(chip):
|
|
20
|
+
from siliconcompiler.targets import asap7_demo
|
|
21
21
|
chip.use(asap7_demo)
|
|
22
22
|
|
|
23
23
|
|
|
@@ -5,7 +5,7 @@ from siliconcompiler import utils
|
|
|
5
5
|
from siliconcompiler.tools._common import input_provides, add_common_file, \
|
|
6
6
|
get_tool_task, record_metric
|
|
7
7
|
from siliconcompiler.tools._common.asic import get_mainlib, set_tool_task_var, get_libraries, \
|
|
8
|
-
CellArea
|
|
8
|
+
CellArea, set_tool_task_lib_var
|
|
9
9
|
from siliconcompiler.tools.openroad import setup as tool_setup
|
|
10
10
|
|
|
11
11
|
|
|
@@ -811,7 +811,7 @@ def define_mpl_params(chip):
|
|
|
811
811
|
'macro placement ([x, y] in microns)')
|
|
812
812
|
|
|
813
813
|
set_tool_task_var(chip, param_key='rtlmp_enable',
|
|
814
|
-
default_value=
|
|
814
|
+
default_value=True,
|
|
815
815
|
schelp='true/false, enables the RTLMP macro placement')
|
|
816
816
|
set_tool_task_var(chip, param_key='rtlmp_min_instances',
|
|
817
817
|
schelp='minimum number of instances to use while clustering for '
|
|
@@ -894,6 +894,14 @@ def define_ord_params(chip):
|
|
|
894
894
|
require=['key'],
|
|
895
895
|
schelp='number of Y bins to use for heatmap image generation')
|
|
896
896
|
|
|
897
|
+
set_tool_task_lib_var(chip, param_key='scan_chain_cells',
|
|
898
|
+
default_value=None,
|
|
899
|
+
schelp='cells to use for scan chain insertion')
|
|
900
|
+
|
|
901
|
+
set_tool_task_lib_var(chip, param_key='multibit_ff_cells',
|
|
902
|
+
default_value=None,
|
|
903
|
+
schelp='multibit flipflop cells')
|
|
904
|
+
|
|
897
905
|
|
|
898
906
|
def define_ord_files(chip):
|
|
899
907
|
step = chip.get('arg', 'step')
|
|
@@ -1101,6 +1109,7 @@ def build_pex_corners(chip):
|
|
|
1101
1109
|
'inputs',
|
|
1102
1110
|
'sc_parasitics.tcl'),
|
|
1103
1111
|
step=step, index=index, clobber=True)
|
|
1112
|
+
chip.set('tool', tool, 'task', task, 'file', 'parasitics', False, field='copy')
|
|
1104
1113
|
|
|
1105
1114
|
with open(chip.get('tool', tool, 'task', task, 'file', 'parasitics',
|
|
1106
1115
|
step=step, index=index)[0], 'w') as f:
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
from siliconcompiler.tools._common import get_tool_task
|
|
2
2
|
from siliconcompiler.tools.openroad._apr import setup as apr_setup
|
|
3
|
-
from siliconcompiler.tools.openroad._apr import set_reports, set_pnr_inputs, set_pnr_outputs
|
|
3
|
+
from siliconcompiler.tools.openroad._apr import set_reports, set_pnr_inputs, set_pnr_outputs, \
|
|
4
|
+
set_tool_task_var
|
|
4
5
|
from siliconcompiler.tools.openroad._apr import \
|
|
5
6
|
define_ord_params, define_sta_params, define_sdc_params, \
|
|
6
|
-
define_gpl_params, define_grt_params, define_rsz_params
|
|
7
|
+
define_gpl_params, define_grt_params, define_rsz_params, \
|
|
8
|
+
define_ppl_params
|
|
7
9
|
from siliconcompiler.tools.openroad._apr import build_pex_corners, define_ord_files
|
|
8
10
|
from siliconcompiler.tools.openroad._apr import extract_metrics
|
|
9
11
|
|
|
@@ -35,6 +37,7 @@ def setup(chip):
|
|
|
35
37
|
define_gpl_params(chip)
|
|
36
38
|
define_grt_params(chip)
|
|
37
39
|
define_rsz_params(chip)
|
|
40
|
+
define_ppl_params(chip)
|
|
38
41
|
|
|
39
42
|
set_reports(chip, [
|
|
40
43
|
'setup',
|
|
@@ -48,6 +51,24 @@ def setup(chip):
|
|
|
48
51
|
'power_density'
|
|
49
52
|
])
|
|
50
53
|
|
|
54
|
+
set_tool_task_var(chip, param_key='enable_multibit_clustering',
|
|
55
|
+
default_value=False,
|
|
56
|
+
schelp='true/false, when true multibit clustering will be performed.')
|
|
57
|
+
|
|
58
|
+
set_tool_task_var(chip, param_key='enable_scan_chains',
|
|
59
|
+
default_value=False,
|
|
60
|
+
schelp='true/false, when true scan chains will be inserted.')
|
|
61
|
+
|
|
62
|
+
set_tool_task_var(chip, param_key='scan_enable_port_pattern',
|
|
63
|
+
schelp='pattern of the scan chain enable port.',
|
|
64
|
+
skip=['pdk', 'lib'])
|
|
65
|
+
set_tool_task_var(chip, param_key='scan_in_port_pattern',
|
|
66
|
+
schelp='pattern of the scan chain in port.',
|
|
67
|
+
skip=['pdk', 'lib'])
|
|
68
|
+
set_tool_task_var(chip, param_key='scan_out_port_pattern',
|
|
69
|
+
schelp='pattern of the scan chain out port.',
|
|
70
|
+
skip=['pdk', 'lib'])
|
|
71
|
+
|
|
51
72
|
|
|
52
73
|
def pre_process(chip):
|
|
53
74
|
define_ord_files(chip)
|
|
@@ -50,7 +50,7 @@ def setup(chip):
|
|
|
50
50
|
schelp='remove buffers inserted by synthesis')
|
|
51
51
|
|
|
52
52
|
set_tool_task_var(chip, param_key='remove_dead_logic',
|
|
53
|
-
default_value=
|
|
53
|
+
default_value=True,
|
|
54
54
|
schelp='remove logic which does not drive a primary output')
|
|
55
55
|
|
|
56
56
|
# Handle additional input files
|
|
@@ -17,6 +17,8 @@ source -echo "$sc_refdir/apr/preamble.tcl"
|
|
|
17
17
|
###############################
|
|
18
18
|
|
|
19
19
|
if { [llength [all_clocks]] > 0 } {
|
|
20
|
+
sc_set_dont_use -clock -report dont_use.clock_tree_synthesis
|
|
21
|
+
|
|
20
22
|
# Clone clock tree inverters next to register loads
|
|
21
23
|
# so cts does not try to buffer the inverted clocks.
|
|
22
24
|
repair_clock_inverters
|
|
@@ -50,6 +52,8 @@ if { [llength [all_clocks]] > 0 } {
|
|
|
50
52
|
sc_detailed_placement
|
|
51
53
|
|
|
52
54
|
global_connect
|
|
55
|
+
|
|
56
|
+
sc_set_dont_use
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
# estimate for metrics
|
|
@@ -11,16 +11,79 @@ source ./sc_manifest.tcl > /dev/null
|
|
|
11
11
|
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
12
12
|
source -echo "$sc_refdir/apr/preamble.tcl"
|
|
13
13
|
|
|
14
|
+
set dont_use_args []
|
|
15
|
+
|
|
16
|
+
if { [lindex [sc_cfg_tool_task_get var enable_scan_chains] 0] == "true" } {
|
|
17
|
+
lappend dont_use_args -scanchain
|
|
18
|
+
}
|
|
19
|
+
if { [lindex [sc_cfg_tool_task_get var enable_multibit_clustering] 0] == "true" } {
|
|
20
|
+
lappend dont_use_args -multibit
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
sc_set_dont_use {*}$dont_use_args -report dont_use.global_placement
|
|
24
|
+
|
|
25
|
+
###############################
|
|
26
|
+
# Scan Chain Preparation
|
|
27
|
+
###############################
|
|
28
|
+
|
|
29
|
+
if { [lindex [sc_cfg_tool_task_get var enable_scan_chains] 0] == "true" } {
|
|
30
|
+
set dft_args []
|
|
31
|
+
if { [sc_cfg_tool_task_get var scan_in_port_pattern] != [] } {
|
|
32
|
+
lappend dft_args -scan_in_name_pattern \
|
|
33
|
+
[lindex [sc_cfg_tool_task_get var scan_in_port_pattern] 0]
|
|
34
|
+
}
|
|
35
|
+
if { [sc_cfg_tool_task_get var scan_out_port_pattern] != [] } {
|
|
36
|
+
lappend dft_args -scan_out_name_pattern \
|
|
37
|
+
[lindex [sc_cfg_tool_task_get var scan_out_port_pattern] 0]
|
|
38
|
+
}
|
|
39
|
+
if { [sc_cfg_tool_task_get var scan_enable_port_pattern] != [] } {
|
|
40
|
+
lappend dft_args -scan_enable_name_pattern \
|
|
41
|
+
[lindex [sc_cfg_tool_task_get var scan_enable_port_pattern] 0]
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
set_dft_config -clock_mixing clock_mix {*}$dft_args
|
|
45
|
+
tee -file reports/scan_chain_config.rpt {report_dft_config}
|
|
46
|
+
scan_replace
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
###############################
|
|
50
|
+
# Perform multi-bit clustering
|
|
51
|
+
###############################
|
|
52
|
+
|
|
53
|
+
if { [lindex [sc_cfg_tool_task_get var enable_multibit_clustering] 0] == "true" } {
|
|
54
|
+
cluster_flops
|
|
55
|
+
}
|
|
56
|
+
|
|
14
57
|
###############################
|
|
15
58
|
# Global Placement
|
|
16
59
|
###############################
|
|
17
60
|
|
|
18
61
|
sc_global_placement
|
|
19
62
|
|
|
20
|
-
|
|
63
|
+
###############################
|
|
64
|
+
# Scan Chain Finalize
|
|
65
|
+
###############################
|
|
66
|
+
|
|
67
|
+
if { [lindex [sc_cfg_tool_task_get var enable_scan_chains] 0] == "true" } {
|
|
68
|
+
tee -file reports/scan_chain.rpt {preview_dft -verbose}
|
|
69
|
+
insert_dft
|
|
70
|
+
|
|
71
|
+
set new_ios [sc_get_unplaced_io_nets]
|
|
72
|
+
if { [llength $new_ios] > 0 } {
|
|
73
|
+
foreach net $new_ios {
|
|
74
|
+
utl::report "New IO net [$net getName]"
|
|
75
|
+
}
|
|
76
|
+
utl::warn FLW 1 "Scan chain generated new ports, rerunning pin placement"
|
|
77
|
+
sc_pin_placement
|
|
78
|
+
}
|
|
79
|
+
}
|
|
21
80
|
|
|
22
81
|
###############################
|
|
23
82
|
# Task Postamble
|
|
24
83
|
###############################
|
|
25
84
|
|
|
85
|
+
sc_set_dont_use
|
|
86
|
+
|
|
87
|
+
estimate_parasitics -placement
|
|
88
|
+
|
|
26
89
|
source -echo "$sc_refdir/apr/postamble.tcl"
|
|
@@ -28,6 +28,8 @@ estimate_parasitics -placement
|
|
|
28
28
|
# Repair DRVs
|
|
29
29
|
###############################
|
|
30
30
|
|
|
31
|
+
sc_set_dont_use -scanchain -multibit -report dont_use.repair_drv
|
|
32
|
+
|
|
31
33
|
set repair_design_args []
|
|
32
34
|
|
|
33
35
|
set rsz_cap_margin [lindex [sc_cfg_tool_task_get {var} rsz_cap_margin] 0]
|
|
@@ -43,6 +45,8 @@ repair_design \
|
|
|
43
45
|
-verbose \
|
|
44
46
|
{*}$repair_design_args
|
|
45
47
|
|
|
48
|
+
sc_set_dont_use
|
|
49
|
+
|
|
46
50
|
###############################
|
|
47
51
|
# Tie-off cell insertion
|
|
48
52
|
###############################
|
|
@@ -34,6 +34,9 @@ if { [lindex [sc_cfg_tool_task_get var rsz_skip_setup_repair] 0] != "true" } {
|
|
|
34
34
|
# Setup Repair
|
|
35
35
|
###############################
|
|
36
36
|
|
|
37
|
+
# Enable ffs for resizing
|
|
38
|
+
sc_set_dont_use -scanchain -multibit -report dont_use.repair_timing.setup
|
|
39
|
+
|
|
37
40
|
estimate_parasitics -placement
|
|
38
41
|
|
|
39
42
|
repair_timing \
|
|
@@ -45,6 +48,9 @@ if { [lindex [sc_cfg_tool_task_get var rsz_skip_setup_repair] 0] != "true" } {
|
|
|
45
48
|
{*}$repair_timing_args
|
|
46
49
|
|
|
47
50
|
sc_detailed_placement
|
|
51
|
+
|
|
52
|
+
# Restore dont use
|
|
53
|
+
sc_set_dont_use
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
if { [lindex [sc_cfg_tool_task_get var rsz_skip_hold_repair] 0] != "true" } {
|
|
@@ -55,7 +61,7 @@ if { [lindex [sc_cfg_tool_task_get var rsz_skip_hold_repair] 0] != "true" } {
|
|
|
55
61
|
estimate_parasitics -placement
|
|
56
62
|
|
|
57
63
|
# Enable hold cells
|
|
58
|
-
|
|
64
|
+
sc_set_dont_use -hold -scanchain -multibit -report dont_use.repair_timing.hold
|
|
59
65
|
|
|
60
66
|
repair_timing \
|
|
61
67
|
-hold \
|
|
@@ -68,7 +74,7 @@ if { [lindex [sc_cfg_tool_task_get var rsz_skip_hold_repair] 0] != "true" } {
|
|
|
68
74
|
sc_detailed_placement
|
|
69
75
|
|
|
70
76
|
# Restore dont use
|
|
71
|
-
|
|
77
|
+
sc_set_dont_use
|
|
72
78
|
}
|
|
73
79
|
|
|
74
80
|
global_connect
|