siliconcompiler 0.34.2__py3-none-any.whl → 0.34.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- siliconcompiler/__init__.py +12 -5
- siliconcompiler/__main__.py +1 -7
- siliconcompiler/_metadata.py +1 -1
- siliconcompiler/apps/_common.py +104 -23
- siliconcompiler/apps/sc.py +4 -8
- siliconcompiler/apps/sc_dashboard.py +6 -4
- siliconcompiler/apps/sc_install.py +10 -6
- siliconcompiler/apps/sc_issue.py +7 -5
- siliconcompiler/apps/sc_remote.py +1 -1
- siliconcompiler/apps/sc_server.py +9 -14
- siliconcompiler/apps/sc_show.py +6 -5
- siliconcompiler/apps/smake.py +130 -94
- siliconcompiler/apps/utils/replay.py +4 -7
- siliconcompiler/apps/utils/summarize.py +3 -5
- siliconcompiler/asic.py +420 -0
- siliconcompiler/checklist.py +25 -2
- siliconcompiler/cmdlineschema.py +534 -0
- siliconcompiler/constraints/asic_component.py +2 -2
- siliconcompiler/constraints/asic_pins.py +2 -2
- siliconcompiler/constraints/asic_timing.py +3 -3
- siliconcompiler/core.py +7 -32
- siliconcompiler/data/templates/tcl/manifest.tcl.j2 +8 -0
- siliconcompiler/dependencyschema.py +89 -31
- siliconcompiler/design.py +176 -207
- siliconcompiler/filesetschema.py +250 -0
- siliconcompiler/flowgraph.py +274 -95
- siliconcompiler/fpga.py +124 -1
- siliconcompiler/library.py +218 -20
- siliconcompiler/metric.py +233 -20
- siliconcompiler/package/__init__.py +271 -50
- siliconcompiler/package/git.py +92 -16
- siliconcompiler/package/github.py +108 -12
- siliconcompiler/package/https.py +79 -16
- siliconcompiler/packageschema.py +88 -7
- siliconcompiler/pathschema.py +31 -2
- siliconcompiler/pdk.py +566 -1
- siliconcompiler/project.py +1095 -94
- siliconcompiler/record.py +38 -1
- siliconcompiler/remote/__init__.py +5 -2
- siliconcompiler/remote/client.py +11 -6
- siliconcompiler/remote/schema.py +5 -23
- siliconcompiler/remote/server.py +41 -54
- siliconcompiler/report/__init__.py +3 -3
- siliconcompiler/report/dashboard/__init__.py +48 -14
- siliconcompiler/report/dashboard/cli/__init__.py +99 -21
- siliconcompiler/report/dashboard/cli/board.py +364 -179
- siliconcompiler/report/dashboard/web/__init__.py +90 -12
- siliconcompiler/report/dashboard/web/components/__init__.py +219 -240
- siliconcompiler/report/dashboard/web/components/flowgraph.py +49 -26
- siliconcompiler/report/dashboard/web/components/graph.py +139 -100
- siliconcompiler/report/dashboard/web/layouts/__init__.py +29 -1
- siliconcompiler/report/dashboard/web/layouts/_common.py +38 -2
- siliconcompiler/report/dashboard/web/layouts/vertical_flowgraph.py +39 -26
- siliconcompiler/report/dashboard/web/layouts/vertical_flowgraph_node_tab.py +50 -50
- siliconcompiler/report/dashboard/web/layouts/vertical_flowgraph_sac_tabs.py +49 -46
- siliconcompiler/report/dashboard/web/state.py +141 -14
- siliconcompiler/report/dashboard/web/utils/__init__.py +79 -16
- siliconcompiler/report/dashboard/web/utils/file_utils.py +74 -11
- siliconcompiler/report/dashboard/web/viewer.py +25 -1
- siliconcompiler/report/report.py +5 -2
- siliconcompiler/report/summary_image.py +29 -11
- siliconcompiler/scheduler/__init__.py +9 -1
- siliconcompiler/scheduler/docker.py +79 -1
- siliconcompiler/scheduler/run_node.py +35 -19
- siliconcompiler/scheduler/scheduler.py +208 -24
- siliconcompiler/scheduler/schedulernode.py +372 -46
- siliconcompiler/scheduler/send_messages.py +77 -29
- siliconcompiler/scheduler/slurm.py +76 -12
- siliconcompiler/scheduler/taskscheduler.py +140 -20
- siliconcompiler/schema/__init__.py +0 -2
- siliconcompiler/schema/baseschema.py +194 -38
- siliconcompiler/schema/journal.py +7 -4
- siliconcompiler/schema/namedschema.py +16 -10
- siliconcompiler/schema/parameter.py +55 -9
- siliconcompiler/schema/parametervalue.py +60 -0
- siliconcompiler/schema/safeschema.py +25 -2
- siliconcompiler/schema/schema_cfg.py +5 -5
- siliconcompiler/schema/utils.py +2 -2
- siliconcompiler/schema_obj.py +20 -3
- siliconcompiler/tool.py +979 -302
- siliconcompiler/tools/bambu/__init__.py +41 -0
- siliconcompiler/tools/builtin/concatenate.py +2 -2
- siliconcompiler/tools/builtin/minimum.py +2 -1
- siliconcompiler/tools/builtin/mux.py +2 -1
- siliconcompiler/tools/builtin/nop.py +2 -1
- siliconcompiler/tools/builtin/verify.py +2 -1
- siliconcompiler/tools/klayout/__init__.py +95 -0
- siliconcompiler/tools/openroad/__init__.py +289 -0
- siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +3 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +7 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +8 -4
- siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +9 -5
- siliconcompiler/tools/openroad/scripts/common/write_images.tcl +5 -1
- siliconcompiler/tools/slang/__init__.py +1 -1
- siliconcompiler/tools/slang/elaborate.py +2 -1
- siliconcompiler/tools/vivado/scripts/sc_run.tcl +1 -1
- siliconcompiler/tools/vivado/scripts/sc_syn_fpga.tcl +8 -1
- siliconcompiler/tools/vivado/syn_fpga.py +6 -0
- siliconcompiler/tools/vivado/vivado.py +35 -2
- siliconcompiler/tools/vpr/__init__.py +150 -0
- siliconcompiler/tools/yosys/__init__.py +369 -1
- siliconcompiler/tools/yosys/scripts/procs.tcl +0 -1
- siliconcompiler/toolscripts/_tools.json +5 -10
- siliconcompiler/utils/__init__.py +66 -0
- siliconcompiler/utils/flowgraph.py +2 -2
- siliconcompiler/utils/issue.py +2 -1
- siliconcompiler/utils/logging.py +14 -0
- siliconcompiler/utils/multiprocessing.py +256 -0
- siliconcompiler/utils/showtools.py +10 -0
- {siliconcompiler-0.34.2.dist-info → siliconcompiler-0.34.3.dist-info}/METADATA +5 -5
- {siliconcompiler-0.34.2.dist-info → siliconcompiler-0.34.3.dist-info}/RECORD +115 -118
- {siliconcompiler-0.34.2.dist-info → siliconcompiler-0.34.3.dist-info}/entry_points.txt +3 -0
- siliconcompiler/schema/cmdlineschema.py +0 -250
- siliconcompiler/toolscripts/rhel8/install-slang.sh +0 -40
- siliconcompiler/toolscripts/rhel9/install-slang.sh +0 -40
- siliconcompiler/toolscripts/ubuntu20/install-slang.sh +0 -47
- siliconcompiler/toolscripts/ubuntu22/install-slang.sh +0 -37
- siliconcompiler/toolscripts/ubuntu24/install-slang.sh +0 -37
- {siliconcompiler-0.34.2.dist-info → siliconcompiler-0.34.3.dist-info}/WHEEL +0 -0
- {siliconcompiler-0.34.2.dist-info → siliconcompiler-0.34.3.dist-info}/licenses/LICENSE +0 -0
- {siliconcompiler-0.34.2.dist-info → siliconcompiler-0.34.3.dist-info}/top_level.txt +0 -0
|
@@ -1,45 +1,103 @@
|
|
|
1
|
+
import atexit
|
|
2
|
+
|
|
1
3
|
from siliconcompiler.report.dashboard import AbstractDashboard
|
|
2
|
-
from siliconcompiler.report.dashboard.cli.board import Board
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
class CliDashboard(AbstractDashboard):
|
|
7
|
+
"""
|
|
8
|
+
A command-line interface (CLI) implementation of the AbstractDashboard.
|
|
9
|
+
|
|
10
|
+
This class provides a concrete dashboard that renders progress and logs
|
|
11
|
+
directly in the terminal. It acts as a bridge between the core `chip` object
|
|
12
|
+
and the `Board` class, which handles the actual `rich`-based rendering.
|
|
13
|
+
|
|
14
|
+
It manages the lifecycle of the dashboard, including starting, stopping,
|
|
15
|
+
and updating it with data from the chip. A key feature is its ability to
|
|
16
|
+
"hijack" the standard logger to redirect log messages to its own display area.
|
|
17
|
+
|
|
18
|
+
Attributes:
|
|
19
|
+
_dashboard: An instance of the underlying `Board` class that manages
|
|
20
|
+
the `rich` live display.
|
|
21
|
+
_logger: The `logging.Logger` instance associated with the dashboard.
|
|
22
|
+
__logger_console: A private attribute to store the original console
|
|
23
|
+
handler of the logger before it's replaced.
|
|
24
|
+
"""
|
|
6
25
|
|
|
7
26
|
def __init__(self, chip):
|
|
27
|
+
"""
|
|
28
|
+
Initializes the CliDashboard.
|
|
29
|
+
|
|
30
|
+
Args:
|
|
31
|
+
chip: The SiliconCompiler chip object this dashboard is associated with.
|
|
32
|
+
"""
|
|
33
|
+
from siliconcompiler.utils.multiprocessing import MPManager
|
|
34
|
+
|
|
8
35
|
super().__init__(chip)
|
|
9
36
|
|
|
10
|
-
self._dashboard =
|
|
37
|
+
self._dashboard = MPManager.get_dashboard()
|
|
11
38
|
|
|
12
39
|
self.__logger_console = None
|
|
13
40
|
|
|
14
|
-
self._logger =
|
|
41
|
+
self._logger = None
|
|
42
|
+
|
|
43
|
+
if self.is_running():
|
|
44
|
+
# Attach logger when already running
|
|
45
|
+
self.set_logger(self._chip.logger)
|
|
46
|
+
|
|
47
|
+
# Ensure the dashboard is properly stopped on program exit
|
|
48
|
+
self.__exit_registered = True
|
|
49
|
+
atexit.register(self.stop)
|
|
15
50
|
|
|
16
51
|
def set_logger(self, logger):
|
|
17
52
|
"""
|
|
18
|
-
Sets the logger for the dashboard.
|
|
53
|
+
Sets the logger for the dashboard and hijacks its console handler.
|
|
54
|
+
|
|
55
|
+
This method replaces the chip's default console log handler with one
|
|
56
|
+
that directs log messages to the dashboard's internal log buffer.
|
|
57
|
+
The original handler is saved so it can be restored later.
|
|
19
58
|
|
|
20
59
|
Args:
|
|
21
|
-
logger (logging.Logger): The logger to
|
|
60
|
+
logger (logging.Logger): The logger instance to attach to.
|
|
22
61
|
"""
|
|
62
|
+
if self._logger == logger:
|
|
63
|
+
return
|
|
64
|
+
|
|
23
65
|
self._logger = logger
|
|
24
66
|
if self._logger and self._dashboard._active:
|
|
25
|
-
# Hijack the console
|
|
67
|
+
# Hijack the console handler to redirect logs to the dashboard
|
|
26
68
|
self._logger.removeHandler(self._chip._logger_console)
|
|
27
69
|
self.__logger_console = self._chip._logger_console
|
|
28
|
-
self._chip._logger_console = self._dashboard.
|
|
29
|
-
self._logger.addHandler(self.
|
|
30
|
-
self.
|
|
70
|
+
self._chip._logger_console = self._dashboard.make_log_hander()
|
|
71
|
+
self._logger.addHandler(self._chip._logger_console)
|
|
72
|
+
self._chip._logger_console.setFormatter(self.__logger_console.formatter)
|
|
31
73
|
|
|
32
74
|
def open_dashboard(self):
|
|
33
|
-
"""
|
|
75
|
+
"""
|
|
76
|
+
Starts the dashboard rendering thread.
|
|
77
|
+
|
|
78
|
+
This method ensures the logger is set and then tells the underlying
|
|
79
|
+
`Board` object to start its live-rendering thread.
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
if not self.__exit_registered:
|
|
83
|
+
# Ensure the dashboard is properly stopped on program exit
|
|
84
|
+
self.__exit_registered = True
|
|
85
|
+
atexit.register(self.stop)
|
|
34
86
|
|
|
35
|
-
self.set_logger(self.
|
|
87
|
+
self.set_logger(self._chip.logger)
|
|
36
88
|
|
|
37
89
|
self._dashboard.open_dashboard()
|
|
38
90
|
|
|
39
91
|
def update_manifest(self, payload=None):
|
|
40
92
|
"""
|
|
41
|
-
Updates the
|
|
42
|
-
|
|
93
|
+
Updates the dashboard with the latest data from the chip's manifest.
|
|
94
|
+
|
|
95
|
+
This method is called to refresh the dashboard's display with the
|
|
96
|
+
current state of the compilation flow.
|
|
97
|
+
|
|
98
|
+
Args:
|
|
99
|
+
payload (dict, optional): A dictionary that can contain additional
|
|
100
|
+
data, such as node start times. Defaults to None.
|
|
43
101
|
"""
|
|
44
102
|
starttimes = None
|
|
45
103
|
if payload and "starttimes" in payload:
|
|
@@ -51,31 +109,51 @@ class CliDashboard(AbstractDashboard):
|
|
|
51
109
|
pass
|
|
52
110
|
|
|
53
111
|
def is_running(self):
|
|
54
|
-
"""
|
|
112
|
+
"""
|
|
113
|
+
Checks if the dashboard rendering thread is currently active.
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
bool: True if the dashboard is running, False otherwise.
|
|
117
|
+
"""
|
|
55
118
|
return self._dashboard.is_running()
|
|
56
119
|
|
|
57
120
|
def end_of_run(self):
|
|
58
121
|
"""
|
|
59
|
-
|
|
122
|
+
Signals to the dashboard that the compilation run has finished.
|
|
123
|
+
|
|
124
|
+
This triggers a final update of the dashboard to show the completed state.
|
|
60
125
|
"""
|
|
61
126
|
self._dashboard.end_of_run(self._chip)
|
|
62
127
|
|
|
63
128
|
def stop(self):
|
|
64
129
|
"""
|
|
65
|
-
Stops the dashboard
|
|
130
|
+
Stops the dashboard and restores the original logger configuration.
|
|
131
|
+
|
|
132
|
+
This method performs a final update, stops the rendering thread, and
|
|
133
|
+
restores the original console handler to the logger.
|
|
66
134
|
"""
|
|
67
135
|
self._dashboard.end_of_run(self._chip)
|
|
68
136
|
|
|
69
137
|
self._dashboard.stop()
|
|
70
138
|
|
|
71
|
-
# Restore logger
|
|
72
|
-
if self.__logger_console:
|
|
73
|
-
self._logger.removeHandler(self.
|
|
139
|
+
# Restore the original logger handler
|
|
140
|
+
if self.__logger_console and self._logger:
|
|
141
|
+
self._logger.removeHandler(self._chip._logger_console)
|
|
142
|
+
formatter = self._chip._logger_console.formatter
|
|
74
143
|
self._chip._logger_console = self.__logger_console
|
|
75
144
|
self._logger.addHandler(self.__logger_console)
|
|
76
|
-
self.__logger_console.setFormatter(
|
|
145
|
+
self.__logger_console.setFormatter(formatter)
|
|
77
146
|
self.__logger_console = None
|
|
78
147
|
|
|
148
|
+
if self.__exit_registered:
|
|
149
|
+
atexit.unregister(self.stop)
|
|
150
|
+
self.__exit_registered = False
|
|
151
|
+
|
|
79
152
|
def wait(self):
|
|
80
|
-
"""
|
|
153
|
+
"""
|
|
154
|
+
Waits for the dashboard rendering thread to complete.
|
|
155
|
+
|
|
156
|
+
This is a blocking call that is useful for ensuring the dashboard has
|
|
157
|
+
fully shut down before the main program exits.
|
|
158
|
+
"""
|
|
81
159
|
self._dashboard.wait()
|