Skip to main content

Module fabric_target

Module fabric_target 

Source
Expand description

fabric_target — the ADL spine: a FabricTarget descriptor + place_with_target.

One certified lowering, retargeted across fabric shapes (the MLAR ask). A FabricTarget names the array size, the ALU/functional-unit capability set, and the memory depth; place_with_target runs the certified route_loop_body placer THROUGH that descriptor and pads onto the described array. Every setting is either provably ≡VM (certified by fabric_target_lock, reusing verified_placer_lock’s SAT) or refused with a typed Unplaceable — a correct grid or a named refusal, never a silently-wrong chip.

Structs§

FabricTarget
A described fabric — the ADL. One certified lowering (place_with_target) retargets across shapes by varying this descriptor; each setting is either provably ≡VM or refused with an Unplaceable.
MemHierarchy
The on-/off-chip memory hierarchy a target provides, in the SN40L three-tier shape (Phase 5).
SiliconSpec
Real-silicon facts about a physical target that do not map onto the placement fields (which model the per-datapath array). Present only for a target backed by a real chip; None for the abstract presets. Every value must be a published spec cited at the constructor — this is descriptor metadata, not a claim we place.

Enums§

Capability
A capability a program cell requires from a target — the unit of the ADL’s typed refusal.
Dataflow
The GEMM dataflow a target realizes. Reduction is the universal baseline — the 1-D dot-product MAC lane every fabric ships today; WeightStationary / OutputStationary are the 2-D systolic modes (Phase 1+).
MemTier
A tier of the memory hierarchy a schedule demands (Phase 5).
Precision
A numeric format a target’s compute realizes (the precision dial, Phase 4).
Unplaceable
Why a program cannot be placed on a given target — a TYPED refusal, never a silently-wrong grid.

Constants§

ALL_ALU_OPS
Every combinational ALU op the fabric places (the AluOp universe).
ALL_FUNC_UNITS
Every sequential functional unit the fabric places (the FuncUnit universe).

Functions§

compile_to_config_table_on_target
Compile a whole program corpus onto ONE described array: if-convert each (source, function) to a decision island and place it THROUGH target, so every island shares the described shape. The resulting ConfigTable is certifiable by super::fabric_config::certify_config_table — config == k ⇒ the described array ≡ island k, for ALL inputs — the ADL’s retarget-a-corpus-onto-a-chosen-shape payoff. Returns a typed Unplaceable if any datapath needs a capability the target lacks or does not fit.
place_with_target
Place a dataflow body onto a DESCRIBED target: gate every cell against the target’s capability set, place with the certified route_loop_body, gate the placed shape against the described array, then pad onto it. Returns the placed+padded Grid, or a typed Unplaceable — a correct grid or a named refusal.