Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review class names #574

Open
sebastian-goeldi opened this issue Jan 25, 2025 · 2 comments
Open

Review class names #574

sebastian-goeldi opened this issue Jan 25, 2025 · 2 comments
Assignees

Comments

@sebastian-goeldi
Copy link
Collaborator

sebastian-goeldi commented Jan 25, 2025

Currently the names for classes are a bit all over the place, especially the new ones for the intermediate/abc classes.

Let's think a bit about it. I think the main discussion points should be about the Base[...]/Proto[...]/T[...] class names

\cc @tvt173 @joamatab @flaport

@sebastian-goeldi
Copy link
Collaborator Author

sebastian-goeldi commented Jan 26, 2025

This is a somewhat broken down class diagram of the current implementation. Instance/DInstance and Port/DPort share a similar inheritance

---
title: Cell/Instance/Port Structure
---
classDiagram
    class BaseKCell {
        +ports: list[BasePort]
        +settings: KCellSettings
        +settings_units: KCellSettingsUnits
        +vinsts: list[VInstance]
        +info: Info
        +kcl: KCLayout
        +function_name: str | None = None
        +basename: str | None = None
    }

    class TKCell {
        +kdb_cell: kdb.Cell
        +locked: bool
        +lock()
    }

    class TVCell {
        -_locked
        +locked: bool
        +lock()
    }

    class KCell {
        +ports: Ports
        +insts: Instances
        +xmin: int
        ...
    }

    class DKCell{
        +ports: DPorts
        +insts: DInstances
        +xmin: float
        ...
    }

    class VKCell {
        -_base_kcell: TVCell
        -_shapes: dict[int, VShapes]
        -_name: str | None
        +xmin: float
        ...
    }

    class ProtoTKCell {
        -_base_kcell: TKCell
        +ports: ProtoPorts[TUnit]
        +insts: ProtoInstances[TUnit]
    }

    class ProtoKCell {
        +locked: bool
        +lock()
        +xmin: TUnit
        ...
    }

    class ProtoInstance {
    }

    class ProtoTInstance {
    }

    class VInstance {
    }

    class Instance {
    }

    class DInstance {
    }


    BaseKCell <|-- TKCell
    BaseKCell <|-- TVCell

    ProtoKCell <|-- ProtoTKCell
    ProtoKCell <|-- VKCell
    ProtoTKCell <|-- KCell
    ProtoTKCell <|-- DKCell

    ProtoInstance <|-- ProtoTInstance
    ProtoInstance <|-- VInstance
    ProtoTInstance <|-- Instance
    ProtoTInstance <|-- DInstance

    ProtoInstances <|-- ProtoTInstances
    ProtoInstances <|-- VInstances
    ProtoTInstances <|-- Instances
    ProtoTInstances <|-- DInstances
Loading

@MatthewMckee4
Copy link
Member

I think at the bottom level, the names should remain, and we should keep that structure (K..., DK..., VK...). Theres also maybe an argument to make the VK prefix VDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants