Question

In: Computer Science

A new instruction is to be included in our core MIPS instruction subset. This new true-op...

A new instruction is to be included in our core MIPS instruction subset.

This new true-op instruction is addm rt,disp(rs) which computes the sum of the contents of a memory word plus the contents of the rt register and places the sum back into the rt register.

a) Show the MIPS machine code format required for this new true-op instruction.

b) Are any changes to the multi-cycle datapath required to support this new true-op instruction? If so, describe the required changes.

c) Describe how the FSM (finite state machine) for our MIPS core instruction subset requires to be modified to support this new true-op instruction while continuing to support the other instructions within the subset without changing their behavior. In particular, what new or modified states, control signals and transitions are required?

Solutions

Expert Solution

The MIPS has a 32 bit architecture, with 32 bit instructions, a 32 bit data word, and 32 bit addresses. It has 32 addressable internal registers requiring a 5 bit register address. Register 0 always has the the constant value 0. Addresses are for individual bytes (8 bits) but instructions must have addresses which are a multiple of 4. This is usually stated as “instructions must be word aligned in memory.” There are three basic instruction types with the following formats,

R−type (register)

31 26 25 21 20 16 15 11 10 6 5 0

op rs rt rd shamt funct

6bits 5bits   5bits   5bits   5bits 6bits

I−type (immediate)

31 26 25 21 20 16 15 0

op rs rt immediate

6bits 5bits 5bits 16bits

J−type (jump)

31 26 25 0

op target

6bits 26bits

All op codes are 6 bits. All register addresses are 5 bits

Changes to the datapath for a multi-cycle implementation,

We have found that several additional registers are required in the multi-cycle datapath in order to save information from one cycle to the next. These were the registers IR, MDR, A, B, and ALUOut. The overall hardware complexity may be reduced, however, since the adders required for addressing have been replaced by the ALU. Recall that the primary reason for choosing five cycles was the assumption that the time to obtain a value from memory was the single slowest operation in the datapath. Also, we assumed that the register file operations take a smaller, but comparable, amount of time. If either of these conditions were not true, then quite a different schedule of operations might have been chosen.

Fortunately, after our design of the single cycle processor, we have a good idea of the datapath elements required to implement each individual instruction. We can also seek opportunities to reuse functional blocks in different cycles, potentially reducing the number of hardware blocks (and hence the complexity and cost) of the datapath.

The datapath for the multi-cycle processor is similar to that of the single cycle processor, with

• the addition of the registers noted (IR, MDR, A, B, and ALUOut)

• the elimination of the adders for address calculation

• a MUX must be extended because there are now three separate calculations for the next address (jump, branch, and the normal incrementing of the PC).

• additional control signals controlling the writing of the registers.


Related Solutions

Suppose the opcode of an MIPS instruction is 12 in decimal, and the rest of the...
Suppose the opcode of an MIPS instruction is 12 in decimal, and the rest of the machine code is 23483DB in hexadecimal (from high-order bit to low-order bit). What is the instruction? When showing the registers, use names (e.g. $t0, $s2) instead of indices (e.g $8, $17). For branch instructions, show offset in place of label, e.g. beq $t1, $t2, 92.
Consider the following C code: (10 marks) // write a MIPS instruction to initialize s0 to...
Consider the following C code: // write a MIPS instruction to initialize s0 to 6 t0 = ((s03 - 93)2 + s0 ) << 2 t1 = t0 / 4 Q2.1: Write a MIPS program that performs the operation of the above C program. Q2.2: What is the value of $t0 and $t1 after running your MIPS program (write your answer in a comment at the end of the code). Submit your answer to Q2 in a file named A2_Q2.asm
3.21 [10] <§3.5> If the bit pattern 0×0C000000 is placed into the Instruction Register, what MIPS...
3.21 [10] <§3.5> If the bit pattern 0×0C000000 is placed into the Instruction Register, what MIPS instruction will be executed? 3.22 [10] <§3.5> What decimal number does the bit pattern 0×0C000000 represent if it is a floating point number? Use the IEEE 754 standard. Given the following 32-bit binary sequences representing single precision IEEE 754 floating point numbers: a = 0100 0000 1101 1000 0000 0000 0000 0000 b = 1011 1110 1110 0000 0000 0000 0000 0000 Perform the...
True and False 1. The instruction register stores machine code for the instruction being executed. 2....
True and False 1. The instruction register stores machine code for the instruction being executed. 2. Before a digital computer may execute an instruction, the instruction code must be fetched from memory. 3. A pointer is a binary code for data in the arithmetic logic unit. 4. Von Neumann computer architecture stores data and instruction codes in the same memory. 5. Complex instruction set computers have instructions with greater speed than those in reduced instruction set computers.
Topics 1. Introduction 2. MIPS instruction set architecture (ISA) Exercise 1 Answer the following questions. (a)...
Topics 1. Introduction 2. MIPS instruction set architecture (ISA) Exercise 1 Answer the following questions. (a) List the five classic components of a computer. (b) Describe the steps that transform a program written in a high-level language such as Java into a representation that is directly executed by a computer processor.
Consider a star has the same central conditions as our Sun: - assuming that the core...
Consider a star has the same central conditions as our Sun: - assuming that the core is comprised of hydrogen, what is the extent of ionisation in the core due to the temperature? - sometimes an approximation is made that the entire core of the star is entirely ionised, comment on the validity of this assumption.?
The shareholders’ equity of Core Technologies Company on June 30, 2020, included the following: Common stock,...
The shareholders’ equity of Core Technologies Company on June 30, 2020, included the following: Common stock, $1 par; authorized, 6 million shares; issued and outstanding, 2 million shares $ 2,000,000 Paid-in capital—excess of par 8,000,000 Retained earnings 9,000,000 On April 1, 2021, the board of directors of Core Technologies declared a 10% stock dividend on common shares, to be distributed on June 1. The market price of Core Technologies’ common stock was $22 on April 1, 2021, and $32 on...
The shareholders’ equity of Core Technologies Company on June 30, 2020, included the following: Common stock,...
The shareholders’ equity of Core Technologies Company on June 30, 2020, included the following: Common stock, $1 par; authorized, 8 million shares; issued and outstanding, 4 million shares $ 4,000,000 Paid-in capital—excess of par 12,000,000 Retained earnings 34,000,000 On April 1, 2021, the board of directors of Core Technologies declared a 25% stock dividend on common shares, to be distributed on June 1. The market price of Core Technologies’ common stock was $30 on April 1, 2021, and $40 on...
The Dean of Instruction at a local college requested that a new standardized test for an...
The Dean of Instruction at a local college requested that a new standardized test for an introductory statistics course be developed with the requirement that it should have µ = 100 and σ = 10. A class of 30 students complete the new test with a mean grade of 95. Conduct a hypothesis test at α = .05 to determine whether the claim that µ = 100 can be supported. Use the p-value approach and complete the following to show...
Should Neandertals be included in our species (Homo sapiens neanderthalensis) or should they be their own...
Should Neandertals be included in our species (Homo sapiens neanderthalensis) or should they be their own species (Homo neanderthalensis)? Why or why not? (Use evidence to back up your stance and cite your sources.)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT