Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Use the basic building blocks in digital logic to put together a basic design of a MIPS microprocessor for a simple subset of the instruction

Use the basic building blocks in digital logic to put together a basic design of a MIPS microprocessor for a simple subset of the instruction set. These instructions illustrate most aspects of the processor: You may draw circuits into LogiSim and insert the circuit diagram in your report as a figure.

Memory reference: lw, sw

Arithmetic/logical: add, sub, and, or, slt

Control transfer: beq, j

Combinational Elements: Remember that you can use gates (AND, OR, XOR, NOT), Adders, ALUs, and Multiplexors as we have studied so far and as are diagrammed on the attached sheet called combinational elements. When looking at a circuit diagram for a combinational element we think of electricity (imagine it flowing like water) flowing from the left side of the diagram to the right side. Each wire, represented by a single line, represents and input with electricity flowing in at a high level (1) or a low-level (0).

Sequential Elements: We will also need to use something we discussed briefly earlier called a sequential element. A sequential element is one that introduces a formal sequencing into a circuit and only changes on the clock edge. The typical sequential element that we are interested in is a register. A register has an input D, and an output Q. There is always a signal on D and the goal is to have that signal reflected on Q constantly; allowing Q to change only when we are looking for that change.

Consider the above diagram on sequential elements. Notice in the right figure how the value reflected on the Q output only changes on the rising edge of the clock (i.e. when the clock value goes from 0 to 1).

Note that the D register shown this diagram is a one-bit register. When we are dealing with the processor design we will be using registers that are the size of a word in the machine we are designing a data path for. MIPS has 32-bit words so most of our registers and hence our buses or lines will be 32-bits. We can just draw a long box with a line coming in and a line coming out to represent a register of more than one bit.

We show a line is more than one bit or one value wide by drawing a diagonal line through it and writing the width of the bus or line above the diagonal like this:

This diagram represents 32-bits or a 32-bit wide bus (32 lines) coming into a device.

Now we have the tools to be able to draw a picture representing the register called the Program Counter addressing instruction memory and sending out an instruction to the processor.

QUESTION 1) In the above diagram, add diagonal lines to indicate the size of each of the lines coming into and going out of each logic element.

To continue in this exercise we will need to have one more concept down. This is the idea that we may want more than one input in general to a particular logic component. For example in the above diagram we may want to sometimes get a new program counter that is just the next instruction (hence the add 4 to the current program counter) or if the instruction is a branch or jump we will want to get some information from the instruction to change to the new program counter. When we want two different inputs, we need to use a multiplexor to change between the two rather than have two outputs (old PC and instruction) both going into the same input (new PC).

The diagram below shows an overview of the whole processor design we will be modifying.

QUESTION 2) Redo the diagram inserting multiplexors where needed.

Now that you have a new diagram with multiplexors, you will be focusing on elaborating on each section of the overview diagram to account for different parts of the execution of the machine for different instructions. To make sure that you understand the overview diagram, answer the following questions with respect to it.

QUESTION 3) What bits of the instruction will be sent to the second adder in the circuit computing the new PC why?

QUESTION 4) What bits of the instruction will be going into each of the Register # inputs of the Register file in the center of the machine?

QUESTION 5) For what kind of instruction will the output of the data memory be going into the input of the register file? Explain.

QUESTION 6) Now add to your overview picture, an oval for control showing lines coming in and lines going out to control the multiplexors. Label each line going into a multiplexor with a descriptive word to describe what control we want selecting the multiplexor input.

Now for each set of instructions you will be making a list of what the instruction type needs to do and draw basic block diagram of only the components relevant to these particular instructions.

Instruction Fetch/Branch Instructions: Refine the PC generation part of the block diagram and explain what needs to happen for a beq instruction and a jump instruction.

QUESTION 7) Now, for Instruction Fetch list necessary actions and draw a revised circuit diagram for the components required for instruction fetch.

R-Format Instructions: The R-format instructions are the add, sub, and, or, slt.

QUESTION 8) Now for R-Format instructions, list necessary actions and draw a revised circuit diagram for the components required in the execution of an R-format instruction.

Load/Store Instructions: The load/store instructions are lw and sw.

QUESTION 9) Now for Load/Store list necessary actions and draw a revised circuit diagram for the components required in the execution of a load/store instruction.

QUESTION 10) Now incorporate your smaller circuit diagrams into a larger overview diagram with all of the pieces together. Note that you can just label the control lines coming out of an oval appropriately labeled to indicate the signal you want generated by the control.

Note that in this version of the MIPS processor, one instruction is executed per clock cycle.

QUESTION 11) Describe how long that means this clock cycle will need to be in terms of the different instructions supported.

QUESTION 12) What impact does this have on the performance of the processor?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions