Skip to main content

Module size_buffers

Module size_buffers 

Source
Expand description

size_buffers — buffering as a GENERAL pass: depths from a rate model under the local-memory budget, a deterministic non-overlapping layout, typed refusals.

A FIFO’s depth is what Little’s law asks for — the pages its producer must keep in flight to cover the own latency at the rate its consumer drains them, plus the one being filled — floored at two and capped by the site’s memory, which is spent on whichever buffer is shortest. The output FIFO holds one page per sub-block; the spill buffer holds every sub-block’s partial in the accumulator’s width. Offsets are first-fit in buffer order per site, so group members (identical buffer sets) land at identical offsets — a multicast writes one local address on every receiver.

Functions§

footprint_bytes
Bytes of the busiest site’s buffers as the program stands (placed) or as its plan implies (template).
footprint_bytes_for_plan
Bytes a plan’s buffers need on one site (the legality formula tile uses; conservative: depth 2).
resize_operand_fifos
Re-size every operand FIFO to depth pages and lay the site out again.
size_buffers