feat: add experimental IHP support

This commit is contained in:
htfab
2024-09-24 22:23:12 +03:00
committed by Uri Shaked
parent dd77f85278
commit f8cc66a644
21 changed files with 4308 additions and 60 deletions
+16 -3
View File
@@ -10,7 +10,7 @@ class Port(TypedDict):
description: str
class Cell(TypedDict):
class Sky130Cell(TypedDict):
description: str
file_prefix: str
library: str
@@ -22,10 +22,23 @@ class Cell(TypedDict):
equation: Optional[str]
Cells = Dict[str, Cell]
class IHPCell(TypedDict):
description: str
doc_name: str
doc_ref: int
def load_cells() -> Cells:
Sky130Cells = Dict[str, Sky130Cell]
IHPCells = Dict[str, IHPCell]
def load_sky130_cells() -> Sky130Cells:
script_dir = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(script_dir, "cells.json")) as fh:
return json.load(fh)
def load_ihp_cells() -> IHPCells:
script_dir = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(script_dir, "ihp/cells.json")) as fh:
return json.load(fh)