Skip to content

Commit

Permalink
Update Volare for more user-friendly PDK picking + TEMPORARY hotfix f…
Browse files Browse the repository at this point in the history
…or gf180mcu issue
  • Loading branch information
donn committed Jan 10, 2024
1 parent 15797c0 commit 2d292da
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
4 changes: 2 additions & 2 deletions nix/volare.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
pkgs ? import ./pkgs.nix {},
}:
let
rev = "727e2be84a9d8eb62cf3a2756ab959670f891019";
sha256 = "sha256-Yb2LtsMJJwETbelWic8GLGxSYAw2PQjb9RufKnEY+zI=";
rev = "47325949b87e857d75f81d306f02ebccf952cb15";
sha256 = "sha256-H9B/vZUs0O2jwmidCTMYhO0JY4DL+gmQNeVawaccvuU=";
in let src = pkgs.fetchFromGitHub {
owner = "efabless";
repo = "volare";
Expand Down
2 changes: 2 additions & 0 deletions openlane/config/pdk_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def process_sta(key: str):
return
lib = lib_raw.strip()
lib_list = ws.split(lib)
if new["PDK"].startswith("gf180mcu"):
lib_list = [l.replace("liberty", "lib") for l in lib_list]
first_lib = os.path.basename(lib_list[0])[:-4]
pvt = first_lib.split("__")[1]
if default_pvt == "":
Expand Down
14 changes: 12 additions & 2 deletions openlane/flows/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

from .flow import Flow
from ..common import set_tpe, get_opdks_rev, cli
from ..logging import set_log_level, err, options, LogLevels
from ..logging import set_log_level, verbose, err, options, LogLevels
from ..state import State, InvalidState


Expand Down Expand Up @@ -133,7 +133,6 @@ def pdk_scl_cb(
values[param.name] = value
if "pdk" in values and "scl" in values:
pdk = values["pdk"]
pdk_family = pdk[:-1]
if ctx.obj and ctx.obj.get("use_volare"):
import volare

Expand All @@ -143,6 +142,17 @@ def pdk_scl_cb(
if scl := values["scl"]:
include_libraries.append(scl)

pdk_family = None
if family := volare.Family.by_name[pdk]:
ctx.params["pdk"] = family.default_variant
pdk_family = family.name
verbose(f"Resolved PDK variant {family.default_variant}.")
else:
for family in volare.Family.by_name.values():
if pdk in family.variants:
pdk_family = family.name
break

version = volare.fetch(
volare_home,
pdk_family,
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ cloup>=1.0.1,<2
pyyaml>=5,<7
rich>=12,<13
requests>=2.27,<3
volare>=0.15.1
volare>=0.16.0
lxml>=4.9.0
deprecated>=1.2.10,<2
immutabledict>=2,<3
libparse>=0.3.1,<1
psutil>=5.9.0
ioplace_parser~=0.1.0
ioplace_parser~=0.1.0

0 comments on commit 2d292da

Please sign in to comment.