Fixed banks of multiword registers #
Each bank entry contains eighteen little-endian half-word digits. The first forty-four physical registers are reserved for arithmetic and transfer workspaces. Register indices are part of the code, so even width two requires no address large enough to name the bank.
Main definitions #
Bank.regs: the eighteen registers of a bank entry.Bank.Encodes: bounded digits with specified reconstructed bank values.
Main results #
Bank.encodes_update: composition through a framed update of one bank entry.
References #
Number of non-workspace registers in a bank with n entries.
Instances For
theorem Cslib.WordRAM.Multiword.Bank.digit_regs {n : ℕ} (j : Fin n) (i : Fin (capacity n + 4)) :
i ∈ regs j → Workspace.IsDigit i
theorem Cslib.WordRAM.Multiword.Bank.encodes_update {n w : ℕ} {x y : Data (capacity n + 4)} {v : Fin n → ℕ} (hx : Encodes w x v) (d : Fin n) (z : ℕ) (hy : Bounded (radix w) y (regs d)) (hz : value (radix w) y (regs d) = z) (hp : ∀ (i : Fin (capacity n + 4)), 44 ≤ ↑i → i ∉ regs d → y.regs i = x.regs i) :
Encodes w y (Function.update v d z)
Updating one entry preserves the encodings of every other entry. Workspace registers below forty-four may change freely.