librelane 2.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of librelane might be problematic. Click here for more details.
- librelane/__init__.py +38 -0
- librelane/__main__.py +479 -0
- librelane/__version__.py +43 -0
- librelane/common/__init__.py +63 -0
- librelane/common/cli.py +75 -0
- librelane/common/drc.py +246 -0
- librelane/common/generic_dict.py +319 -0
- librelane/common/metrics/__init__.py +35 -0
- librelane/common/metrics/__main__.py +413 -0
- librelane/common/metrics/library.py +354 -0
- librelane/common/metrics/metric.py +186 -0
- librelane/common/metrics/util.py +279 -0
- librelane/common/misc.py +456 -0
- librelane/common/ring_buffer.py +63 -0
- librelane/common/tcl.py +80 -0
- librelane/common/toolbox.py +549 -0
- librelane/common/tpe.py +41 -0
- librelane/common/types.py +116 -0
- librelane/config/__init__.py +32 -0
- librelane/config/__main__.py +155 -0
- librelane/config/config.py +1025 -0
- librelane/config/flow.py +490 -0
- librelane/config/pdk_compat.py +255 -0
- librelane/config/preprocessor.py +464 -0
- librelane/config/removals.py +45 -0
- librelane/config/variable.py +743 -0
- librelane/container.py +285 -0
- librelane/env_info.py +320 -0
- librelane/examples/spm/config.yaml +33 -0
- librelane/examples/spm/pin_order.cfg +14 -0
- librelane/examples/spm/src/impl.sdc +73 -0
- librelane/examples/spm/src/signoff.sdc +68 -0
- librelane/examples/spm/src/spm.v +73 -0
- librelane/examples/spm/verify/spm_tb.v +106 -0
- librelane/examples/spm-user_project_wrapper/SPM_example.v +286 -0
- librelane/examples/spm-user_project_wrapper/base_sdc_file.sdc +145 -0
- librelane/examples/spm-user_project_wrapper/config-tut.json +12 -0
- librelane/examples/spm-user_project_wrapper/config.json +13 -0
- librelane/examples/spm-user_project_wrapper/defines.v +66 -0
- librelane/examples/spm-user_project_wrapper/template.def +7656 -0
- librelane/examples/spm-user_project_wrapper/user_project_wrapper.v +123 -0
- librelane/flows/__init__.py +24 -0
- librelane/flows/builtins.py +18 -0
- librelane/flows/classic.py +327 -0
- librelane/flows/cli.py +463 -0
- librelane/flows/flow.py +1049 -0
- librelane/flows/misc.py +71 -0
- librelane/flows/optimizing.py +179 -0
- librelane/flows/sequential.py +367 -0
- librelane/flows/synth_explore.py +173 -0
- librelane/help/__main__.py +39 -0
- librelane/logging/__init__.py +40 -0
- librelane/logging/logger.py +323 -0
- librelane/open_pdks_rev +1 -0
- librelane/plugins.py +21 -0
- librelane/py.typed +0 -0
- librelane/scripts/base.sdc +80 -0
- librelane/scripts/klayout/Readme.md +2 -0
- librelane/scripts/klayout/open_design.py +63 -0
- librelane/scripts/klayout/render.py +121 -0
- librelane/scripts/klayout/stream_out.py +176 -0
- librelane/scripts/klayout/xml_drc_report_to_json.py +45 -0
- librelane/scripts/klayout/xor.drc +120 -0
- librelane/scripts/magic/Readme.md +1 -0
- librelane/scripts/magic/common/read.tcl +114 -0
- librelane/scripts/magic/def/antenna_check.tcl +35 -0
- librelane/scripts/magic/def/mag.tcl +19 -0
- librelane/scripts/magic/def/mag_gds.tcl +79 -0
- librelane/scripts/magic/drc.tcl +78 -0
- librelane/scripts/magic/extract_spice.tcl +98 -0
- librelane/scripts/magic/gds/drc_batch.tcl +74 -0
- librelane/scripts/magic/gds/erase_box.tcl +32 -0
- librelane/scripts/magic/gds/extras_mag.tcl +45 -0
- librelane/scripts/magic/gds/mag_with_pointers.tcl +31 -0
- librelane/scripts/magic/get_bbox.tcl +11 -0
- librelane/scripts/magic/lef/extras_maglef.tcl +61 -0
- librelane/scripts/magic/lef/maglef.tcl +26 -0
- librelane/scripts/magic/lef.tcl +57 -0
- librelane/scripts/magic/open.tcl +28 -0
- librelane/scripts/magic/wrapper.tcl +21 -0
- librelane/scripts/netgen/setup.tcl +28 -0
- librelane/scripts/odbpy/apply_def_template.py +49 -0
- librelane/scripts/odbpy/cell_frequency.py +107 -0
- librelane/scripts/odbpy/check_antenna_properties.py +116 -0
- librelane/scripts/odbpy/contextualize.py +109 -0
- librelane/scripts/odbpy/defutil.py +573 -0
- librelane/scripts/odbpy/diodes.py +373 -0
- librelane/scripts/odbpy/disconnected_pins.py +305 -0
- librelane/scripts/odbpy/eco_buffer.py +181 -0
- librelane/scripts/odbpy/eco_diode.py +139 -0
- librelane/scripts/odbpy/filter_unannotated.py +100 -0
- librelane/scripts/odbpy/io_place.py +482 -0
- librelane/scripts/odbpy/ioplace_parser/__init__.py +23 -0
- librelane/scripts/odbpy/ioplace_parser/parse.py +147 -0
- librelane/scripts/odbpy/label_macro_pins.py +277 -0
- librelane/scripts/odbpy/lefutil.py +97 -0
- librelane/scripts/odbpy/placers.py +162 -0
- librelane/scripts/odbpy/power_utils.py +397 -0
- librelane/scripts/odbpy/random_place.py +57 -0
- librelane/scripts/odbpy/reader.py +250 -0
- librelane/scripts/odbpy/remove_buffers.py +173 -0
- librelane/scripts/odbpy/snap_to_grid.py +57 -0
- librelane/scripts/odbpy/wire_lengths.py +93 -0
- librelane/scripts/openroad/antenna_check.tcl +20 -0
- librelane/scripts/openroad/antenna_repair.tcl +31 -0
- librelane/scripts/openroad/basic_mp.tcl +24 -0
- librelane/scripts/openroad/buffer_list.tcl +10 -0
- librelane/scripts/openroad/common/dpl.tcl +24 -0
- librelane/scripts/openroad/common/dpl_cell_pad.tcl +26 -0
- librelane/scripts/openroad/common/grt.tcl +32 -0
- librelane/scripts/openroad/common/io.tcl +540 -0
- librelane/scripts/openroad/common/pdn_cfg.tcl +135 -0
- librelane/scripts/openroad/common/resizer.tcl +103 -0
- librelane/scripts/openroad/common/set_global_connections.tcl +78 -0
- librelane/scripts/openroad/common/set_layer_adjustments.tcl +31 -0
- librelane/scripts/openroad/common/set_power_nets.tcl +30 -0
- librelane/scripts/openroad/common/set_rc.tcl +75 -0
- librelane/scripts/openroad/common/set_routing_layers.tcl +30 -0
- librelane/scripts/openroad/cts.tcl +80 -0
- librelane/scripts/openroad/cut_rows.tcl +24 -0
- librelane/scripts/openroad/dpl.tcl +24 -0
- librelane/scripts/openroad/drt.tcl +37 -0
- librelane/scripts/openroad/fill.tcl +30 -0
- librelane/scripts/openroad/floorplan.tcl +145 -0
- librelane/scripts/openroad/gpl.tcl +88 -0
- librelane/scripts/openroad/grt.tcl +30 -0
- librelane/scripts/openroad/gui.tcl +37 -0
- librelane/scripts/openroad/insert_buffer.tcl +127 -0
- librelane/scripts/openroad/ioplacer.tcl +67 -0
- librelane/scripts/openroad/irdrop.tcl +51 -0
- librelane/scripts/openroad/pdn.tcl +52 -0
- librelane/scripts/openroad/rcx.tcl +32 -0
- librelane/scripts/openroad/repair_design.tcl +70 -0
- librelane/scripts/openroad/repair_design_postgrt.tcl +48 -0
- librelane/scripts/openroad/rsz_timing_postcts.tcl +68 -0
- librelane/scripts/openroad/rsz_timing_postgrt.tcl +70 -0
- librelane/scripts/openroad/sta/check_macro_instances.tcl +53 -0
- librelane/scripts/openroad/sta/corner.tcl +393 -0
- librelane/scripts/openroad/tapcell.tcl +25 -0
- librelane/scripts/openroad/write_views.tcl +27 -0
- librelane/scripts/pyosys/construct_abc_script.py +177 -0
- librelane/scripts/pyosys/json_header.py +84 -0
- librelane/scripts/pyosys/synthesize.py +493 -0
- librelane/scripts/pyosys/ys_common.py +153 -0
- librelane/scripts/tclsh/hello.tcl +1 -0
- librelane/state/__init__.py +24 -0
- librelane/state/__main__.py +61 -0
- librelane/state/design_format.py +195 -0
- librelane/state/state.py +359 -0
- librelane/steps/__init__.py +61 -0
- librelane/steps/__main__.py +510 -0
- librelane/steps/checker.py +637 -0
- librelane/steps/common_variables.py +340 -0
- librelane/steps/cvc_rv.py +169 -0
- librelane/steps/klayout.py +509 -0
- librelane/steps/magic.py +576 -0
- librelane/steps/misc.py +160 -0
- librelane/steps/netgen.py +253 -0
- librelane/steps/odb.py +1088 -0
- librelane/steps/openroad.py +2460 -0
- librelane/steps/openroad_alerts.py +102 -0
- librelane/steps/pyosys.py +640 -0
- librelane/steps/step.py +1571 -0
- librelane/steps/tclstep.py +288 -0
- librelane/steps/verilator.py +222 -0
- librelane/steps/yosys.py +371 -0
- librelane-2.4.0.dist-info/METADATA +169 -0
- librelane-2.4.0.dist-info/RECORD +170 -0
- librelane-2.4.0.dist-info/WHEEL +4 -0
- librelane-2.4.0.dist-info/entry_points.txt +9 -0
librelane/config/flow.py
ADDED
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
# Copyright 2023 Efabless Corporation
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
import os
|
|
15
|
+
|
|
16
|
+
from decimal import Decimal
|
|
17
|
+
from typing import List, Optional, Dict, Sequence, Union, Tuple
|
|
18
|
+
|
|
19
|
+
from .variable import Variable, Macro
|
|
20
|
+
from ..common import Path, get_script_dir
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _prefix_to_wildcard(prefixes_raw: Union[str, Sequence[str]]):
|
|
24
|
+
prefixes = prefixes_raw
|
|
25
|
+
if isinstance(prefixes, str):
|
|
26
|
+
prefixes = prefixes.split()
|
|
27
|
+
return [f"{prefix}*" for prefix in prefixes]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
pdk_variables = [
|
|
31
|
+
# Core/Common
|
|
32
|
+
Variable(
|
|
33
|
+
"STD_CELL_LIBRARY",
|
|
34
|
+
str,
|
|
35
|
+
"Specifies the default standard cell library to be used under the specified PDK. Must be a valid C identifier, i.e., matches the regular expression `[_a-zA-Z][_a-zA-Z0-9]+`.",
|
|
36
|
+
pdk=True,
|
|
37
|
+
),
|
|
38
|
+
Variable(
|
|
39
|
+
"VDD_PIN",
|
|
40
|
+
str,
|
|
41
|
+
"The power pin for the cells.",
|
|
42
|
+
pdk=True,
|
|
43
|
+
),
|
|
44
|
+
Variable(
|
|
45
|
+
"VDD_PIN_VOLTAGE",
|
|
46
|
+
Decimal,
|
|
47
|
+
"The voltage of the VDD pin.",
|
|
48
|
+
pdk=True,
|
|
49
|
+
),
|
|
50
|
+
Variable(
|
|
51
|
+
"GND_PIN",
|
|
52
|
+
str,
|
|
53
|
+
"The ground pin for the cells.",
|
|
54
|
+
pdk=True,
|
|
55
|
+
),
|
|
56
|
+
Variable(
|
|
57
|
+
"WIRE_LENGTH_THRESHOLD",
|
|
58
|
+
Optional[Decimal],
|
|
59
|
+
"A value above which wire lengths generate warnings.",
|
|
60
|
+
units="µm",
|
|
61
|
+
pdk=True,
|
|
62
|
+
),
|
|
63
|
+
Variable(
|
|
64
|
+
"TECH_LEFS",
|
|
65
|
+
Dict[str, Path],
|
|
66
|
+
"Map of corner patterns to to technology LEF files. A corner not matched here will not be supported by OpenRCX in the default flow.",
|
|
67
|
+
pdk=True,
|
|
68
|
+
),
|
|
69
|
+
Variable(
|
|
70
|
+
"GPIO_PADS_LEF",
|
|
71
|
+
Optional[List[Path]],
|
|
72
|
+
"Path(s) to GPIO pad LEF file(s).",
|
|
73
|
+
pdk=True,
|
|
74
|
+
),
|
|
75
|
+
Variable(
|
|
76
|
+
"GPIO_PADS_LEF_CORE_SIDE",
|
|
77
|
+
Optional[List[Path]],
|
|
78
|
+
"Path(s) to GPIO pad LEF file(s) as used for routing (?).",
|
|
79
|
+
pdk=True,
|
|
80
|
+
),
|
|
81
|
+
Variable(
|
|
82
|
+
"GPIO_PADS_VERILOG",
|
|
83
|
+
Optional[List[Path]],
|
|
84
|
+
"Path(s) to GPIO pad Verilog models.",
|
|
85
|
+
pdk=True,
|
|
86
|
+
),
|
|
87
|
+
Variable(
|
|
88
|
+
"GPIO_PAD_CELLS",
|
|
89
|
+
Optional[List[str]],
|
|
90
|
+
"A list of pad cell name prefixes.",
|
|
91
|
+
deprecated_names=[("GPIO_PADS_PREFIX", _prefix_to_wildcard)],
|
|
92
|
+
pdk=True,
|
|
93
|
+
),
|
|
94
|
+
Variable(
|
|
95
|
+
"PRIMARY_GDSII_STREAMOUT_TOOL",
|
|
96
|
+
str,
|
|
97
|
+
"Specify the primary GDSII streamout tool for this PDK. For most open-source PDKs, that would be 'magic'.",
|
|
98
|
+
pdk=True,
|
|
99
|
+
deprecated_names=["PRIMARY_SIGNOFF_TOOL"],
|
|
100
|
+
),
|
|
101
|
+
# Timing and Power
|
|
102
|
+
Variable(
|
|
103
|
+
"DEFAULT_MAX_TRAN",
|
|
104
|
+
Optional[Decimal],
|
|
105
|
+
"Defines the default maximum transition value used in Synthesis and CTS.\nA minimum of 0.1 * CLOCK_PERIOD and this variable, if defined, is used.",
|
|
106
|
+
units="ns",
|
|
107
|
+
pdk=True,
|
|
108
|
+
),
|
|
109
|
+
Variable(
|
|
110
|
+
"SIGNAL_WIRE_RC_LAYERS",
|
|
111
|
+
Optional[List[str]],
|
|
112
|
+
"Sets estimated signal wire RC values to the average of these layers'. If you provide more than two, the averages are grouped by preferred routing direction and you must provide at least one layer for each routing direction. If unset, tools should use the average of layers between RT_MIN_LAYER and RT_MAX_LAYER. This variable will be moved to the relevant step(s) in the next version of LibreLane.",
|
|
113
|
+
pdk=True,
|
|
114
|
+
deprecated_names=[
|
|
115
|
+
("WIRE_RC_LAYER", lambda x: [x]),
|
|
116
|
+
("DATA_WIRE_RC_LAYER", lambda x: [x]),
|
|
117
|
+
],
|
|
118
|
+
),
|
|
119
|
+
Variable(
|
|
120
|
+
"CLOCK_WIRE_RC_LAYERS",
|
|
121
|
+
Optional[List[str]],
|
|
122
|
+
"Sets estimated clock wire RC values to the average of these layers'. If you provide more than two, the averages are grouped by preferred routing direction and you must provide at least one layer for each routing direction. If unset, tools should use the average of layers between RT_MIN_LAYER and RT_MAX_LAYER. This variable will be moved to the relevant step(s) in the next version of LibreLane.",
|
|
123
|
+
pdk=True,
|
|
124
|
+
deprecated_names=[("CLOCK_WIRE_RC_LAYER", lambda x: [x])],
|
|
125
|
+
),
|
|
126
|
+
Variable(
|
|
127
|
+
"DEFAULT_CORNER",
|
|
128
|
+
str,
|
|
129
|
+
"The interconnect/process/voltage/temperature corner (IPVT) to use the characterized lib files compatible with by default.",
|
|
130
|
+
pdk=True,
|
|
131
|
+
),
|
|
132
|
+
Variable(
|
|
133
|
+
"STA_CORNERS",
|
|
134
|
+
List[str],
|
|
135
|
+
"A list of fully qualified IPVT (Interconnect, transistor Process, Voltage, and Temperature) timing corners on which to conduct multi-corner static timing analysis.",
|
|
136
|
+
pdk=True,
|
|
137
|
+
),
|
|
138
|
+
# Floorplanning
|
|
139
|
+
Variable(
|
|
140
|
+
"FP_TRACKS_INFO",
|
|
141
|
+
Path,
|
|
142
|
+
"A path to the a classic OpenROAD `.tracks` file. Used by the floorplanner to generate tracks.",
|
|
143
|
+
deprecated_names=["TRACKS_INFO_FILE"],
|
|
144
|
+
pdk=True,
|
|
145
|
+
),
|
|
146
|
+
Variable(
|
|
147
|
+
"FP_TAPCELL_DIST",
|
|
148
|
+
Decimal,
|
|
149
|
+
"The distance between tap cell columns.",
|
|
150
|
+
units="µm",
|
|
151
|
+
pdk=True,
|
|
152
|
+
),
|
|
153
|
+
Variable(
|
|
154
|
+
"FP_IO_HLAYER",
|
|
155
|
+
str,
|
|
156
|
+
"The metal layer on which to place horizontal IO pins, i.e., the top and bottom of the die.",
|
|
157
|
+
pdk=True,
|
|
158
|
+
),
|
|
159
|
+
Variable(
|
|
160
|
+
"FP_IO_VLAYER",
|
|
161
|
+
str,
|
|
162
|
+
"The metal layer on which to place vertical IO pins, i.e., the top and bottom of the die.",
|
|
163
|
+
pdk=True,
|
|
164
|
+
),
|
|
165
|
+
Variable("RT_MIN_LAYER", str, "The lowest metal layer to route on.", pdk=True),
|
|
166
|
+
Variable("RT_MAX_LAYER", str, "The highest metal layer to route on.", pdk=True),
|
|
167
|
+
]
|
|
168
|
+
|
|
169
|
+
scl_variables = [
|
|
170
|
+
# Common
|
|
171
|
+
Variable(
|
|
172
|
+
"SCL_GROUND_PINS",
|
|
173
|
+
List[str],
|
|
174
|
+
"SCL-specific ground pins",
|
|
175
|
+
deprecated_names=["STD_CELL_GROUND_PINS"],
|
|
176
|
+
pdk=True,
|
|
177
|
+
),
|
|
178
|
+
Variable(
|
|
179
|
+
"SCL_POWER_PINS",
|
|
180
|
+
List[str],
|
|
181
|
+
"SCL-specific power pins",
|
|
182
|
+
deprecated_names=["STD_CELL_POWER_PINS"],
|
|
183
|
+
pdk=True,
|
|
184
|
+
),
|
|
185
|
+
Variable(
|
|
186
|
+
"TRISTATE_CELLS",
|
|
187
|
+
Optional[List[str]],
|
|
188
|
+
"A list of cell names or wildcards of tri-state buffers.",
|
|
189
|
+
deprecated_names=[("TRISTATE_CELL_PREFIX", _prefix_to_wildcard)],
|
|
190
|
+
pdk=True,
|
|
191
|
+
),
|
|
192
|
+
Variable(
|
|
193
|
+
"FILL_CELL",
|
|
194
|
+
List[str],
|
|
195
|
+
"A list of cell names or wildcards of fill cells to be used in fill insertion.",
|
|
196
|
+
pdk=True,
|
|
197
|
+
),
|
|
198
|
+
Variable(
|
|
199
|
+
"DECAP_CELL",
|
|
200
|
+
List[str],
|
|
201
|
+
"A list of cell names or wildcards of decap cells to be used in fill insertion.",
|
|
202
|
+
pdk=True,
|
|
203
|
+
),
|
|
204
|
+
Variable(
|
|
205
|
+
"LIB",
|
|
206
|
+
Dict[str, List[Path]],
|
|
207
|
+
"A map from corner patterns to a list of associated liberty files. Exactly one entry must match the `DEFAULT_CORNER`.",
|
|
208
|
+
pdk=True,
|
|
209
|
+
),
|
|
210
|
+
Variable(
|
|
211
|
+
"CELL_LEFS",
|
|
212
|
+
List[Path],
|
|
213
|
+
"Path(s) to the cells' LEF file(s).",
|
|
214
|
+
deprecated_names=["CELLS_LEF"],
|
|
215
|
+
pdk=True,
|
|
216
|
+
),
|
|
217
|
+
Variable(
|
|
218
|
+
"CELL_GDS",
|
|
219
|
+
List[Path],
|
|
220
|
+
"Path(s) to the cells' GDSII file(s).",
|
|
221
|
+
deprecated_names=["GDS_FILES", "CELLS_GDS"],
|
|
222
|
+
pdk=True,
|
|
223
|
+
),
|
|
224
|
+
Variable(
|
|
225
|
+
"CELL_VERILOG_MODELS",
|
|
226
|
+
Optional[List[Path]],
|
|
227
|
+
"Path(s) to cells' Verilog model(s)",
|
|
228
|
+
pdk=True,
|
|
229
|
+
),
|
|
230
|
+
Variable(
|
|
231
|
+
"CELL_BB_VERILOG_MODELS",
|
|
232
|
+
Optional[List[Path]],
|
|
233
|
+
"Path(s) to cells' black-box Verilog model(s)",
|
|
234
|
+
pdk=True,
|
|
235
|
+
),
|
|
236
|
+
Variable(
|
|
237
|
+
"CELL_SPICE_MODELS",
|
|
238
|
+
Optional[List[Path]],
|
|
239
|
+
"Path(s) to cells' SPICE model(s)",
|
|
240
|
+
pdk=True,
|
|
241
|
+
),
|
|
242
|
+
Variable(
|
|
243
|
+
"SYNTH_EXCLUDED_CELL_FILE",
|
|
244
|
+
Path,
|
|
245
|
+
"Path to a text file containing a list of (wildcards matching) cells to be excluded from the lib file in synthesis alone.",
|
|
246
|
+
deprecated_names=["NO_SYNTH_CELL_LIST", "SYNTH_EXCLUSION_CELL_LIST"],
|
|
247
|
+
pdk=True,
|
|
248
|
+
),
|
|
249
|
+
Variable(
|
|
250
|
+
"PNR_EXCLUDED_CELL_FILE",
|
|
251
|
+
Path,
|
|
252
|
+
"Path to a text file containing a list of undesirable or bad (DRC-failed or complex pinout) cells or wildcards matching cells to be excluded from synthesis AND PnR.",
|
|
253
|
+
deprecated_names=["DRC_EXCLUDE_CELL_LIST", "PNR_EXCLUSION_CELL_LIST"],
|
|
254
|
+
pdk=True,
|
|
255
|
+
),
|
|
256
|
+
# Constraints
|
|
257
|
+
Variable(
|
|
258
|
+
"OUTPUT_CAP_LOAD",
|
|
259
|
+
Decimal,
|
|
260
|
+
"Defines the capacitive load on the output ports.",
|
|
261
|
+
units="fF",
|
|
262
|
+
deprecated_names=["SYNTH_CAP_LOAD"],
|
|
263
|
+
pdk=True,
|
|
264
|
+
),
|
|
265
|
+
Variable(
|
|
266
|
+
"MAX_FANOUT_CONSTRAINT",
|
|
267
|
+
int,
|
|
268
|
+
"The max load that the output ports can drive to be used as a constraint on Synthesis and CTS.",
|
|
269
|
+
units="cells",
|
|
270
|
+
deprecated_names=["SYNTH_MAX_FANOUT"],
|
|
271
|
+
pdk=True,
|
|
272
|
+
),
|
|
273
|
+
Variable(
|
|
274
|
+
"MAX_TRANSITION_CONSTRAINT",
|
|
275
|
+
Optional[Decimal],
|
|
276
|
+
"The max transition time (slew) from high to low or low to high on cell inputs in ns to be used as a constraint on Synthesis and CTS. If not provided, it is calculated at runtime as `10%` of the provided clock period, unless that exceeds the PDK's `DEFAULT_MAX_TRAN` value.",
|
|
277
|
+
units="ns",
|
|
278
|
+
deprecated_names=["SYNTH_MAX_TRAN"],
|
|
279
|
+
pdk=True,
|
|
280
|
+
),
|
|
281
|
+
Variable(
|
|
282
|
+
"MAX_CAPACITANCE_CONSTRAINT",
|
|
283
|
+
Optional[Decimal],
|
|
284
|
+
"The maximum capacitance constraint. If not provided, the constraint is not set in the SDC file which will fall back to the value set by the liberty file",
|
|
285
|
+
units="pF",
|
|
286
|
+
pdk=True,
|
|
287
|
+
),
|
|
288
|
+
Variable(
|
|
289
|
+
"CLOCK_UNCERTAINTY_CONSTRAINT",
|
|
290
|
+
Decimal,
|
|
291
|
+
"Specifies a value for the clock uncertainty/jitter for timing analysis.",
|
|
292
|
+
units="ns",
|
|
293
|
+
deprecated_names=["SYNTH_CLOCK_UNCERTAINTY"],
|
|
294
|
+
pdk=True,
|
|
295
|
+
),
|
|
296
|
+
Variable(
|
|
297
|
+
"CLOCK_TRANSITION_CONSTRAINT",
|
|
298
|
+
Decimal,
|
|
299
|
+
"Specifies a value for the clock transition/slew for timing analysis.",
|
|
300
|
+
units="ns",
|
|
301
|
+
deprecated_names=["SYNTH_CLOCK_TRANSITION"],
|
|
302
|
+
pdk=True,
|
|
303
|
+
),
|
|
304
|
+
Variable(
|
|
305
|
+
"TIME_DERATING_CONSTRAINT",
|
|
306
|
+
Decimal,
|
|
307
|
+
"Specifies a derating factor to multiply the path delays with. It specifies the upper and lower ranges of timing.",
|
|
308
|
+
units="%",
|
|
309
|
+
deprecated_names=["SYNTH_TIMING_DERATE"],
|
|
310
|
+
pdk=True,
|
|
311
|
+
),
|
|
312
|
+
Variable(
|
|
313
|
+
"IO_DELAY_CONSTRAINT",
|
|
314
|
+
Decimal,
|
|
315
|
+
"Specifies the percentage of the clock period used in the input/output delays.",
|
|
316
|
+
units="%",
|
|
317
|
+
deprecated_names=["IO_PCT"],
|
|
318
|
+
pdk=True,
|
|
319
|
+
),
|
|
320
|
+
# Synthesis
|
|
321
|
+
Variable(
|
|
322
|
+
"SYNTH_DRIVING_CELL",
|
|
323
|
+
str,
|
|
324
|
+
"The cell to drive the input ports, used in synthesis and static timing analysis, in the format `{cell}/{port}`.",
|
|
325
|
+
pdk=True,
|
|
326
|
+
),
|
|
327
|
+
Variable(
|
|
328
|
+
"SYNTH_CLK_DRIVING_CELL",
|
|
329
|
+
Optional[str],
|
|
330
|
+
"The cell to drive the clock input ports, used in synthesis and static timing analysis, in the format `{cell}/{port}`. If not specified, `SYNTH_DRIVING_CELL` will be used.",
|
|
331
|
+
pdk=True,
|
|
332
|
+
),
|
|
333
|
+
Variable(
|
|
334
|
+
"SYNTH_TIEHI_CELL",
|
|
335
|
+
str,
|
|
336
|
+
"Defines the tie high cell followed by the port that implements the tie high functionality, in the format `{cell}/{port}`.",
|
|
337
|
+
pdk=True,
|
|
338
|
+
),
|
|
339
|
+
Variable(
|
|
340
|
+
"SYNTH_TIELO_CELL",
|
|
341
|
+
str,
|
|
342
|
+
"Defines the tie high cell followed by the port that implements the tie low functionality, in the format `{cell}/{port}`.",
|
|
343
|
+
pdk=True,
|
|
344
|
+
),
|
|
345
|
+
Variable(
|
|
346
|
+
"SYNTH_BUFFER_CELL",
|
|
347
|
+
str,
|
|
348
|
+
"Defines a buffer port to be used by yosys during synthesis: in the format `{cell}/{input_port}/{output_port}`",
|
|
349
|
+
pdk=True,
|
|
350
|
+
),
|
|
351
|
+
Variable(
|
|
352
|
+
"WELLTAP_CELL",
|
|
353
|
+
str,
|
|
354
|
+
"Defines the cell used for tap insertion.",
|
|
355
|
+
pdk=True,
|
|
356
|
+
deprecated_names=["FP_WELLTAP_CELL"],
|
|
357
|
+
),
|
|
358
|
+
Variable(
|
|
359
|
+
"ENDCAP_CELL",
|
|
360
|
+
str,
|
|
361
|
+
"Defines so-called 'end-cap' cells- decap cells placed at either sides of a design.",
|
|
362
|
+
pdk=True,
|
|
363
|
+
deprecated_names=["FP_ENDCAP_CELL"],
|
|
364
|
+
),
|
|
365
|
+
# Placement
|
|
366
|
+
Variable(
|
|
367
|
+
"PLACE_SITE",
|
|
368
|
+
str,
|
|
369
|
+
"Defines the primary placement site in placement as specified in the technology LEF files, to generate the placement grid.",
|
|
370
|
+
pdk=True,
|
|
371
|
+
),
|
|
372
|
+
Variable(
|
|
373
|
+
"CELL_PAD_EXCLUDE",
|
|
374
|
+
List[str],
|
|
375
|
+
"Defines a list of cells to be excluded from cell padding.",
|
|
376
|
+
pdk=True,
|
|
377
|
+
),
|
|
378
|
+
# Antenna
|
|
379
|
+
Variable(
|
|
380
|
+
"DIODE_CELL",
|
|
381
|
+
Optional[str],
|
|
382
|
+
"Defines a diode cell used to fix antenna violations, in the format {name}/{port}.",
|
|
383
|
+
pdk=True,
|
|
384
|
+
),
|
|
385
|
+
]
|
|
386
|
+
option_variables = [
|
|
387
|
+
# Common
|
|
388
|
+
Variable(
|
|
389
|
+
"DESIGN_DIR",
|
|
390
|
+
Path,
|
|
391
|
+
"The directory of the design. Should be set via command-line arguments or :meth:`Config.load` flags and not actual configuration files. If using a configuration file, ``DESIGN_DIR`` will be the directory where that file exists.",
|
|
392
|
+
),
|
|
393
|
+
Variable(
|
|
394
|
+
"PDK_ROOT",
|
|
395
|
+
Path,
|
|
396
|
+
"The home path of all PDKs. Should be set via command-line arguments or :meth:`Config.load` flags and not actual configuration files.",
|
|
397
|
+
),
|
|
398
|
+
Variable(
|
|
399
|
+
"DESIGN_NAME",
|
|
400
|
+
str,
|
|
401
|
+
"The name of the top level module of the design. Must be a valid C identifier, i.e., matches the regular expression `[_a-zA-Z][_a-zA-Z0-9]+`.",
|
|
402
|
+
),
|
|
403
|
+
Variable(
|
|
404
|
+
"PDK",
|
|
405
|
+
str,
|
|
406
|
+
"Specifies the process design kit (PDK). Must be a valid C identifier, i.e., matches the regular expression `[_a-zA-Z][_a-zA-Z0-9]+`.",
|
|
407
|
+
default="sky130A",
|
|
408
|
+
),
|
|
409
|
+
Variable(
|
|
410
|
+
"CLOCK_PERIOD",
|
|
411
|
+
Decimal,
|
|
412
|
+
"The clock period for the design.",
|
|
413
|
+
units="ns",
|
|
414
|
+
default=10.0,
|
|
415
|
+
),
|
|
416
|
+
Variable(
|
|
417
|
+
"CLOCK_PORT",
|
|
418
|
+
Union[None, str, List[str]],
|
|
419
|
+
"The name(s) of the design's clock port(s).",
|
|
420
|
+
),
|
|
421
|
+
Variable(
|
|
422
|
+
"CLOCK_NET",
|
|
423
|
+
Union[None, str, List[str]],
|
|
424
|
+
"The name of the net input to root clock buffer. If unset, it is presumed to be equal to CLOCK_PORT.",
|
|
425
|
+
),
|
|
426
|
+
Variable(
|
|
427
|
+
"VDD_NETS",
|
|
428
|
+
Optional[List[str]],
|
|
429
|
+
"Specifies the power nets/pins to be used when creating the power grid for the design.",
|
|
430
|
+
),
|
|
431
|
+
Variable(
|
|
432
|
+
"GND_NETS",
|
|
433
|
+
Optional[List[str]],
|
|
434
|
+
"Specifies the ground nets/pins to be used when creating the power grid for the design.",
|
|
435
|
+
),
|
|
436
|
+
Variable(
|
|
437
|
+
"DIE_AREA",
|
|
438
|
+
Optional[Tuple[Decimal, Decimal, Decimal, Decimal]],
|
|
439
|
+
'Specific die area to be used in floorplanning. Specified as a 4-corner rectangle "x0 y0 x1 y1".',
|
|
440
|
+
units="µm",
|
|
441
|
+
),
|
|
442
|
+
# Exclusion Options
|
|
443
|
+
Variable(
|
|
444
|
+
"EXTRA_EXCLUDED_CELLS",
|
|
445
|
+
Optional[List[str]],
|
|
446
|
+
"Wildcards matching additional cells to exclude from both synthesis and PnR.",
|
|
447
|
+
deprecated_names=["RSZ_DONT_USE_CELLS", "DONT_USE_CELLS"],
|
|
448
|
+
),
|
|
449
|
+
# Macros
|
|
450
|
+
Variable(
|
|
451
|
+
"MACROS",
|
|
452
|
+
Optional[Dict[str, Macro]],
|
|
453
|
+
"A dictionary of Macro definition objects. See {py:class}`librelane.config.Macro` for more info.",
|
|
454
|
+
),
|
|
455
|
+
Variable(
|
|
456
|
+
"EXTRA_LEFS",
|
|
457
|
+
Optional[List[Path]],
|
|
458
|
+
"Specifies miscellaneous LEF files to be loaded indiscriminately whenever LEFs are loaded.",
|
|
459
|
+
),
|
|
460
|
+
Variable(
|
|
461
|
+
"EXTRA_VERILOG_MODELS",
|
|
462
|
+
Optional[List[Path]],
|
|
463
|
+
"Specifies miscellaneous Verilog models to be loaded indiscriminately during synthesis.",
|
|
464
|
+
deprecated_names=["VERILOG_FILES_BLACKBOX"],
|
|
465
|
+
),
|
|
466
|
+
Variable(
|
|
467
|
+
"EXTRA_SPICE_MODELS",
|
|
468
|
+
Optional[List[Path]],
|
|
469
|
+
"Specifies miscellaneous SPICE models to be loaded indiscriminately whenever SPICE models are loaded.",
|
|
470
|
+
),
|
|
471
|
+
Variable(
|
|
472
|
+
"EXTRA_LIBS",
|
|
473
|
+
Optional[List[Path]],
|
|
474
|
+
"Specifies LIB files of pre-hardened macros used in the current design, used during timing analyses (and during parasitics-based STA as a fallback). These are loaded indiscriminately for all timing corners.",
|
|
475
|
+
),
|
|
476
|
+
Variable(
|
|
477
|
+
"EXTRA_GDS_FILES",
|
|
478
|
+
Optional[List[Path]],
|
|
479
|
+
"Specifies GDS files of pre-hardened macros used in the current design, used during tape-out.",
|
|
480
|
+
),
|
|
481
|
+
Variable(
|
|
482
|
+
"FALLBACK_SDC_FILE",
|
|
483
|
+
Path,
|
|
484
|
+
"A fallback SDC file for when a step-specific SDC file is not defined.",
|
|
485
|
+
deprecated_names=["BASE_SDC_FILE", "SDC_FILE"],
|
|
486
|
+
default=Path(os.path.join(get_script_dir(), "base.sdc")),
|
|
487
|
+
),
|
|
488
|
+
]
|
|
489
|
+
|
|
490
|
+
flow_common_variables = pdk_variables + scl_variables + option_variables
|