Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions lambdalib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from siliconcompiler import Design, ASICProject
from typing import List

from siliconcompiler import Design, ASIC
from siliconcompiler.library import LibrarySchema

# individual modules
from lambdalib import auxlib
Expand All @@ -18,7 +21,7 @@ class LambalibTechLibrary(Design):
This class encapsulates a main lambda library cell and a list of technology
libraries, providing a mechanism to alias them within an ASIC project.
"""
def __init__(self, lambdalib, techlibs):
def __init__(self, lambdalib, techlibs: List[LibrarySchema]):
"""Initializes the LambalibTechLibrary instance.

Args:
Expand All @@ -35,19 +38,19 @@ def __init__(self, lambdalib, techlibs):
self.__techlibs = techlibs

@classmethod
def alias(cls, project: ASICProject):
def alias(cls, project: ASIC) -> None:
"""Creates and registers aliases for the library and its techlibs in a project.

This method checks if the provided project is an ASICProject and if the
This method checks if the provided project is an ASIC and if the
lambda library cell exists within the project's libraries. If both
conditions are met, it adds an alias for the main library and adds
each associated technology library to the project's ASIC libraries.

Args:
project (ASICProject): The ASIC project instance to which the aliases
project (ASIC): The ASIC project instance to which the aliases
and libraries will be added.
"""
if not isinstance(project, ASICProject):
if not isinstance(project, ASIC):
return

tech = cls()
Expand Down