Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
kareefardi committed Oct 22, 2024
1 parent 04a5661 commit b8170b3
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 44 deletions.
21 changes: 7 additions & 14 deletions openlane/common/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,21 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import fnmatch
import glob
import os
import pathlib
import re
import glob
import typing
import fnmatch
import pathlib
import unicodedata
from math import inf
from typing import (
Any,
Generator,
Iterable,
List,
TypeVar,
Optional,
SupportsFloat,
Union,
)
from typing import (Any, Generator, Iterable, List, Optional, SupportsFloat,
TypeVar, Union)

import httpx

from .types import AnyPath, Path
from ..__version__ import __version__
from .types import AnyPath, Path

T = TypeVar("T")

Expand Down
28 changes: 28 additions & 0 deletions openlane/config/pdk_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,34 @@ def process_sta(key: str):
"nom_ss_100C_1v60",
"nom_ff_n40C_1v95",
]
## correlateRC.py gcd,ibex,aes,jpeg,chameleon,riscv32i,chameleon_hier
## cap units pf/um
# set_layer_rc -layer li1 -capacitance 1.499e-04 -resistance 7.176e-02
# set_layer_rc -layer met1 -capacitance 1.72375E-04 -resistance 8.929e-04
# set_layer_rc -layer met2 -capacitance 1.36233E-04 -resistance 8.929e-04
# set_layer_rc -layer met3 -capacitance 2.14962E-04 -resistance 1.567e-04
# set_layer_rc -layer met4 -capacitance 1.48128E-04 -resistance 1.567e-04
# set_layer_rc -layer met5 -capacitance 1.54087E-04 -resistance 1.781e-05
## end correlate
#
# set_layer_rc -via mcon -resistance 9.249146E-3
# set_layer_rc -via via -resistance 4.5E-3
# set_layer_rc -via via2 -resistance 3.368786E-3
# set_layer_rc -via via3 -resistance 0.376635E-3
# set_layer_rc -via via4 -resistance 0.00580E-3
#
# set_wire_rc -signal -layer met1
# set_wire_rc -clock -layer met3
new["LAYERS_RC"] = {
"*": {
"li1": {"res": 7.176e-02, "cap": 1.499e-04},
"met1": {"res": 8.929e-04, "cap": 1.72375e-04},
"met2": {"res": 8.929e-04, "cap": 1.36233e-04},
"met3": {"res": 1.567e-04, "cap": 2.14962e-04},
"met4": {"res": 1.567e-04, "cap": 1.54087e-04},
"met5": {"res": 1.781e-05, "cap": 1.54087e-04},
}
}
elif new["PDK"].startswith("gf180mcu"):
new["STA_CORNERS"] = [
"nom_tt_025C_5v00",
Expand Down
4 changes: 0 additions & 4 deletions openlane/scripts/openroad/common/io.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,6 @@ proc read_spefs {} {
}

proc read_pnr_libs {args} {
if { [get_libs -quiet *] != {} } {
exit 1
}

set i "0"
set tc_key "_LIB_CORNER_$i"
while { [info exists ::env($tc_key)] } {
Expand Down
49 changes: 23 additions & 26 deletions openlane/steps/openroad.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,37 +32,18 @@
import rich.table
import yaml

from ..common import (
Path,
TclUtils,
_get_process_limit,
aggregate_metrics,
get_script_dir,
mkdirp,
process_list_file,
)
from ..common import (Path, Filter, TclUtils, _get_process_limit, aggregate_metrics,
get_script_dir, mkdirp, process_list_file)
from ..config import Macro, Variable
from ..config.flow import option_variables
from ..logging import console, debug, info, options, verbose
from ..state import DesignFormat, State
from .common_variables import (
dpl_variables,
grt_variables,
io_layer_variables,
pdn_variables,
routing_layer_variables,
rsz_variables,
)
from .common_variables import (dpl_variables, grt_variables,
io_layer_variables, pdn_variables,
routing_layer_variables, rsz_variables)
from .openroad_alerts import OpenROADAlert, OpenROADOutputProcessor
from .step import (
CompositeStep,
DefaultOutputProcessor,
MetricsUpdate,
Step,
StepError,
StepException,
ViewsUpdate,
)
from .step import (CompositeStep, DefaultOutputProcessor, MetricsUpdate, Step,
StepError, StepException, ViewsUpdate)
from .tclstep import TclStep

EXAMPLE_INPUT = """
Expand Down Expand Up @@ -178,6 +159,12 @@ class OpenROADStep(TclStep):
"A list of fully-qualified IPVT corners to use. Can be overriden by some steps",
pdk=True,
),
Variable(
"LAYERS_RC",
Optional[Dict[str, Dict[str, Dict[str, Decimal]]]],
"Test",
pdk=True,
),
Variable(
"PDN_CONNECT_MACROS_TO_GRID",
bool,
Expand Down Expand Up @@ -279,6 +266,16 @@ def run(self, state_in, **kwargs) -> Tuple[ViewsUpdate, MetricsUpdate]:
if "check" in kwargs:
check = kwargs.pop("check")

layers_rc = self.config["LAYERS_RC"]
for corner_wildcard, metal_layers in layers_rc.items():
print(corner_wildcard, corners)
for corner in Filter(corner_wildcard).filter(corners):
for layer, rc in metal_layers.items():
res = rc["res"]
cap = rc["cap"]
print(f"{corner} {layer} {res} {cap}")

exit()
command = self.get_command()

subprocess_result = self.run_subprocess(
Expand Down

0 comments on commit b8170b3

Please sign in to comment.