Ok great! We can perform our operations, but rather than just manually setting inputs and discarding outputs, how do we save them in memory?
The register file is the name for the construct holding data for each register. The number of registers, as well as their number of bits, can vary,
but Minecraft tends to work well with 8-bit registers in terms of compact builds.
We primarily will use 16, 8-bit registers (r0
… r15
), which means we need four bits for a register file decoder (2^4 = 16
).
Although this component is separate from all previous components, it is highly recommended that you know all prior architectural pieces before integrating your register file into your CPU.