Assume that we would like to expand the MIPS register file t
Assume that we would like to expand the MIPS register file to 128 registers and expand the instruction set to contain four times as many instructions. How this would this affect the size of each of the bit fields in the R-type instructions? How this would this affect the size of each of the bit fields in the I-type instructions? How could each of the two proposed changes decrease the size of an MIPS assembly program? On the other hand, how could the proposed change increase the size of an MIPS assembly program?
Solution
2.18.1) Effect on R-type instructions:
log2(128) = 7 [since 128=27]
opcode = 6
rs = 7
rt = 7
rd = 7
shamt = 5
funct = 6
Here all the bits ends up with 2 additional bits. As there are 6 bits for opcode in R-type instruction the size of word is 44.
2.18.2) Effect on I-type Instruction:
log2(128) = 7 [since 128=27]
opcode = 6
rs = 7
rt = 7
immediate = 16
The word size of the I-type instruction is also 44.
2.18.3)
