Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Question:2.18 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.

2.18.1 [5] How this would this affect the size of each of the bit fields in the R-type instructions?

2.18.2 [5] How this would this affect the size of each of the bit fields in the I-type instructions?

2.18.3 [5] 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?

Short Answer

Expert verified

2.18.1

The size of the fields “rs (source register)”,”rt (the second register operand)”, and the “rd (the destination register)” of the “R-Type” instruction is increased by the 7 bits.

2.18.2

The size of the fields “rs(source register)”,”rt(the second register operand)”, and the “rd(the destination register)” of the “I-Type” instruction is increased by the 7 bits.

2.18.3

The memory size which is occupied by the instruction word(the destination register) will be raised during the time period according to the necessity of adding the additional bits into the opcode. And the size of the program will be extended by the fields of the register.

Step by step solution

01

Define the concept.

2.18.1

For the “R-Type” instruction,



Component of the instruction

Occupied bits

Opcode

6

“rs”(source register)

5

“rt”(the second register operand)


5

“rd”(the destination register)

5

2.18.2

For the “I-Type” instruction,



Component of the instruction

Occupied bits

Opcode

6

“rs”(source register)

5

“rt”(the second register operand)


5

“rd”(the destination register)

5

2.18.3

The size of the programs can be reduced due to the below mentioned case.

If the complex operation will be operated in any single instruction has the amount of the leaking problem of the reducing register less than the complex operation will be operated in many instruction.

02

Determine the calculation.

2.18.1

For the “R-Type” instruction,

If the field size of the opcode will be extended by “2 bits” then the field size of the opcode will be 8 bits.

If the field size of the “rs (source register)” will be extended by “2 bits” then the field size of the opcode will be 7 bits.

If the field size of the “rt (the second register operand)” will be extended by “2 bits” then the field size of the opcode will be 7 bits.

If the field size of the “rd (the destination register)” will be extended by “2 bits” then the field size of the opcode will be 7 bits.

2.18.2

For the “I-Type” instruction,

If the field size of the opcode will be extended by “2 bits” then the field size of the opcode will be 8 bits.

If the field size of the “rs (source register)” will be extended by “2 bits” then the field size of the opcode will be 7 bits.

If the field size of the “rt (the second register operand)” will be extended by “2 bits” then the field size of the opcode will be 7 bits.

If the field size of the “rd (the destination register)” will be extended by “2 bits” then the field size of the opcode will be 7 bits.

2.18.3

The size of the programs can be reduced due to the below-mentioned case.

If the complex operation will be operated in any single instruction has the amount of the leaking problem of the reducing register less than the complex operation will be operated in many instruction.

The memory size which is occupied by the instruction word will be raised during the time period according to the necessity of adding the additional bits into the opcode. And the size of the program will be extended by the fields of the register.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Question: If the current value of the PC is 0x00000000, can you use a single jump instruction to get to the PC address as shown in Exercise 2.39?

Question: Assume the following register contents:

  1. For the register values shown above, what is the value of \(t2 for the following sequence of instructions?

sll \)t2,\(t0,44

or \)t2,\(t2,\)t1

  1. For the register values shown above, what is the values of \(t2 for the following sequence of instructions?

sll \)t2,\(t0,4

andi \)t2,\(t2,-1

  1. For the register values shown above, what is the value of \)t2 for the following sequence of instructions?

srl \(t2,\)t0,3

andi \(t2,\)t2, 0xFFEF

Question: [5] Assume for a given processor the CPI of arithmetic instructions is 1, the CPI of load/store instructions is 10, and the CPI of branch instructions is 3.

Assume a program has the following instruction breakdowns: 500 million arithmetic instructions, 300 million load/store instructions, 100 million branch instructions.

2.46.1 [5] <§2.19> Suppose that new, more powerful arithmetic instructions are added to the instruction set. On average, through the use of these more powerful arithmetic instructions, we can reduce the number of arithmetic instructions needed to execute a program by 25%, and the cost of increasing the clock cycle time by only 10%. Is this a good design choice? Why?

2.46.2 [5] <§2.19> Suppose that we find a way to double the performance of arithmetic instructions. What is the overall speedup of our machine? What if we find a way to improve the performance of arithmetic instructions by 10 times?

Question: Right before your function f from Exercise 2.34 returns, what do we know about contents of registers \(t5, \)s3, \(ra, and \)sp? Keep in mind that we know what the entire function f looks like, but for function func, we only know its declaration.

Question: [5] <§2.7> Suppose the program counter (PC) is set to 0x2000 0000. Is it possible to use the jump (j) MIPS assembly instruction to set the PC to the address as 0x4000 0000? Is it possible to use the branch-on-equal (beq) MIPS assembly instruction to set the PC to this same address?

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free