Skip to main content

Module ontology

Module ontology 

Source
Expand description

The typed ontology of analog circuits.

The 10,000-year framing: encode what analog circuits ARE — every element class physics builds — not merely what this compiler lowers today. Three layers, one direction of reference:

Element (what physics builds)  ←— realized_by —  ComputeOp (what the compiler lowers)
        |                                                |
   EffectRow (effects.rs)                     AnalogCellKind (today's realized tile IR,
   [Element × PhysicsEffect]                   unchanged — injects via cell_kind_op)

The pit of success is the Rust exhaustive match: adding an Element variant breaks every classifying fn at compile time until the classification is consciously written, and the ledgers in analog_ontology_lock make the DIRECTION of change monotone — an element can only move Unrealized → ComputeMapped (a witnessed lowering, celebrated), never silently back. Nothing in the existing lanes moves: AnalogCellKind is untouched and injects into the vocabulary totally.

Enums§

BjtRegion
ComputeOp
Layer 2: the compute vocabulary — the ops the ontology recognizes. The REALIZED subset is bijective with today’s tile IR; the rest are named-future (the KNOWN_PLANNED ledger).
DiodeRegion
Element
One element of the analog universe.
ElementRole
Layer 3: an element’s role — the total classification the ledgers pin.
FunctionalMacro
Functional macros — the characterized, replicated blocks a chip is actually built from.
MosRegion
Passive
Two-terminal and passive network elements.
Semiconductor
Semiconductor primitives, by device × operating region (the region IS the mathematical law the element contributes — subthreshold is exp, saturation is square-law).
SourceElement
Independent and controlled sources — the linear-network vocabulary.
SupportFunction
What a non-compute element does for the chip.

Constants§

ALL_COMPUTE_OPS
ALL_ELEMENTS
Every element, exactly once, in canonical order — the census surface.
REALIZED_OPS
The ops whose tile kinds exist in the ADL today (ALL_ANALOG_CELL_KINDS) — the anchor of the realized/planned split.

Functions§

cell_kind_op
Total injection of today’s tile IR into the vocabulary — no wildcard, so a new cell kind cannot escape the ontology.
element_name
The census device: a stable name per element — exhaustive by construction (delegates to the leaf enums’ Debug, which the census lock pins for duplicates and coverage).
realizing_elements
Which elements realize each compute op — exhaustive, non-empty. For REALIZED ops every listed realizer is itself ComputeMapped/Interface (the lock proves it); for PLANNED ops the realizers are the elements whose lowering phase will promote them.
role
THE role classification — exhaustive over every leaf, no _ arm anywhere.