Representing signed RAM states by unsigned words #
Source registers occupy target registers nine and above. The arithmetic workspace is disjoint from them. Source memory addresses are unchanged; each stored integer is encoded in one word.
Main definitions #
ToWordRAM.bank: the target register representing a source register.ToWordRAM.Represents: signed register bounds and the register/memory representation.
Main results #
ToWordRAM.Represents.set,ToWordRAM.Represents.write: representation after writes.ToWordRAM.Represents.of_frame: arithmetic blocks preserve represented source data.
References #
This representation is an original implementation choice for the existing signed RAM.
Distinct source registers have distinct target registers.
The source registers fit their signed width; target registers and memory encode the source data. Scratch values are unconstrained at instruction boundaries.
Every source register is a signed word.
The register bank stores canonical signed encodings.
Memory uses unchanged addresses and encoded values.
Instances For
Arithmetic scratch writes do not change the represented signed state.
Framed arithmetic preserves all represented source registers and memory.
A fitting signed register update is represented by a single bank update.
A signed memory update uses the same address and the encoded value.