siliconcompiler 0.34.0__py3-none-any.whl → 0.34.1__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.
Files changed (88) hide show
  1. siliconcompiler/_metadata.py +1 -1
  2. siliconcompiler/apps/_common.py +1 -1
  3. siliconcompiler/apps/sc.py +1 -1
  4. siliconcompiler/apps/sc_issue.py +1 -1
  5. siliconcompiler/apps/sc_remote.py +3 -3
  6. siliconcompiler/apps/sc_show.py +2 -2
  7. siliconcompiler/apps/utils/replay.py +4 -4
  8. siliconcompiler/checklist.py +203 -2
  9. siliconcompiler/core.py +28 -246
  10. siliconcompiler/data/templates/email/general.j2 +3 -3
  11. siliconcompiler/data/templates/email/summary.j2 +1 -1
  12. siliconcompiler/data/templates/issue/README.txt +1 -1
  13. siliconcompiler/data/templates/report/sc_report.j2 +7 -7
  14. siliconcompiler/design.py +148 -54
  15. siliconcompiler/flowgraph.py +50 -15
  16. siliconcompiler/optimizer/vizier.py +2 -2
  17. siliconcompiler/pdk.py +5 -5
  18. siliconcompiler/remote/client.py +18 -12
  19. siliconcompiler/remote/server.py +2 -2
  20. siliconcompiler/report/dashboard/cli/__init__.py +6 -6
  21. siliconcompiler/report/dashboard/cli/board.py +3 -3
  22. siliconcompiler/report/dashboard/web/components/__init__.py +5 -5
  23. siliconcompiler/report/dashboard/web/components/flowgraph.py +4 -4
  24. siliconcompiler/report/dashboard/web/components/graph.py +2 -2
  25. siliconcompiler/report/dashboard/web/state.py +1 -1
  26. siliconcompiler/report/dashboard/web/utils/__init__.py +5 -5
  27. siliconcompiler/report/html_report.py +1 -1
  28. siliconcompiler/report/report.py +4 -4
  29. siliconcompiler/report/summary_table.py +2 -2
  30. siliconcompiler/report/utils.py +5 -5
  31. siliconcompiler/scheduler/docker.py +3 -8
  32. siliconcompiler/scheduler/run_node.py +2 -7
  33. siliconcompiler/scheduler/scheduler.py +14 -11
  34. siliconcompiler/scheduler/schedulernode.py +136 -126
  35. siliconcompiler/scheduler/send_messages.py +3 -3
  36. siliconcompiler/scheduler/slurm.py +5 -3
  37. siliconcompiler/scheduler/taskscheduler.py +8 -7
  38. siliconcompiler/schema/baseschema.py +1 -2
  39. siliconcompiler/schema/namedschema.py +26 -2
  40. siliconcompiler/tool.py +398 -175
  41. siliconcompiler/tools/__init__.py +2 -0
  42. siliconcompiler/tools/builtin/_common.py +5 -5
  43. siliconcompiler/tools/builtin/concatenate.py +5 -5
  44. siliconcompiler/tools/builtin/minimum.py +4 -4
  45. siliconcompiler/tools/builtin/mux.py +4 -4
  46. siliconcompiler/tools/builtin/nop.py +4 -4
  47. siliconcompiler/tools/builtin/verify.py +7 -7
  48. siliconcompiler/tools/execute/exec_input.py +1 -1
  49. siliconcompiler/tools/genfasm/genfasm.py +1 -6
  50. siliconcompiler/tools/openroad/_apr.py +5 -1
  51. siliconcompiler/tools/openroad/antenna_repair.py +1 -1
  52. siliconcompiler/tools/openroad/macro_placement.py +1 -1
  53. siliconcompiler/tools/openroad/power_grid.py +1 -1
  54. siliconcompiler/tools/openroad/scripts/common/procs.tcl +5 -0
  55. siliconcompiler/tools/opensta/timing.py +26 -3
  56. siliconcompiler/tools/slang/__init__.py +2 -2
  57. siliconcompiler/tools/surfer/__init__.py +0 -0
  58. siliconcompiler/tools/surfer/show.py +53 -0
  59. siliconcompiler/tools/surfer/surfer.py +30 -0
  60. siliconcompiler/tools/vpr/route.py +27 -14
  61. siliconcompiler/tools/vpr/vpr.py +23 -6
  62. siliconcompiler/tools/yosys/__init__.py +1 -1
  63. siliconcompiler/tools/yosys/scripts/procs.tcl +143 -0
  64. siliconcompiler/tools/yosys/{sc_synth_asic.tcl → scripts/sc_synth_asic.tcl} +4 -0
  65. siliconcompiler/tools/yosys/{sc_synth_fpga.tcl → scripts/sc_synth_fpga.tcl} +24 -77
  66. siliconcompiler/tools/yosys/syn_fpga.py +14 -0
  67. siliconcompiler/toolscripts/_tools.json +8 -12
  68. siliconcompiler/toolscripts/rhel9/install-vpr.sh +0 -2
  69. siliconcompiler/toolscripts/ubuntu22/install-surfer.sh +33 -0
  70. siliconcompiler/toolscripts/ubuntu24/install-surfer.sh +33 -0
  71. siliconcompiler/utils/__init__.py +2 -1
  72. siliconcompiler/utils/flowgraph.py +24 -23
  73. siliconcompiler/utils/issue.py +23 -29
  74. siliconcompiler/utils/logging.py +35 -6
  75. siliconcompiler/utils/showtools.py +6 -1
  76. {siliconcompiler-0.34.0.dist-info → siliconcompiler-0.34.1.dist-info}/METADATA +15 -25
  77. {siliconcompiler-0.34.0.dist-info → siliconcompiler-0.34.1.dist-info}/RECORD +84 -82
  78. siliconcompiler/tools/yosys/procs.tcl +0 -71
  79. siliconcompiler/toolscripts/rhel9/install-yosys-parmys.sh +0 -68
  80. siliconcompiler/toolscripts/ubuntu22/install-yosys-parmys.sh +0 -68
  81. siliconcompiler/toolscripts/ubuntu24/install-yosys-parmys.sh +0 -68
  82. /siliconcompiler/tools/yosys/{sc_lec.tcl → scripts/sc_lec.tcl} +0 -0
  83. /siliconcompiler/tools/yosys/{sc_screenshot.tcl → scripts/sc_screenshot.tcl} +0 -0
  84. /siliconcompiler/tools/yosys/{syn_strategies.tcl → scripts/syn_strategies.tcl} +0 -0
  85. {siliconcompiler-0.34.0.dist-info → siliconcompiler-0.34.1.dist-info}/WHEEL +0 -0
  86. {siliconcompiler-0.34.0.dist-info → siliconcompiler-0.34.1.dist-info}/entry_points.txt +0 -0
  87. {siliconcompiler-0.34.0.dist-info → siliconcompiler-0.34.1.dist-info}/licenses/LICENSE +0 -0
  88. {siliconcompiler-0.34.0.dist-info → siliconcompiler-0.34.1.dist-info}/top_level.txt +0 -0
@@ -41,7 +41,7 @@ def generate_testcase(chip,
41
41
  sc_type = chip.get(*key, field='type')
42
42
  if 'file' not in sc_type and 'dir' not in sc_type:
43
43
  continue
44
- for _, key_step, key_index in chip.schema.get(*key, field=None).getvalues():
44
+ for _, key_step, key_index in chip.get(*key, field=None).getvalues():
45
45
  chip.hash_files(*key,
46
46
  check=False,
47
47
  allow_cache=True,
@@ -145,7 +145,6 @@ def generate_testcase(chip,
145
145
  chip.collect(directory=collection_dir, verbose=verbose_collect)
146
146
 
147
147
  # Set relative path to generate runnable files
148
- chip._relative_path = new_work_dir
149
148
  chip.cwd = issue_dir.name
150
149
 
151
150
  current_work_dir = os.getcwd()
@@ -153,33 +152,28 @@ def generate_testcase(chip,
153
152
 
154
153
  flow = chip.get('option', 'flow')
155
154
 
156
- task_class = chip.get("tool", tool, field="schema")
155
+ task_class = chip.get("tool", tool, "task", task, field="schema")
157
156
 
158
- task_class.set_runtime(chip, step=step, index=index)
157
+ with task_class.runtime(chip, step=step, index=index, relpath=new_work_dir) as task:
158
+ # Rewrite replay.sh
159
+ prev_quiet = chip.get('option', 'quiet', step=step, index=index)
160
+ chip.set('option', 'quiet', True, step=step, index=index)
161
+ try:
162
+ # Rerun pre_process
163
+ task.pre_process()
164
+ except Exception:
165
+ pass
166
+ chip.set('option', 'quiet', prev_quiet, step=step, index=index)
159
167
 
160
- # Rewrite replay.sh
161
- prev_quiet = chip.get('option', 'quiet', step=step, index=index)
162
- chip.set('option', 'quiet', True, step=step, index=index)
163
- try:
164
- # Rerun pre_process
165
- task_class.pre_process()
166
- except Exception:
167
- pass
168
- chip.set('option', 'quiet', prev_quiet, step=step, index=index)
169
-
170
- is_python_tool = task_class.get_exe() is None
171
-
172
- if not is_python_tool:
173
- task_class.generate_replay_script(
174
- f'{chip.getworkdir(step=step, index=index)}/replay.sh',
175
- '.',
176
- include_path=False)
177
-
178
- # Rewrite tool manifest
179
- task_class.write_task_manifest('.')
168
+ is_python_tool = task.get_exe() is None
169
+ if not is_python_tool:
170
+ task.generate_replay_script(
171
+ f'{chip.getworkdir(step=step, index=index)}/replay.sh',
172
+ '.',
173
+ include_path=False)
180
174
 
181
- # Restore normal path behavior
182
- chip._relative_path = None
175
+ # Rewrite tool manifest
176
+ task.write_task_manifest('.')
183
177
 
184
178
  # Restore current directory
185
179
  chip.cwd = original_cwd
@@ -234,7 +228,7 @@ def generate_testcase(chip,
234
228
  design = chip.design
235
229
  job = chip.get('option', 'jobname')
236
230
  file_time = datetime.fromtimestamp(issue_time).strftime('%Y%m%d-%H%M%S')
237
- archive_name = f'sc_issue_{design}_{job}_{step}{index}_{file_time}.tar.gz'
231
+ archive_name = f'sc_issue_{design}_{job}_{step}_{index}_{file_time}.tar.gz'
238
232
 
239
233
  # Make support files
240
234
  issue_path = os.path.join(issue_dir.name, 'issue.json')
@@ -254,7 +248,7 @@ def generate_testcase(chip,
254
248
  with open(run_path, 'w') as f:
255
249
  replay_dir = os.path.relpath(chip.getworkdir(step=step, index=index),
256
250
  chip.cwd)
257
- issue_title = f'{chip.design} for {step}{index} using {tool}/{task}'
251
+ issue_title = f'{chip.design} for {step}/{index} using {tool}/{task}'
258
252
  f.write(get_file_template('issue/run.sh').render(
259
253
  title=issue_title,
260
254
  exec_dir=replay_dir
@@ -288,7 +282,7 @@ def generate_testcase(chip,
288
282
 
289
283
  issue_dir.cleanup()
290
284
 
291
- chip.logger.info(f'Generated testcase for {step}{index} in: '
285
+ chip.logger.info(f'Generated testcase for {step}/{index} in: '
292
286
  f'{full_archive_path}')
293
287
 
294
288
  # Restore original schema
@@ -43,7 +43,7 @@ class SCInRunLoggerFormatter(logging.Formatter):
43
43
 
44
44
  flow = chip.get('option', 'flow')
45
45
  if flow:
46
- nodes_to_run = list(chip.schema.get("flowgraph", flow, field="schema").get_nodes())
46
+ nodes_to_run = list(chip.get("flowgraph", flow, field="schema").get_nodes())
47
47
  else:
48
48
  nodes_to_run = []
49
49
 
@@ -108,14 +108,43 @@ class SCColorLoggerFormatter(logging.Formatter):
108
108
  return log_fmt.format(record)
109
109
 
110
110
  @staticmethod
111
- def supports_color(handler):
112
- if type(handler) is not logging.StreamHandler:
113
- return False
114
-
111
+ def supports_color(stream):
115
112
  supported_platform = sys.platform != 'win32'
116
113
  try:
117
- is_a_tty = hasattr(handler.stream, 'isatty') and handler.stream.isatty()
114
+ is_a_tty = hasattr(stream, 'isatty') and stream.isatty()
118
115
  except: # noqa E722
119
116
  is_a_tty = False
120
117
 
121
118
  return supported_platform and is_a_tty
119
+
120
+
121
+ def get_console_formatter(chip, in_run, step, index):
122
+ if not hasattr(chip, "schema"):
123
+ return SCLoggerFormatter()
124
+
125
+ loglevel = chip.schema.get('option', 'loglevel',
126
+ step=step, index=index)
127
+
128
+ if loglevel == 'quiet':
129
+ base_format = SCBlankLoggerFormatter()
130
+ elif in_run:
131
+ if loglevel == 'debug':
132
+ base_format = SCDebugInRunLoggerFormatter(
133
+ chip,
134
+ chip.get('option', 'jobname'),
135
+ step, index)
136
+ else:
137
+ base_format = SCInRunLoggerFormatter(
138
+ chip,
139
+ chip.get('option', 'jobname'),
140
+ step, index)
141
+ else:
142
+ if loglevel == 'debug':
143
+ base_format = SCDebugLoggerFormatter()
144
+ else:
145
+ base_format = SCLoggerFormatter()
146
+
147
+ support_color = SCColorLoggerFormatter.supports_color(sys.stdout)
148
+ if support_color:
149
+ return SCColorLoggerFormatter(base_format)
150
+ return base_format
@@ -6,8 +6,10 @@ from siliconcompiler.tools.vpr import show as vpr_show
6
6
  from siliconcompiler.tools.vpr import screenshot as vpr_screenshot
7
7
  from siliconcompiler.tools.yosys import screenshot as yosys_screenshot
8
8
  from siliconcompiler.tools.gtkwave import show as gtkwave_show
9
+ from siliconcompiler.tools.surfer import show as surfer_show
9
10
  from siliconcompiler.tools.graphviz import show as graphviz_show
10
11
  from siliconcompiler.tools.graphviz import screenshot as graphviz_screenshot
12
+ from shutil import which
11
13
 
12
14
 
13
15
  def setup(chip):
@@ -33,7 +35,10 @@ def setup(chip):
33
35
  chip.register_showtool('v', yosys_screenshot)
34
36
  chip.register_showtool('vg', yosys_screenshot)
35
37
 
36
- chip.register_showtool('vcd', gtkwave_show)
38
+ if which('surfer') is not None:
39
+ chip.register_showtool('vcd', surfer_show)
40
+ else:
41
+ chip.register_showtool('vcd', gtkwave_show)
37
42
 
38
43
  chip.register_showtool('dot', graphviz_show)
39
44
  chip.register_showtool('dot', graphviz_screenshot)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: siliconcompiler
3
- Version: 0.34.0
3
+ Version: 0.34.1
4
4
  Summary: A compiler framework that automates translation from source code to silicon.
5
5
  Author-email: Andreas Olofsson <andreas.d.olofsson@gmail.com>
6
6
  License: Apache License 2.0
@@ -11,7 +11,6 @@ Project-URL: Issues, https://github.com/siliconcompiler/siliconcompiler/issues
11
11
  Project-URL: Discussion, https://github.com/siliconcompiler/siliconcompiler/discussions
12
12
  Classifier: Environment :: Console
13
13
  Classifier: License :: OSI Approved :: Apache Software License
14
- Classifier: Programming Language :: Python :: 3.8
15
14
  Classifier: Programming Language :: Python :: 3.9
16
15
  Classifier: Programming Language :: Python :: 3.10
17
16
  Classifier: Programming Language :: Python :: 3.11
@@ -22,21 +21,19 @@ Classifier: Operating System :: MacOS
22
21
  Classifier: Operating System :: Microsoft :: Windows
23
22
  Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
24
23
  Classifier: Topic :: Software Development :: Build Tools
25
- Requires-Python: >=3.8
24
+ Requires-Python: >=3.9
26
25
  Description-Content-Type: text/markdown
27
26
  License-File: LICENSE
28
- Requires-Dist: aiohttp==3.10.11; python_version <= "3.8"
29
- Requires-Dist: aiohttp<3.13.0,>=3.10.11; python_version >= "3.9"
27
+ Requires-Dist: aiohttp<3.13.0,>=3.10.11
30
28
  Requires-Dist: requests==2.32.4
31
29
  Requires-Dist: PyYAML==6.0.2
32
30
  Requires-Dist: pandas>=1.1.5
33
31
  Requires-Dist: Jinja2>=2.11.3
34
- Requires-Dist: graphviz==0.20.3
32
+ Requires-Dist: graphviz==0.21
35
33
  Requires-Dist: distro==1.9.0
36
34
  Requires-Dist: packaging<25,>=21.3
37
35
  Requires-Dist: psutil>=5.8.0
38
- Requires-Dist: Pillow==10.4.0; python_version <= "3.8"
39
- Requires-Dist: Pillow==11.2.1; python_version >= "3.9"
36
+ Requires-Dist: Pillow==11.3.0
40
37
  Requires-Dist: GitPython==3.1.44
41
38
  Requires-Dist: lambdapdk>=0.1.47
42
39
  Requires-Dist: PyGithub==2.6.1
@@ -45,33 +42,26 @@ Requires-Dist: fasteners==0.19
45
42
  Requires-Dist: fastjsonschema==2.21.1
46
43
  Requires-Dist: docker==7.1.0
47
44
  Requires-Dist: importlib_metadata; python_version < "3.10"
48
- Requires-Dist: orjson==3.10.15; python_version <= "3.8"
49
- Requires-Dist: orjson==3.10.18; python_version >= "3.9"
45
+ Requires-Dist: orjson==3.10.18
50
46
  Requires-Dist: pyslang==8.1.0
51
- Requires-Dist: streamlit==1.40.1; python_version <= "3.8"
52
- Requires-Dist: streamlit==1.45.1; python_version >= "3.9" and python_full_version != "3.9.7"
47
+ Requires-Dist: streamlit==1.46.1; python_full_version != "3.9.7"
53
48
  Requires-Dist: streamlit_agraph==0.0.45; python_full_version != "3.9.7"
54
49
  Requires-Dist: streamlit-antd-components==0.3.2; python_full_version != "3.9.7"
55
50
  Requires-Dist: streamlit_javascript==0.1.5; python_full_version != "3.9.7"
56
51
  Requires-Dist: streamlit-autorefresh==1.0.1; python_full_version != "3.9.7"
57
- Requires-Dist: rich==13.9.4; python_version <= "3.8"
58
- Requires-Dist: rich<15.0.0,>=14.0.0; python_version >= "3.9"
52
+ Requires-Dist: rich<15.0.0,>=14.0.0
59
53
  Provides-Extra: test
60
- Requires-Dist: pytest==8.3.5; python_version <= "3.8" and extra == "test"
61
- Requires-Dist: pytest==8.4.0; python_version >= "3.9" and extra == "test"
62
- Requires-Dist: pytest-xdist==3.6.1; python_version <= "3.8" and extra == "test"
63
- Requires-Dist: pytest-xdist==3.7.0; python_version >= "3.9" and extra == "test"
54
+ Requires-Dist: pytest==8.4.1; extra == "test"
55
+ Requires-Dist: pytest-xdist==3.8.0; extra == "test"
64
56
  Requires-Dist: pytest-timeout==2.4.0; extra == "test"
65
- Requires-Dist: pytest-asyncio==0.24.0; python_version <= "3.8" and extra == "test"
66
- Requires-Dist: pytest-asyncio==0.26.0; python_version >= "3.9" and extra == "test"
67
- Requires-Dist: pytest-cov==5.0.0; python_version <= "3.8" and extra == "test"
68
- Requires-Dist: pytest-cov==6.1.1; python_version >= "3.9" and extra == "test"
57
+ Requires-Dist: pytest-asyncio==1.0.0; extra == "test"
58
+ Requires-Dist: pytest-cov==6.2.1; extra == "test"
69
59
  Requires-Dist: responses==0.25.7; extra == "test"
70
60
  Requires-Dist: PyVirtualDisplay==3.0; extra == "test"
71
61
  Requires-Dist: logiklib==0.1.0; extra == "test"
72
62
  Provides-Extra: lint
73
- Requires-Dist: flake8==7.2.0; extra == "lint"
74
- Requires-Dist: tclint==0.5.4; extra == "lint"
63
+ Requires-Dist: flake8==7.3.0; extra == "lint"
64
+ Requires-Dist: tclint==0.6.0; extra == "lint"
75
65
  Requires-Dist: codespell==2.4.1; extra == "lint"
76
66
  Provides-Extra: docs
77
67
  Requires-Dist: Sphinx==8.2.3; extra == "docs"
@@ -115,7 +105,7 @@ SiliconCompiler is a modular hardware build system ("make for silicon"). The pro
115
105
  # Getting Started
116
106
 
117
107
  SiliconCompiler is available as wheel packages on PyPI for macOS, Windows and
118
- Linux platforms. For working Python 3.8-3.13 environment, just use pip.
108
+ Linux platforms. For working Python 3.9-3.13 environment, just use pip.
119
109
 
120
110
  ```sh
121
111
  python3 -m pip install --upgrade siliconcompiler