Static register-bank copies on the word RAM #
copyBank copies a finite sequence of source registers into an injective destination bank using
only native register-copy instructions, with a terminal self-copy on idle supplying the
zero-length code case without inspecting the word width or requiring a positive-width constant.
Main definitions #
copyBank: copyksource registers intokdestination registers, ending with anidleself-copy.
Main results #
copyBank_not_readsWidth: copying a finite register bank does not inspect the word width.copyBank_exec: copyingkdisjoint source registers into an injective destination bank takesk + 1instructions, preserving memory and all registers outside the destination bank.
theorem Cslib.WordRAM.copyBank_not_readsWidth {B : Basis} {r k : ℕ} (src dst : Fin k → Fin r) (idle : Fin r) :
¬(copyBank src dst idle).ReadsWidth
Copying a finite bank does not inspect the word width.
theorem Cslib.WordRAM.copyBank_exec {B : Basis} {r k : ℕ} (src dst : Fin k → Fin r) (idle : Fin r) (hi : Function.Injective dst) (hd : ∀ (i j : Fin k), src i ≠ dst j) (w : ℕ) (x : Data r) :
Copy disjoint source words into an injective destination bank, leaving the entire memory and all other registers unchanged. A neutral copy supplies the zero-length code case.