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.
Files changed (121) hide show
  1. siliconcompiler/__init__.py +12 -5
  2. siliconcompiler/__main__.py +1 -7
  3. siliconcompiler/_metadata.py +1 -1
  4. siliconcompiler/apps/_common.py +104 -23
  5. siliconcompiler/apps/sc.py +4 -8
  6. siliconcompiler/apps/sc_dashboard.py +6 -4
  7. siliconcompiler/apps/sc_install.py +10 -6
  8. siliconcompiler/apps/sc_issue.py +7 -5
  9. siliconcompiler/apps/sc_remote.py +1 -1
  10. siliconcompiler/apps/sc_server.py +9 -14
  11. siliconcompiler/apps/sc_show.py +6 -5
  12. siliconcompiler/apps/smake.py +130 -94
  13. siliconcompiler/apps/utils/replay.py +4 -7
  14. siliconcompiler/apps/utils/summarize.py +3 -5
  15. siliconcompiler/asic.py +420 -0
  16. siliconcompiler/checklist.py +25 -2
  17. siliconcompiler/cmdlineschema.py +534 -0
  18. siliconcompiler/constraints/asic_component.py +2 -2
  19. siliconcompiler/constraints/asic_pins.py +2 -2
  20. siliconcompiler/constraints/asic_timing.py +3 -3
  21. siliconcompiler/core.py +7 -32
  22. siliconcompiler/data/templates/tcl/manifest.tcl.j2 +8 -0
  23. siliconcompiler/dependencyschema.py +89 -31
  24. siliconcompiler/design.py +176 -207
  25. siliconcompiler/filesetschema.py +250 -0
  26. siliconcompiler/flowgraph.py +274 -95
  27. siliconcompiler/fpga.py +124 -1
  28. siliconcompiler/library.py +218 -20
  29. siliconcompiler/metric.py +233 -20
  30. siliconcompiler/package/__init__.py +271 -50
  31. siliconcompiler/package/git.py +92 -16
  32. siliconcompiler/package/github.py +108 -12
  33. siliconcompiler/package/https.py +79 -16
  34. siliconcompiler/packageschema.py +88 -7
  35. siliconcompiler/pathschema.py +31 -2
  36. siliconcompiler/pdk.py +566 -1
  37. siliconcompiler/project.py +1095 -94
  38. siliconcompiler/record.py +38 -1
  39. siliconcompiler/remote/__init__.py +5 -2
  40. siliconcompiler/remote/client.py +11 -6
  41. siliconcompiler/remote/schema.py +5 -23
  42. siliconcompiler/remote/server.py +41 -54
  43. siliconcompiler/report/__init__.py +3 -3
  44. siliconcompiler/report/dashboard/__init__.py +48 -14
  45. siliconcompiler/report/dashboard/cli/__init__.py +99 -21
  46. siliconcompiler/report/dashboard/cli/board.py +364 -179
  47. siliconcompiler/report/dashboard/web/__init__.py +90 -12
  48. siliconcompiler/report/dashboard/web/components/__init__.py +219 -240
  49. siliconcompiler/report/dashboard/web/components/flowgraph.py +49 -26
  50. siliconcompiler/report/dashboard/web/components/graph.py +139 -100
  51. siliconcompiler/report/dashboard/web/layouts/__init__.py +29 -1
  52. siliconcompiler/report/dashboard/web/layouts/_common.py +38 -2
  53. siliconcompiler/report/dashboard/web/layouts/vertical_flowgraph.py +39 -26
  54. siliconcompiler/report/dashboard/web/layouts/vertical_flowgraph_node_tab.py +50 -50
  55. siliconcompiler/report/dashboard/web/layouts/vertical_flowgraph_sac_tabs.py +49 -46
  56. siliconcompiler/report/dashboard/web/state.py +141 -14
  57. siliconcompiler/report/dashboard/web/utils/__init__.py +79 -16
  58. siliconcompiler/report/dashboard/web/utils/file_utils.py +74 -11
  59. siliconcompiler/report/dashboard/web/viewer.py +25 -1
  60. siliconcompiler/report/report.py +5 -2
  61. siliconcompiler/report/summary_image.py +29 -11
  62. siliconcompiler/scheduler/__init__.py +9 -1
  63. siliconcompiler/scheduler/docker.py +79 -1
  64. siliconcompiler/scheduler/run_node.py +35 -19
  65. siliconcompiler/scheduler/scheduler.py +208 -24
  66. siliconcompiler/scheduler/schedulernode.py +372 -46
  67. siliconcompiler/scheduler/send_messages.py +77 -29
  68. siliconcompiler/scheduler/slurm.py +76 -12
  69. siliconcompiler/scheduler/taskscheduler.py +140 -20
  70. siliconcompiler/schema/__init__.py +0 -2
  71. siliconcompiler/schema/baseschema.py +194 -38
  72. siliconcompiler/schema/journal.py +7 -4
  73. siliconcompiler/schema/namedschema.py +16 -10
  74. siliconcompiler/schema/parameter.py +55 -9
  75. siliconcompiler/schema/parametervalue.py +60 -0
  76. siliconcompiler/schema/safeschema.py +25 -2
  77. siliconcompiler/schema/schema_cfg.py +5 -5
  78. siliconcompiler/schema/utils.py +2 -2
  79. siliconcompiler/schema_obj.py +20 -3
  80. siliconcompiler/tool.py +979 -302
  81. siliconcompiler/tools/bambu/__init__.py +41 -0
  82. siliconcompiler/tools/builtin/concatenate.py +2 -2
  83. siliconcompiler/tools/builtin/minimum.py +2 -1
  84. siliconcompiler/tools/builtin/mux.py +2 -1
  85. siliconcompiler/tools/builtin/nop.py +2 -1
  86. siliconcompiler/tools/builtin/verify.py +2 -1
  87. siliconcompiler/tools/klayout/__init__.py +95 -0
  88. siliconcompiler/tools/openroad/__init__.py +289 -0
  89. siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +3 -0
  90. siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +7 -2
  91. siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +8 -4
  92. siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +9 -5
  93. siliconcompiler/tools/openroad/scripts/common/write_images.tcl +5 -1
  94. siliconcompiler/tools/slang/__init__.py +1 -1
  95. siliconcompiler/tools/slang/elaborate.py +2 -1
  96. siliconcompiler/tools/vivado/scripts/sc_run.tcl +1 -1
  97. siliconcompiler/tools/vivado/scripts/sc_syn_fpga.tcl +8 -1
  98. siliconcompiler/tools/vivado/syn_fpga.py +6 -0
  99. siliconcompiler/tools/vivado/vivado.py +35 -2
  100. siliconcompiler/tools/vpr/__init__.py +150 -0
  101. siliconcompiler/tools/yosys/__init__.py +369 -1
  102. siliconcompiler/tools/yosys/scripts/procs.tcl +0 -1
  103. siliconcompiler/toolscripts/_tools.json +5 -10
  104. siliconcompiler/utils/__init__.py +66 -0
  105. siliconcompiler/utils/flowgraph.py +2 -2
  106. siliconcompiler/utils/issue.py +2 -1
  107. siliconcompiler/utils/logging.py +14 -0
  108. siliconcompiler/utils/multiprocessing.py +256 -0
  109. siliconcompiler/utils/showtools.py +10 -0
  110. {siliconcompiler-0.34.2.dist-info → siliconcompiler-0.34.3.dist-info}/METADATA +5 -5
  111. {siliconcompiler-0.34.2.dist-info → siliconcompiler-0.34.3.dist-info}/RECORD +115 -118
  112. {siliconcompiler-0.34.2.dist-info → siliconcompiler-0.34.3.dist-info}/entry_points.txt +3 -0
  113. siliconcompiler/schema/cmdlineschema.py +0 -250
  114. siliconcompiler/toolscripts/rhel8/install-slang.sh +0 -40
  115. siliconcompiler/toolscripts/rhel9/install-slang.sh +0 -40
  116. siliconcompiler/toolscripts/ubuntu20/install-slang.sh +0 -47
  117. siliconcompiler/toolscripts/ubuntu22/install-slang.sh +0 -37
  118. siliconcompiler/toolscripts/ubuntu24/install-slang.sh +0 -37
  119. {siliconcompiler-0.34.2.dist-info → siliconcompiler-0.34.3.dist-info}/WHEEL +0 -0
  120. {siliconcompiler-0.34.2.dist-info → siliconcompiler-0.34.3.dist-info}/licenses/LICENSE +0 -0
  121. {siliconcompiler-0.34.2.dist-info → siliconcompiler-0.34.3.dist-info}/top_level.txt +0 -0
@@ -16,6 +16,47 @@ Installation: https://panda.dei.polimi.it/?page_id=88
16
16
 
17
17
  from siliconcompiler.tools.bambu import convert
18
18
 
19
+ from siliconcompiler import StdCellLibrarySchema
20
+
21
+
22
+ class BambuStdCellLibrary(StdCellLibrarySchema):
23
+ """
24
+ Schema for a standard cell library specifically for the Bambu tool.
25
+
26
+ This class extends the base StdCellLibrarySchema to define and manage
27
+ tool-specific parameters required by Bambu, such as the device name
28
+ and a clock multiplier factor.
29
+ """
30
+
31
+ def __init__(self):
32
+ super().__init__()
33
+
34
+ self.define_tool_parameter("bambu", "device", "str",
35
+ "name of the target device for bambu.")
36
+ self.define_tool_parameter("bambu", "clock_multiplier", "float",
37
+ "scalar facto to convert from library units to ns.")
38
+
39
+ def set_bambu_device_name(self, name):
40
+ """
41
+ Sets the name of the device to be used with the Bambu tool.
42
+
43
+ Args:
44
+ name (str): The name of the device.
45
+ """
46
+ self.set("tool", "bambu", "device", name)
47
+
48
+ def set_bambu_clock_multiplier(self, factor):
49
+ """
50
+ Sets the clock multiplier factor for the Bambu tool.
51
+
52
+ This factor is used to convert timing values from the standard
53
+ cell library's units to nanoseconds.
54
+
55
+ Args:
56
+ factor (float): The scalar factor for the clock conversion.
57
+ """
58
+ self.set("tool", "bambu", "clock_multiplier", factor)
59
+
19
60
 
20
61
  ####################################################################
21
62
  # Make Docs
@@ -3,7 +3,7 @@ import os
3
3
  from siliconcompiler import sc_open, SiliconCompilerError
4
4
  from siliconcompiler import utils
5
5
  from siliconcompiler.tools._common import input_provides, input_file_node_name, get_tool_task
6
- from siliconcompiler.scheduler.schedulernode import SchedulerNode
6
+ from siliconcompiler.scheduler import SchedulerNode
7
7
 
8
8
 
9
9
  def make_docs(chip):
@@ -66,7 +66,7 @@ def _gather_outputs(chip, step, index):
66
66
  for in_step, in_index in in_nodes:
67
67
  in_tool, in_task = get_tool_task(chip, in_step, in_index, flow=flow)
68
68
  task_class = chip.get("tool", in_tool, "task", in_task, field="schema")
69
- with task_class.runtime(chip, step=in_step, index=in_index) as task:
69
+ with task_class.runtime(SchedulerNode(chip, in_step, in_index)) as task:
70
70
  in_task_outputs.append(task.get_output_files())
71
71
 
72
72
  if len(in_task_outputs) > 0:
@@ -1,6 +1,7 @@
1
1
  from siliconcompiler.tools.builtin import _common
2
2
  from siliconcompiler.tools.builtin.builtin import set_io_files
3
3
  from siliconcompiler.tools._common import get_tool_task
4
+ from siliconcompiler.scheduler import SchedulerNode
4
5
 
5
6
 
6
7
  def setup(chip):
@@ -45,7 +46,7 @@ def _gather_outputs(chip, step, index):
45
46
  for in_step, in_index in in_nodes:
46
47
  in_tool, in_task = get_tool_task(chip, in_step, in_index, flow=flow)
47
48
  task_class = chip.get("tool", in_tool, "task", in_task, field="schema")
48
- with task_class.runtime(chip, step=in_step, index=in_index) as task:
49
+ with task_class.runtime(SchedulerNode(chip, in_step, in_index)) as task:
49
50
  in_task_outputs.append(task.get_output_files())
50
51
 
51
52
  if len(in_task_outputs) > 0:
@@ -3,6 +3,7 @@ import re
3
3
  from siliconcompiler.tools.builtin.builtin import set_io_files
4
4
  from siliconcompiler import SiliconCompilerError
5
5
  from siliconcompiler.tools._common import get_tool_task
6
+ from siliconcompiler.scheduler import SchedulerNode
6
7
 
7
8
 
8
9
  def setup(chip):
@@ -59,7 +60,7 @@ def _gather_outputs(chip, step, index):
59
60
  for in_step, in_index in in_nodes:
60
61
  in_tool, in_task = get_tool_task(chip, in_step, in_index, flow=flow)
61
62
  task_class = chip.get("tool", in_tool, "task", in_task, field="schema")
62
- with task_class.runtime(chip, step=in_step, index=in_index) as task:
63
+ with task_class.runtime(SchedulerNode(chip, in_step, in_index)) as task:
63
64
  in_task_outputs.append(task.get_output_files())
64
65
 
65
66
  if len(in_task_outputs) > 0:
@@ -1,6 +1,7 @@
1
1
  from siliconcompiler.tools.builtin import _common
2
2
  from siliconcompiler.tools.builtin.builtin import set_io_files
3
3
  from siliconcompiler.tools._common import get_tool_task
4
+ from siliconcompiler.scheduler import SchedulerNode
4
5
 
5
6
 
6
7
  def setup(chip):
@@ -26,7 +27,7 @@ def _gather_outputs(chip, step, index):
26
27
  for in_step, in_index in in_nodes:
27
28
  in_tool, in_task = get_tool_task(chip, in_step, in_index, flow=flow)
28
29
  task_class = chip.get("tool", in_tool, "task", in_task, field="schema")
29
- with task_class.runtime(chip, step=in_step, index=in_index) as task:
30
+ with task_class.runtime(SchedulerNode(chip, in_step, in_index)) as task:
30
31
  in_task_outputs.append(task.get_output_files())
31
32
 
32
33
  if len(in_task_outputs) > 0:
@@ -3,6 +3,7 @@ from siliconcompiler.schema.parametertype import NodeType
3
3
  from siliconcompiler.tools.builtin.builtin import set_io_files
4
4
  from siliconcompiler import utils, SiliconCompilerError
5
5
  from siliconcompiler.tools._common import get_tool_task
6
+ from siliconcompiler.scheduler import SchedulerNode
6
7
 
7
8
  import re
8
9
 
@@ -71,7 +72,7 @@ def _gather_outputs(chip, step, index):
71
72
  for in_step, in_index in in_nodes:
72
73
  in_tool, in_task = get_tool_task(chip, in_step, in_index, flow=flow)
73
74
  task_class = chip.get("tool", in_tool, "task", in_task, field="schema")
74
- with task_class.runtime(chip, step=in_step, index=in_index) as task:
75
+ with task_class.runtime(SchedulerNode(chip, in_step, in_index)) as task:
75
76
  in_task_outputs.append(task.get_output_files())
76
77
 
77
78
  if len(in_task_outputs) > 0:
@@ -0,0 +1,95 @@
1
+ from typing import List, Union
2
+
3
+ from siliconcompiler import StdCellLibrarySchema
4
+ from siliconcompiler import PDKSchema
5
+
6
+
7
+ class KLayoutPDK(PDKSchema):
8
+ """
9
+ Schema for defining technology-specific parameters for the KLayout tool.
10
+
11
+ This class extends the base PDKSchema to manage settings related to
12
+ KLayout, such as stream units and which layers to hide on initial display.
13
+ """
14
+ def __init__(self):
15
+ super().__init__()
16
+
17
+ self.define_tool_parameter("klayout", "units", "float",
18
+ "The stream units for KLayout.")
19
+ self.define_tool_parameter("klayout", "hide_layers", "{str}",
20
+ "A list of layer names to initially hide when "
21
+ "displaying a layout.")
22
+ self.define_tool_parameter("klayout", "drc_params", "{(str,str)}",
23
+ "Set of parameters to include for a particular drc deck, in the "
24
+ "form (deck name, parameter).")
25
+
26
+ def set_klayout_units(self, units: float):
27
+ """
28
+ Sets the stream units for KLayout.
29
+
30
+ Args:
31
+ units (float): The stream unit value.
32
+ """
33
+ self.set("tool", "klayout", "units", units)
34
+
35
+ def add_klayout_hidelayers(self, layer: Union[str, List[str]], clobber: bool = False):
36
+ """
37
+ Adds one or more layers to the list of layers to be hidden.
38
+
39
+ Args:
40
+ layer (Union[str, List[str]]): The layer name or a list of layer names.
41
+ clobber (bool, optional): If True, overwrites the existing list of hidden layers.
42
+ If False, appends to the list. Defaults to False.
43
+ """
44
+ if clobber:
45
+ self.set("tool", "klayout", "hide_layers", layer)
46
+ else:
47
+ self.add("tool", "klayout", "hide_layers", layer)
48
+
49
+ def add_klayout_drcparam(self, deck: str, param: Union[str, List[str]], clobber: bool = False):
50
+ """
51
+ Adds one or more parameter to the DRC deck definition.
52
+
53
+ Args:
54
+ deck (str): name of the DRC deck.
55
+ param (Union[str, List[str]]): Parameters for a the specified deck.
56
+ clobber (bool, optional): If True, overwrites the existing list of parameters.
57
+ If False, appends to the list. Defaults to False.
58
+ """
59
+ if isinstance(param, str):
60
+ param = [param]
61
+ if clobber:
62
+ self.unset("tool", "klayout", "drc_params")
63
+
64
+ for p in param:
65
+ self.add("tool", "klayout", "drc_params", (deck, p))
66
+
67
+
68
+ class KLayoutLibrary(StdCellLibrarySchema):
69
+ """
70
+ Schema for defining standard cell library parameters for the KLayout tool.
71
+
72
+ This class extends the base StdCellLibrarySchema to manage settings for
73
+ KLayout, such as defining cells that are allowed to be missing from the
74
+ final stream file without generating an error.
75
+ """
76
+ def __init__(self):
77
+ super().__init__()
78
+
79
+ self.define_tool_parameter("klayout", "allow_missing_cell", "{str}",
80
+ "A list of cells that are allowed to be empty "
81
+ "in the final stream file.")
82
+
83
+ def add_klayout_allowmissingcell(self, cell: Union[str, List[str]], clobber: bool = False):
84
+ """
85
+ Adds one or more cell names to the list of cells allowed to be missing.
86
+
87
+ Args:
88
+ cell (Union[str, List[str]]): The cell name or a list of cell names.
89
+ clobber (bool, optional): If True, overwrites the existing list.
90
+ If False, appends to the list. Defaults to False.
91
+ """
92
+ if clobber:
93
+ self.set("tool", "klayout", "allow_missing_cell", cell)
94
+ else:
95
+ self.add("tool", "klayout", "allow_missing_cell", cell)
@@ -12,6 +12,295 @@ Installation: https://github.com/The-OpenROAD-Project/OpenROAD
12
12
  '''
13
13
  from siliconcompiler.tools._common import get_tool_task
14
14
 
15
+ from typing import List, Union
16
+
17
+ from siliconcompiler.library import StdCellLibrarySchema
18
+ from siliconcompiler.pdk import PDKSchema
19
+
20
+
21
+ class OpenROADPDK(PDKSchema):
22
+ """
23
+ Schema for defining technology-specific parameters for the OpenROAD tool.
24
+
25
+ This class extends the base PDKSchema to manage various settings related
26
+ to physical design, such as routing layers, pin layers, and global
27
+ routing derating factors, specifically for the OpenROAD tool.
28
+ """
29
+ def __init__(self):
30
+ super().__init__()
31
+
32
+ self.define_tool_parameter("openroad", "rclayer_signal", "str",
33
+ "The name of the signal layer to be used for RC extraction.")
34
+ self.define_tool_parameter("openroad", "rclayer_clock", "str",
35
+ "The name of the clock layer to be used for RC extraction.")
36
+
37
+ self.define_tool_parameter("openroad", "pin_layer_horizontal", "[str]",
38
+ "A list of layers designated for horizontal pins.")
39
+ self.define_tool_parameter("openroad", "pin_layer_vertical", "[str]",
40
+ "A list of layers designated for vertical pins.")
41
+
42
+ self.define_tool_parameter("openroad", "globalroutingderating", "{(str,float)}",
43
+ "A set of layer-specific derating factors for global routing.")
44
+
45
+ self.define_tool_parameter("openroad", "rcx_maxlayer", "str",
46
+ "Max layer to generate an OpenRCX extraction bench for.")
47
+
48
+ def set_openroad_rclayers(self, signal: str = None, clock: str = None):
49
+ """
50
+ Sets the signal and/or clock layers for RC extraction.
51
+
52
+ Args:
53
+ signal (str, optional): The name of the signal layer. Defaults to None.
54
+ clock (str, optional): The name of the clock layer. Defaults to None.
55
+ """
56
+ if signal:
57
+ self.set("tool", "openroad", "rclayer_signal", signal)
58
+ if clock:
59
+ self.set("tool", "openroad", "rclayer_clock", clock)
60
+
61
+ def unset_openroad_globalroutingderating(self):
62
+ """
63
+ Unsets the global routing derating parameter.
64
+ """
65
+ self.unset("tool", "openroad", "globalroutingderating")
66
+
67
+ def set_openroad_globalroutingderating(self, layer: str, derating: float,
68
+ clobber: bool = False):
69
+ """
70
+ Sets a global routing derating factor for a specific layer.
71
+
72
+ Args:
73
+ layer (str): The name of the layer.
74
+ derating (float): The derating factor to apply.
75
+ clobber (bool, optional): If True, overwrites the existing derating factor for the
76
+ layer.
77
+ If False, adds a new derating factor. Defaults to False.
78
+ """
79
+ if clobber:
80
+ return self.set("tool", "openroad", "globalroutingderating", (layer, derating))
81
+ else:
82
+ return self.add("tool", "openroad", "globalroutingderating", (layer, derating))
83
+
84
+ def add_openroad_pinlayers(self,
85
+ horizontal: Union[str, List[str]] = None,
86
+ vertical: Union[str, List[str]] = None,
87
+ clobber: bool = False):
88
+ """
89
+ Adds horizontal and/or vertical pin layers.
90
+
91
+ Args:
92
+ horizontal (Union[str, List[str]], optional): The horizontal pin layer(s) to add.
93
+ Defaults to None.
94
+ vertical (Union[str, List[str]], optional): The vertical pin layer(s) to add.
95
+ Defaults to None.
96
+ clobber (bool, optional): If True, overwrites the existing lists. Defaults to False.
97
+ """
98
+ if clobber:
99
+ if horizontal:
100
+ self.set("tool", "openroad", "pin_layer_horizontal", horizontal)
101
+ if vertical:
102
+ self.set("tool", "openroad", "pin_layer_vertical", vertical)
103
+ else:
104
+ if horizontal:
105
+ self.add("tool", "openroad", "pin_layer_horizontal", horizontal)
106
+ if vertical:
107
+ self.add("tool", "openroad", "pin_layer_vertical", vertical)
108
+
109
+ def set_openroad_rcxmaxlayer(self, layer: str):
110
+ """
111
+ Sets the maximum layer for OpenRCX extraction bench generation.
112
+
113
+ This parameter defines the highest routing layer to be considered during
114
+ RC extraction.
115
+
116
+ Args:
117
+ layer (str): The name of the top-most layer to be used for RC extraction.
118
+ """
119
+ self.set("tool", "openroad", "rcx_maxlayer", layer)
120
+
121
+
122
+ class OpenROADStdCellLibrary(StdCellLibrarySchema):
123
+ """
124
+ Schema for defining standard cell library parameters for the OpenROAD tool.
125
+
126
+ This class extends the base StdCellLibrarySchema to manage various settings
127
+ related to physical design, such as tie cells, placement settings, routing,
128
+ and power grid configuration, specifically for the OpenROAD tool.
129
+ """
130
+ def __init__(self):
131
+ super().__init__()
132
+
133
+ self.define_tool_parameter("openroad", "tiehigh_cell", "(str,str)",
134
+ "A tuple specifying the tie-high cell name and its output port.")
135
+ self.define_tool_parameter("openroad", "tielow_cell", "(str,str)",
136
+ "A tuple specifying the tie-low cell name and its output port.")
137
+
138
+ self.define_tool_parameter("openroad", "place_density", "float",
139
+ "The target placement density for the design.")
140
+
141
+ self.define_tool_parameter("openroad", "global_cell_padding", "int",
142
+ "Padding to be applied to cells during global placement.",
143
+ defvalue=0)
144
+ self.define_tool_parameter("openroad", "detailed_cell_padding", "int",
145
+ "Padding to be applied to cells during detailed placement.",
146
+ defvalue=0)
147
+
148
+ self.define_tool_parameter("openroad", "macro_placement_halo", "(float,float)",
149
+ "A tuple for the X and Y dimensions of the halo around macros "
150
+ "during placement.")
151
+
152
+ self.define_tool_parameter("openroad", "tracks", "file",
153
+ "The file containing track definitions for routing.")
154
+ self.define_tool_parameter("openroad", "tapcells", "file",
155
+ "The file containing tap cell definitions.")
156
+ self.define_tool_parameter("openroad", "global_connect", "[file]",
157
+ "A list of global connect files.")
158
+ self.define_tool_parameter("openroad", "power_grid", "[file]",
159
+ "A list of power grid files.")
160
+
161
+ self.define_tool_parameter("openroad", "scan_chain_cells", "[str]",
162
+ "A list of cells used for scan chain insertion.")
163
+ self.define_tool_parameter("openroad", "multibit_ff_cells", "[str]",
164
+ "A list of multibit flip-flop cells.")
165
+
166
+ def set_openroad_tiehigh_cell(self, cell: str, output_port: str):
167
+ """
168
+ Sets the tie-high cell and its output port.
169
+
170
+ Args:
171
+ cell (str): The name of the tie-high cell.
172
+ output_port (str): The name of the output port.
173
+ """
174
+ self.set("tool", "openroad", "tiehigh_cell", (cell, output_port))
175
+
176
+ def set_openroad_tielow_cell(self, cell: str, output_port: str):
177
+ """
178
+ Sets the tie-low cell and its output port.
179
+
180
+ Args:
181
+ cell (str): The name of the tie-low cell.
182
+ output_port (str): The name of the output port.
183
+ """
184
+ self.set("tool", "openroad", "tielow_cell", (cell, output_port))
185
+
186
+ def set_openroad_placement_density(self, density: float):
187
+ """
188
+ Sets the target placement density.
189
+
190
+ Args:
191
+ density (float): The target placement density, a value between 0.0 and 1.0.
192
+ """
193
+ self.set("tool", "openroad", "place_density", density)
194
+
195
+ def set_openroad_cell_padding(self, global_place: int, detailed_place: int):
196
+ """
197
+ Sets the cell padding for both global and detailed placement.
198
+
199
+ Args:
200
+ global_place (int): Padding for global placement.
201
+ detailed_place (int): Padding for detailed placement.
202
+ """
203
+ self.set("tool", "openroad", "global_cell_padding", global_place)
204
+ self.set("tool", "openroad", "detailed_cell_padding", detailed_place)
205
+
206
+ def set_openroad_macro_placement_halo(self, x: float, y: float):
207
+ """
208
+ Sets the halo dimensions for macro placement.
209
+
210
+ Args:
211
+ x (float): The halo dimension in the x-direction.
212
+ y (float): The halo dimension in the y-direction.
213
+ """
214
+ self.set("tool", "openroad", "macro_placement_halo", (x, y))
215
+
216
+ def set_openroad_tracks_file(self, file: str, dataroot: str = None):
217
+ """
218
+ Sets the file for track definitions.
219
+
220
+ Args:
221
+ file (str): The path to the tracks file.
222
+ dataroot (str, optional): The data root directory. Defaults to the active package.
223
+ """
224
+ if not dataroot:
225
+ dataroot = self._get_active("package")
226
+ with self.active_dataroot(dataroot):
227
+ self.set("tool", "openroad", "tracks", file)
228
+
229
+ def set_openroad_tapcells_file(self, file: str, dataroot: str = None):
230
+ """
231
+ Sets the file for tap cell definitions.
232
+
233
+ Args:
234
+ file (str): The path to the tap cells file.
235
+ dataroot (str, optional): The data root directory. Defaults to the active package.
236
+ """
237
+ if not dataroot:
238
+ dataroot = self._get_active("package")
239
+ with self.active_dataroot(dataroot):
240
+ self.set("tool", "openroad", "tapcells", file)
241
+
242
+ def add_openroad_global_connect_file(self, file: Union[str, List[str]], dataroot: str = None,
243
+ clobber: bool = False):
244
+ """
245
+ Adds a global connect file to the list.
246
+
247
+ Args:
248
+ file (Union[str, List[str]]): The path to the global connect file or a list of paths.
249
+ dataroot (str, optional): The data root directory. Defaults to the active package.
250
+ clobber (bool, optional): If True, overwrites existing values. Defaults to False.
251
+ """
252
+ if not dataroot:
253
+ dataroot = self._get_active("package")
254
+ with self.active_dataroot(dataroot):
255
+ if clobber:
256
+ self.set("tool", "openroad", "global_connect", file)
257
+ else:
258
+ self.add("tool", "openroad", "global_connect", file)
259
+
260
+ def add_openroad_power_grid_file(self, file: Union[str, List[str]], dataroot: str = None,
261
+ clobber: bool = False):
262
+ """
263
+ Adds a power grid file to the list.
264
+
265
+ Args:
266
+ file (Union[str, List[str]]): The path to the power grid file or a list of paths.
267
+ dataroot (str, optional): The data root directory. Defaults to the active package.
268
+ clobber (bool, optional): If True, overwrites existing values. Defaults to False.
269
+ """
270
+ if not dataroot:
271
+ dataroot = self._get_active("package")
272
+ with self.active_dataroot(dataroot):
273
+ if clobber:
274
+ self.set("tool", "openroad", "power_grid", file)
275
+ else:
276
+ self.add("tool", "openroad", "power_grid", file)
277
+
278
+ def add_openroad_scan_chain_cells(self, cells: Union[str, List[str]], clobber: bool = False):
279
+ """
280
+ Adds scan chain cells to the list.
281
+
282
+ Args:
283
+ cells (Union[str, List[str]]): A cell name or a list of cell names.
284
+ clobber (bool, optional): If True, overwrites existing values. Defaults to False.
285
+ """
286
+ if clobber:
287
+ self.set("tool", "openroad", "scan_chain_cells", cells)
288
+ else:
289
+ self.add("tool", "openroad", "scan_chain_cells", cells)
290
+
291
+ def add_openroad_multibit_flipflops(self, cells: Union[str, List[str]], clobber: bool = False):
292
+ """
293
+ Adds multibit flip-flop cells to the list.
294
+
295
+ Args:
296
+ cells (Union[str, List[str]]): A cell name or a list of cell names.
297
+ clobber (bool, optional): If True, overwrites existing values. Defaults to False.
298
+ """
299
+ if clobber:
300
+ self.set("tool", "openroad", "multibit_ff_cells", cells)
301
+ else:
302
+ self.add("tool", "openroad", "multibit_ff_cells", cells)
303
+
15
304
 
16
305
  ####################################################################
17
306
  # Make Docs
@@ -100,3 +100,6 @@ if { [llength $openroad_dont_touch] > 0 } {
100
100
  tee -quiet -file reports/dont_touch.start.rpt {report_dont_touch}
101
101
  tee -quiet -file reports/dont_use.start.rpt {report_dont_use}
102
102
  tee -file reports/global_connections.start.rpt {report_global_connect}
103
+ if { [sc_check_version 23264] } {
104
+ tee -file reports/report_buffers.rpt {report_buffers -filtered}
105
+ }
@@ -53,13 +53,18 @@ set sc_minmetal [sc_get_layer_name $sc_minmetal]
53
53
  set sc_maxmetal [sc_cfg_get pdk $sc_pdk maxlayer $sc_stackup]
54
54
  set sc_maxmetal [sc_get_layer_name $sc_maxmetal]
55
55
 
56
+ if { [sc_check_version 23235] } {
57
+ set_routing_layers -signal "${sc_minmetal}-${sc_maxmetal}"
58
+ } else {
59
+ lappend drt_arguments -bottom_routing_layer $sc_minmetal
60
+ lappend drt_arguments -top_routing_layer $sc_maxmetal
61
+ }
62
+
56
63
  sc_report_args -command detailed_route -args $drt_arguments
57
64
  detailed_route \
58
65
  -save_guide_updates \
59
66
  -output_drc "reports/${sc_design}_drc.rpt" \
60
67
  -output_maze "reports/${sc_design}_maze.log" \
61
- -bottom_routing_layer $sc_minmetal \
62
- -top_routing_layer $sc_maxmetal \
63
68
  -verbose 1 \
64
69
  {*}$drt_arguments
65
70
 
@@ -24,16 +24,20 @@ if { [lindex [sc_cfg_tool_task_get {var} grt_use_pin_access] 0] == "true" } {
24
24
  set sc_maxmetal [sc_get_layer_name $sc_maxmetal]
25
25
 
26
26
  set pin_access_args []
27
+ if { [sc_check_version 23235] } {
28
+ # use value from preamble
29
+ } else {
30
+ lappend pin_access_args -bottom_routing_layer $sc_minmetal
31
+ lappend pin_access_args -top_routing_layer $sc_maxmetal
32
+ }
33
+
27
34
  if { [lindex [sc_cfg_tool_task_get {var} drt_process_node] 0] != "false" } {
28
35
  lappend pin_access_args "-db_process_node" \
29
36
  [lindex [sc_cfg_tool_task_get {var} drt_process_node] 0]
30
37
  }
31
38
 
32
39
  sc_report_args -command pin_access -args $pin_access_args
33
- pin_access \
34
- -bottom_routing_layer $sc_minmetal \
35
- -top_routing_layer $sc_maxmetal \
36
- {*}$pin_access_args
40
+ pin_access {*}$pin_access_args
37
41
  }
38
42
 
39
43
  ###############################
@@ -301,12 +301,16 @@ if { [sc_cfg_exists constraint component] } {
301
301
  sc_print_macro_information
302
302
  }
303
303
 
304
- if { $do_automatic_pins } {
305
- ###############################
306
- # Automatic Random Pin Placement
307
- ###############################
304
+ if { [sc_check_version 23008] } {
305
+ # Dont do random placement
306
+ } else {
307
+ if { $do_automatic_pins } {
308
+ ###############################
309
+ # Automatic Random Pin Placement
310
+ ###############################
308
311
 
309
- sc_pin_placement -random
312
+ sc_pin_placement -random
313
+ }
310
314
  }
311
315
 
312
316
  ###############################
@@ -311,7 +311,11 @@ proc sc_image_clocktree { } {
311
311
  }
312
312
 
313
313
  if { [info commands gui::select_clockviewer_clock] != "" } {
314
- gui::select_clockviewer_clock ${clock_name}
314
+ set select_clk_args []
315
+ if { [sc_check_version 23008] } {
316
+ lappend select_clk_args 2
317
+ }
318
+ gui::select_clockviewer_clock ${clock_name} {*}$select_clk_args
315
319
  sc_save_image \
316
320
  "clock - ${clock_name}" \
317
321
  reports/images/clocks/${sc_design}.${clock_name}.png
@@ -32,7 +32,7 @@ def test_version():
32
32
  return "pyslang is not installed"
33
33
 
34
34
  version = pyslang.VersionInfo
35
- if version.getMajor() >= 7 and version.getMinor() >= 0:
35
+ if version.getMajor() >= 9 and version.getMinor() >= 0:
36
36
  return None
37
37
 
38
38
  ver = f"{version.getMajor()}.{version.getMinor()}.{version.getPatch()}"
@@ -119,7 +119,8 @@ def run(chip):
119
119
  writer.setIncludeSkipped(False)
120
120
  writer.setIncludeDirectives(False)
121
121
 
122
- writer.setIncludePreprocessed(True)
122
+ writer.setExpandMacros(True)
123
+ writer.setExpandIncludes(True)
123
124
  writer.setIncludeTrivia(True)
124
125
  writer.setIncludeComments(True)
125
126
  writer.setSquashNewlines(True)
@@ -2,7 +2,7 @@
2
2
  # Reading SC Schema
3
3
  ###############################
4
4
 
5
- source ./sc_manifest.tcl
5
+ source ./sc_manifest.tcl > /dev/null
6
6
 
7
7
  ##############################
8
8
  # Schema Adapter
@@ -21,5 +21,12 @@ if { $sc_constraint != "" } {
21
21
  }
22
22
 
23
23
  # run synthesis
24
- synth_design -top $sc_design
24
+ set synth_args []
25
+ lappend synth_args -directive [lindex [sc_cfg_tool_task_get var synth_directive] 0]
26
+ set synth_mode [lindex [sc_cfg_tool_task_get var synth_mode] 0]
27
+ if { $synth_mode != "none" } {
28
+ lappend synth_args -mode $synth_mode
29
+ }
30
+ synth_design -top $sc_design {*}$synth_args
31
+
25
32
  opt_design