- #1
ver_mathstats
- 260
- 21
- Homework Statement
- We need to determine the binary encoding for five-stage pipeline with register banks, r0 to r3 is bank A, and r4 to r7 is bank B. It is a 16-bit architecture. Determine the largest offset that you can encode.
- Relevant Equations
- binary encoding, offset
In class we were given the example of a 32-bit architecture, so the opcode has 5 bits, register A had four bits, register B had four bits, the destination register had 4 bits and the offset was 15 bits, this was how it was done for "add" instruction. But when I was further reading about it online I saw that the opcode was a different amount of bits for a 32-bit architecture so are there several right answers to questions like this? And what are the different types of operand encodings I am a bit confused by this.
For a 16-bit architecture would it be 2 bits for the opcode, 4 bits for register A, 4 bits for register B, and then 4 bits for the destination register, and then it would be a maximum of 2 bits for the offset that I can encode? This is what I have in mind for the add instruction, am I on the right track with this?
Thank you.
For a 16-bit architecture would it be 2 bits for the opcode, 4 bits for register A, 4 bits for register B, and then 4 bits for the destination register, and then it would be a maximum of 2 bits for the offset that I can encode? This is what I have in mind for the add instruction, am I on the right track with this?
Thank you.