Expand description
The programmable-part resources a fabric program spends, counted from exactly what the printer declares, so a program too big for its part is refused before a line of RTL is printed.
Every count is a LOWER bound — the fewest of a resource the declared memories and arrays can take — so a refusal is sound: the real design needs at least this much, and this much already does not fit. A block-RAM bank cannot hold more bits than its RAMBs do, a distributed-RAM memory cannot pack its bits into fewer than one LUT per 64 PER READ PORT (each port is its own LUT copy of the data — a pool read through a gather’s lanes replicates once a lane), a registers-style memory is one flip-flop a bit, and a matmul array is at least one DSP a MAC. Each is the bits of the memories the printer declares, divided down — never more than a routed image used.
Structs§
- Declared
Memory - A memory the fabric prints: the arguments one
memory_decl/print_poolcall receives, and the read ports it is read through (each a LUT copy when it is distributed RAM — a pool’snread, a tensor memory’s one). - Fabric
Usage - What a fabric spends of each part resource: a lower bound on the RAMB18s, LUT-RAM LUTs, flip-flops and DSP slices the printed design takes.
Functions§
- check_
capacity - Refuse
pontargetwhen it needs more of any of the part’s resources than it has — before any RTL is printed. A target with no part (SpatialTarget::partNone) is never refused here. - fabric_
memories - Every memory the fabric declares for
pontarget, in printer order: each site’s tensor memories (asprint_siteemits them, one per tensor in the site’s banks) then its pools (asprint_pooldoes). - fabric_
usage - The resources
pspends ontarget’s fabric. - usage_
by_ resource - A map from each resource to its usage, for a test to read.