Skip to content

Commit

Permalink
restore defaults
Browse files Browse the repository at this point in the history
Signed-off-by: Kareem Farid <[email protected]>
  • Loading branch information
kareefardi committed Jan 12, 2025
1 parent d4ca1ab commit fc9903d
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 90 deletions.
117 changes: 45 additions & 72 deletions openlane/config/pdk_compat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Efabless Corporation
# Copyright 2023-2025 Efabless Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -216,76 +216,51 @@ def process_sta(key: str):
]
new["PNR_CORNERS"] = [
"nom_tt_025C_1v80",
"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"] = {
"*tt*": {
"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},
},
"*ff*": {
"li1": {"res": 0.050232, "cap": 0.00010493},
"met1": {"res": 0.0006250299999999999, "cap": 0.0001206625},
"met2": {"res": 0.0006250299999999999, "cap": 9.53631e-05},
"met3": {
"res": 0.00010968999999999999,
"cap": 0.00015047339999999998,
},
"met4": {
"res": 0.00010968999999999999,
"cap": 0.00010786089999999998,
},
"met5": {"res": 1.2467e-05, "cap": 0.00010786089999999998},
},
"*ss*": {
"li1": {"res": 0.09328800000000001, "cap": 0.00019487},
"met1": {"res": 0.00116077, "cap": 0.00022408750000000002},
"met2": {"res": 0.00116077, "cap": 0.0001771029},
"met3": {"res": 0.00020370999999999999, "cap": 0.0002794506},
"met4": {
"res": 0.00020370999999999999,
"cap": 0.00020031309999999998,
},
"met5": {"res": 2.3153e-05, "cap": 0.00020031309999999998},
},
}
# 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
new["VIAS_RC"] = {
"*": {
"mcon": {"res": 9.249146e-3},
"via": {"res": 4.5e-3},
"via2": {"res": 3.368786e-3},
"via3": {"res": 0.376635e-3},
"via4": {"res": 0.00580e-3},
}
}
# new["LAYERS_RC"] = {
# "*tt*": {
# "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},
# },
# "*ff*": {
# "li1": {"res": 0.050232, "cap": 0.00010493},
# "met1": {"res": 0.0006250299999999999, "cap": 0.0001206625},
# "met2": {"res": 0.0006250299999999999, "cap": 9.53631e-05},
# "met3": {
# "res": 0.00010968999999999999,
# "cap": 0.00015047339999999998,
# },
# "met4": {
# "res": 0.00010968999999999999,
# "cap": 0.00010786089999999998,
# },
# "met5": {"res": 1.2467e-05, "cap": 0.00010786089999999998},
# },
# "*ss*": {
# "li1": {"res": 0.09328800000000001, "cap": 0.00019487},
# "met1": {"res": 0.00116077, "cap": 0.00022408750000000002},
# "met2": {"res": 0.00116077, "cap": 0.0001771029},
# "met3": {"res": 0.00020370999999999999, "cap": 0.0002794506},
# "met4": {
# "res": 0.00020370999999999999,
# "cap": 0.00020031309999999998,
# },
# "met5": {"res": 2.3153e-05, "cap": 0.00020031309999999998},
# },
# }
# new["VIAS_RC"] = {
# "*": {
# "mcon": {"res": 9.249146e-3},
# "via": {"res": 4.5e-3},
# "via2": {"res": 3.368786e-3},
# "via3": {"res": 0.376635e-3},
# "via4": {"res": 0.00580e-3},
# }
# }
elif new["PDK"].startswith("gf180mcu"):
new["STA_CORNERS"] = [
"nom_tt_025C_5v00",
Expand All @@ -300,8 +275,6 @@ def process_sta(key: str):
]
new["PNR_CORNERS"] = [
"nom_tt_025C_5v00",
"nom_ss_125C_4v50",
"nom_ff_n40C_5v50",
]

new["DEFAULT_CORNER"] = f"nom_{default_pvt}"
Expand Down
11 changes: 3 additions & 8 deletions openlane/scripts/openroad/common/io.tcl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022-2024 Efabless Corporation
# Copyright 2022-2025 Efabless Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -242,19 +242,14 @@ proc read_spefs {} {
proc read_pnr_libs {args} {
set i "0"
set tc_key "_LIB_CORNER_$i"
set corner_names [list]
while { [info exists ::env($tc_key)] } {
set corner_name [lindex $::env($tc_key) 0]
set corner_libs [lreplace $::env($tc_key) 0 0]

set corner($corner_name) $corner_libs

incr i
set tc_key "_LIB_CORNER_$i"
}

if { $i == "0" } {
puts stderr "\[WARNING\] No resizer-specific timing information read."
return
lappend corner_names $corner_name
}

define_corners {*}[array name corner]
Expand Down
8 changes: 3 additions & 5 deletions openlane/scripts/openroad/common/set_rc.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# Resistance/Capacitance Overrides
# Via resistance
#

proc get_routing_layer_names {} {
set layer_names [list]
set layers [$::tech getLayers]
Expand All @@ -37,10 +37,9 @@ proc get_routing_layer_names {} {
return $layer_names
}


# Set custom layer RC
set i "0"
set tc_key "_LAYER_RC_$i"

while { [info exists ::env($tc_key)] } {
# [$corner] + [layer] + [str(round(res, 8))] + [str(round(cap, 8))]
set corner_name [lindex $::env($tc_key) 0]
Expand All @@ -57,10 +56,9 @@ while { [info exists ::env($tc_key)] } {
set tc_key "_LAYER_RC_$i"
}


# Set custom via RC
set i "0"
set tc_key "_VIA_RC_$i"

while { [info exists ::env($tc_key)] } {
set corner_name [lindex $::env($tc_key) 0]
set via_name [lindex $::env($tc_key) 1]
Expand Down
19 changes: 14 additions & 5 deletions openlane/steps/openroad.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Efabless Corporation
# Copyright 2023-2025 Efabless Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -193,19 +193,25 @@ class OpenROADStep(TclStep):
Variable(
"PNR_CORNERS",
Optional[List[str]],
"A list of fully-qualified IPVT corners to use. Can be overriden by some steps",
"A list of fully-qualified IPVT corners to use during PnR. Can be overriden by some steps",
pdk=True,
),
Variable(
"LAYERS_RC",
Optional[Dict[str, Dict[str, Dict[str, Decimal]]]],
"Test",
"Used during PNR steps, Specific custom resistance and capacitance values for metal layers."
+ " For each IPVT corner, a mapping for each metal layer is provided."
+ " Each mapping describes custom resistance and capacitance values."
+ " Usage of wildcards for specifying IPVT corners is allowed.",
pdk=True,
),
Variable(
"VIAS_RC",
Optional[Dict[str, Dict[str, Dict[str, Decimal]]]],
"Test",
"Used during PNR steps, Specific custom resistance and capacitance values for via layers."
+ " For each IPVT corner, a mapping for each via layer is provided."
+ " Each mapping describes custom resistance and capacitance values."
+ " Usage of wildcards for specifying IPVT corners is allowed.",
pdk=True,
),
Variable(
Expand Down Expand Up @@ -284,7 +290,9 @@ def run(self, state_in, **kwargs) -> Tuple[ViewsUpdate, MetricsUpdate]:
kwargs, env = self.extract_env(kwargs)
env = self.prepare_env(env, state_in)

corners: List[str] = self.config["PNR_CORNERS"] or self.config["STA_CORNERS"]
corners: List[str] = self.config["PNR_CORNERS"] or [
self.config["DEFAULT_CORNER"]
]

if "corners" in kwargs:
corners = kwargs.pop("corners")
Expand All @@ -304,6 +312,7 @@ def run(self, state_in, **kwargs) -> Tuple[ViewsUpdate, MetricsUpdate]:
lib_corners.append(corner)
lib_set_set.add(lib_set)
env[f"_LIB_CORNER_{count}"] = TclStep.value_to_tcl([corner] + libs)

debug(f"Liberty files for '{corner}' added: {libs}")
count += 1

Expand Down

0 comments on commit fc9903d

Please sign in to comment.