Skip to main content

concat

Function concat 

Source
pub fn concat(
    name: &'static str,
    programs: &[&Program],
) -> (Program, Vec<usize>)
Expand description

Several programs in one ROM: concatenated bundles, a shared constant bank (deduplicated), and the entry bundle of each program.

The machine addresses constants through bank I at CONST_BASE + c, above every program’s inputs, so inputs keep their indices and only constant operands are re-indexed into the merged bank. Each program keeps its own end flag, so a context started at an entry retires at the end of that program. Register counts and outputs are the maximum over the programs (one context runs one program at a time); operation counts are sums.