Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 9 additions & 2 deletions chipflow_lib/pin_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@
from typing import Any, List, Dict, Tuple

from chipflow_lib import _parse_config, _ensure_chipflow_root, ChipFlowError
from chipflow_lib.platforms import PACKAGE_DEFINITIONS, PIN_ANNOTATION_SCHEMA, top_interfaces
from chipflow_lib.platforms.utils import LockFile, Package, PortMap, Port
from chipflow_lib.platforms import (
PACKAGE_DEFINITIONS,
PIN_ANNOTATION_SCHEMA,
top_interfaces,
LockFile,
Package,
PortMap,
Port
)
from chipflow_lib.config_models import Config

# logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
Expand Down
9 changes: 5 additions & 4 deletions chipflow_lib/platforms/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

__all__ = ['PIN_ANNOTATION_SCHEMA', 'PinSignature',
'OutputPinSignature', 'InputPinSignature', 'BidirPinSignature',
'load_pinlock', "PACKAGE_DEFINITIONS", 'top_interfaces']
'load_pinlock', "PACKAGE_DEFINITIONS", 'top_interfaces', 'LockFile',
'Package', 'PortMap', 'Port']


logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -257,7 +258,7 @@ class _BareDiePackageDef(_BasePackageDef):
"""

# Used by pydantic to differentate when deserialising
type: Literal["_QuadPackageDef"] = "_QuadPackageDef"
type: Literal["_BareDiePackageDef"] = "_BareDiePackageDef"

width: int
height: int
Expand Down Expand Up @@ -289,7 +290,7 @@ class _QuadPackageDef(_BasePackageDef):
"""

# Used by pydantic to differentate when deserialising
type: Literal["_PGAPackageDef"] = "_PGAPackageDef"
type: Literal["_QuadPackageDef"] = "_QuadPackageDef"

width:int
height: int
Expand Down Expand Up @@ -322,7 +323,7 @@ def sortpins(self, pins: Union[List[str], Set[str]]) -> List[str]:
"cf20": _BareDiePackageDef(name="cf20", width=7, height=3)
}

PackageDef = Union[_QuadPackageDef, _BasePackageDef]
PackageDef = Union[_QuadPackageDef, _BareDiePackageDef]


class Port(pydantic.BaseModel):
Expand Down
Loading