Explain the operation of the mips andi instruction

Assignment Help Basic Computer Science
Reference no: EM13193190

1. Consider the following code fragment for the MIPS five stage pipelined processor:

instruction1 add $1, $8, $3 //$1 = $8 + $3

instruction2 sub $2, $1, $8 //$2 = $1 - $8

instruction3 add $3, $2, $1 //$3 = $2 + $1

instruction4 sub $5, $1, $2 //$5 = $1 - $2

instruction5 add $4, $2, $1 //$4 = $2 + $1

instruction6 add $9, $12, $11 //$9 = $12 + $11

a) You are to identify the problems, if any, which may be encountered in the pipeline. If you do identify any problems you are to explain them by using the instruction format terms <rd>, <rs>, <rt> for those instructions where there are problems.

b) At the end of clock cycle 6, which registers are being read and which register is being written. You must also identify which registers belong to which instruction in your answer.

b) Explain what the forwarding unit is doing during clock cycle 6. You are to identify which, if any, comparisons are being made in the instruction format terms <rd>, <rs>, <rt> for those instructions where there might be comparisons.

d) The code fragment is now changed to:

instruction1 add $1, $2, $3 //$1 = $2 + $3

instruction2 sub $4, $1, $6 //$4 = $1 - $6

instruction3 add $3, $2, $1 //$3 = $2 + $1

instruction4 lw $6, 8($3) //$6 = Memory[$3 + 8]

instruction5 sub $5, $1, $6 //$5 = $1 - $6

instruction6 add $9, $12, $11 //$9 = $12 + $11

Explain what the hazard detection unit is doing, for this new code fragment, during clock cycle 6 of execution. You are to state any comparisons that are being made in the instruction format terms <rd>, <rs>, <rt> for those instructions that might be compared. You are to state what the hazard unit will do in this case.

 

2. The following diagram reproduces the MIPS Single Cycle Datapath (Figure 5.1) from Computer Organization & Design: The Hardware Software Interface by Patterson and Hennessy.

a) In this representation every instruction takes at most 4 steps to complete a clock cycle. Explain what happens in each step of the clock cycle.

b) Clock cycle time = delay through combinational logic + register setup time + clock skew + delay through register. Briefly explain:

i) Why there is a delay through combinational logic.

ii) What the register setup time is.

iii) What clock skew is.

iv) What the delay through register is.

c) What type of MIPS instruction is represented by the diagram below? Provide two examples of this type of MIPS instruction.

Op

Rs

Rt

Rd

Shamt

funt

d) Explain what each field represents in the diagram from part c of this question (except the shamt field). In your explanation include the number of bits that each field requires and show each field's bit representation in the instruction format.

3)

a) Given the following MIPS machine instructions:

(i) 00010010111110010111111010111001

(ii) 00000000110010010111100000101010

For each machine instruction:

a) What is the instruction format class and why?

b) What operation will be performed and how did you identify the operation?

c) In decimal and in instruction format order, what registers (if any) represent rd, rs, rt? Hint rd is not always used. If you think no registers are used, state it.

d) What MIPS registers, if any, are used? In the case that MIPS registers are used, name them instruction format order and in terms of $at, $v0, $t0 etc. Hint rd is not always used. If you think no registers are used, state so.

e) In the case that an immediate value or an address is used, express it in hex. If you think the instruction does not use an immediate or an address, state so.

b) Explain the operation of the 'MIPS andi ' instruction. Illustrate your answer with an appropriate example. In your answer you must provide details of the andi instruction format and of what each field in that instruction format does and how an andi instruction is identified.

4)

Explain the operation of the following MIPS assembler instruction as it passes through each stage of the MIPS pipeline. You are to highlight any parallelism and redundancy that may occur as the instruction passes through the various pipeline stages. You are to assume there is no impact on this instruction by previously executed instructions. A diagram is not required.

Reference no: EM13193190

Questions Cloud

Find the equation of the line for the demand equation : Find the equation of the line for the demand equation. Write your answer in the form p = mx + b. (Hint: Write an equation using two points in the form (x,p)).
What are the optimum dimensions : Make a chart of the possible dimensions for a rectangle with an area of 196 m2. What are the optimum dimensions of the rectangle for minimizing the perimeter?
How many deer are in the preserve : To determine the number of deer in a games preserve, a conservationist catches 555 deer, tags them and lets them loose. Later 534 deer are caught; 178 of them are tagged. How many deer are in the preserve?
Compute the wavelength of a neutron : Calculate the wavelength of a neutron that has a velocity of 250 cm/s.
Explain the operation of the mips andi instruction : Illustrate your answer with an appropriate example. In your answer you must provide details of the andi instruction format and of what each field in that instruction format does and how an andi instruction is identified.
Define the freezing point of blood : The freezing point of blood is -0.52C. (a) What is the osmotic pressure of the blood at 25C? (b) What is the vapor pressure lowering of the blood at this temperature?
What volume of hydrogen gas in hcl : What volume of hydrogen gas, in liters, is produced by the reaction of 4.17g of iron metal with 60.0 mL of 3.00M HCl?
Compute the freezing point depression of a solution : Calculate the freezing point depression of a solution containing 0.20% wt/v glucose (mol wt of 180) and 0.5% NaCl
Compute the partial pressure in atmospheres : Calculate the partial pressure in atmospheres of O2 in the air outside an airplane cruising at an altitude of 10 km, where the atmospheric pressure is 190.0 mmHg

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is the chance of success on first attempt

What is the chance of success on the first attempt? What is the probability of exactly k collisions and then a success?

  Calculate present value of future earnings

Why do we need to calculate the present value of future earnings? A company can invest $100,000 to develop a new system, or it can put that amount into a second best alternative investment getting 10 percent.

  Apply yen''s algorithm to find the shortest path from node 1

Apply Yen's alogithm to find the shortest paqth from node 1 to all

  Capacity as a systems analyst

In your capacity as a systems analyst, you may face situations in which you encounter an ethical dilemma. For example, you may be asked to design a system that supports an activity with which you personally disagree

  Actions-hard disk crash and all data backed up are lost

You come to work on a Monday morning and find that the office computer is not working. The system manager informs everyone that the computer's hard disk crashed and that all datat that wer not backed up are lost. What do you do?

  Deterministic context free and context free grammar

Classify the languages given below as a) deterministic context free, b) context free but not deterministic, c) not context free. Give explanantion.

  Explaining the available bandwidth as function of n

Assuming average packet size is 5 slot times, expreess the available bandwidth as a function of N?

  Required value for the move command

Shape_index is a required value for the move command. It is the index of the shape in the shape data arrays that you wish to move. It should range between 0 and MAX_SHAPES - 1. Be sure to validate the index.

  Limit approach to determine the order

Use the limit approach to determine the order for g(n) = n^J and f(n) = n^k, where k > j > 2

  Support day-to-day working activities of organization

____are used to support day-to-day working activities of organization. Typical decisions involve e-commerce transaction acceptance, approval of personal loans by bank.

  A fuel economy study was carried out

A Fuel economy study was carried out for five models of cars. each car was driven 100 miles, and then the model of the car and the number of gallons used were placed in a line of the file Mileage.txt. Table 7.22 shows the data for the entries of t..

  Communication links on the telephone network

The time delay of a long-distance call can be determined by multiplying a small fixed constant by the number of communication links on the telephone network between the caller and callee. Suppose the telephone network of a company named RT&T is a fre..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd