Skip to main content

run_program_cfg_on_grid

Function run_program_cfg_on_grid 

Source
pub fn run_program_cfg_on_grid(pf: &ProgramCfgFabric, params: &[i64]) -> i64
Expand description

Run a whole (acyclic-control-flow) function on the reconfigurable GRID (Stage X4 — the whole-program XPU). Each basic block’s straight-line body is PLACED on a fresh tile array (route_loop_body, the block’s live-in registers as inputs) with its downstream Srcs as the grid’s outputs — every register write, then the terminator’s predicate/return operand; eval_grid_all reads them off the placed array, the register file is updated, and a block-sequencing controller walks the terminator graph (Jump/Branch/Return), reconfiguring the array to the next block. So a BRANCHY whole program runs as spatial dataflow on ONE array (each block a reconfiguration), proven ≡ eval_program_cfg_fabric ≡ the VM. A block may carry Mem (heap read/write/alloc) tiles: ONE heap is threaded across every reconfiguration (eval_grid_all_with_heap), so collections/structs persist across blocks — the state plane. (Loops are the separate loop fabric.)