Skip to main content

route_straight_line

Function route_straight_line 

Source
pub fn route_straight_line(
    cells: &[FabricOp],
    n_in: usize,
    result: usize,
) -> Grid
Expand description

The placer + router. Map a straight-line fabric (FabricOp SSA, from the real compiled residual) onto the tile array. Placement: cell i computes on the diagonal at (2(i+1), i) — its own column i carries its result downward. Routing: an operand that is a global input or constant is TAPPED directly (inputs fan out for free); an operand that is another cell’s value is routed via a Manhattan path — forked EAST off its column (he←N, which coexists with the column’s downward vs←N, so fan-out costs nothing) and turned back into the consumer’s north (vs←W) or read from its west. Correct by construction; the S3 SAT proof catches any slip.