Skip to main content

plan_states

Function plan_states 

Source
pub fn plan_states(
    classes: Vec<StateClass>,
    sram_bytes: u64,
    reserve: &BTreeMap<u16, u64>,
) -> ResidencyPlan
Expand description

★ KEEP WHAT MOVES MOST PER BYTE HELD. In order of bytes moved a step per byte held — then the smaller class, then by name — each class goes on chip whole if its chip has room left beyond reserve, and stays in HBM/DDR (Dram) otherwise; a class that does not fit leaves the room to the classes after it. Every byte a class keeps on chip is a byte a step does not move off it, moved / bytes times over, so filling the SRAM densest-first is the most traffic whole classes can keep.