feat: enhance PDK support and add test coverage

- Updated gen_iverilog_filelist.py to exclude sequential models from the file list for GF180 PDK.
- Introduced black box definitions for GF180 and SKY130 IO cells in their respective .sv files.
- Added simulation models for GF180 IO cells and sequential cells in gf180_seq_sim_cells.v.
- Modified tc_clk.sv to utilize specific clock cells for GF180 and SKY130 PDKs.
- Implemented bi-directional and tri-state pad modules for GF180 and SKY130 PDKs in tc_io.sv.
- Enhanced dependency lock validation to include submodule checks in dependency_lock.py.
- Updated setup_helpers.py to support selective submodule initialization.
- Created a comprehensive testbench for PDK cells in tc_pdk_cells_tb.sv.
- Added tests for dependency helper functions and tech cell configurations to ensure proper error handling.
This commit is contained in:
maksyuki committed 2026-07-24 15:09:02 +08:00
1 parent 7c923687ff
commit bace16bfeb
24 files changed
+956 -41

No files matched your search

+15
View File
@@ -40,6 +40,7 @@ def validate_lock(data: dict[str, Any]) -> None:
raise LockError(f"source {name} revision must be a full 40-character commit")
_validate_url(f"source {name}", source["url"])
_validate_relative_path(f"source {name} destination", source["destination"])
_validate_source_submodules(name, source)
for name, archive in data["archives"].items():
_validate_archive("archive", name, archive)
for platform, tools in data["toolchains"].items():
@@ -60,6 +61,20 @@ def _validate_archive(kind: str, name: str, value: dict[str, Any]) -> None:
_validate_relative_path(f"{kind} {name} destination", value["destination"])
def _validate_source_submodules(name: str, value: dict[str, Any]) -> None:
submodules = value.get("submodules")
if submodules is None:
return
if value.get("recursive") is not True:
raise LockError(f"source {name} submodules require recursive=true")
if not isinstance(submodules, list) or not submodules:
raise LockError(f"source {name} submodules must be a non-empty list")
for submodule in submodules:
if not isinstance(submodule, str):
raise LockError(f"source {name} submodules must contain paths")
_validate_relative_path(f"source {name} submodule", submodule)
def _require_fields(kind: str, name: str, value: Any, fields: tuple[str, ...]) -> None:
if not isinstance(value, dict):
raise LockError(f"{kind} {name} must be an object")
+7 -4
View File
@@ -34,6 +34,7 @@ def ensure_git_repo(
revision: str,
*,
recursive: bool = False,
submodules: tuple[str, ...] = (),
update: bool = False,
allow_dirty: bool = False,
) -> None:
@@ -67,10 +68,12 @@ def ensure_git_repo(
raise RuntimeError(f"pinned dependency has local changes: {destination}")
if recursive:
run(
("git", "submodule", "update", "--init", "--recursive", "--depth", "1"),
cwd=destination,
)
command: tuple[str, ...] = ("git", "submodule", "update", "--init", "--depth", "1")
if submodules:
command += ("--", *submodules)
else:
command += ("--recursive",)
run(command, cwd=destination)
print(f"[dependency] {destination.name}: {revision}")