Presentation is loading. Please wait.

Presentation is loading. Please wait.

IT253: Computer Organization Lecture 10: Making a Processor: Control Signals Tonga Institute of Higher Education.

Similar presentations


Presentation on theme: "IT253: Computer Organization Lecture 10: Making a Processor: Control Signals Tonga Institute of Higher Education."— Presentation transcript:

1 IT253: Computer Organization Lecture 10: Making a Processor: Control Signals Tonga Institute of Higher Education

2 Control of a Processor We have already looked at how to build the datapath of the processer. The datapath will provide a way to execute instructions and for data to travel inside the processor We also need a way to control what happens, for example: –What instructions that are fetched? –What ALU operations? –What Registers to use? –Other smaller control signals? Our goal is to find the signals needed to perform some operations

3 Instruction Fetching The first step in executing an instruction is to fetch it from memory. It will be the same for all instructions. We need an Instruction Fetch Unit to accomplish this

4 Single Cycle Datapath for Adding With the instruction fetch unit made, we can look at the what signals we need to use to control the processor for adding

5 Instruction Fetch at end of Add How does the Instruction Fetch Unit change after an add operation?

6 Datapath signals for Or Immediate How does the datapath signals, or the control, change when we do a function with an immediate value?

7 The Datapath during Load

8 Datapath during Branch

9 Instruction Fetch and Branching The instruction fetch unit needs extra circuits to perform branching

10 Control Signals Table We can summarize all the control signals in one nice table.

11 Local Decoding How does the processor know how to use these signals? It uses an process called "local decoding." There is hardware that can determine what to do with the right control signals ALUop is usually two or three bits. It will be the code that determines what operation is happening (add, and, or, not). The func field helps choose between adding and subtracting. If you remember, add and sub use the same code, but just have an extra inverter for the subtract

12 Truth table for main control Just like the truth table for the ALUctr, we can make a truth table for all the control signals needed to perform any function This truth table is for the main control. It is complicated and requires you to study

13 Truth table for main control

14 Main Control Circuit Design

15 We have a truth table, how does this help? We have a truth table for all the values that the processor needs to make things happen. We need to remember that once we have a truth table we can make circuits and gates that implement the truth table. We can make a big circuit that will decode any signal and that will implement functions needed to make a processor run

16 ALUctr Truth Table How does ALUctr get set? We can actually make a truth table that tells what ALUctr will be. Remember ALUctr are the 3 bits that determines what function the ALU will do. So there needs to be a lot of different controls because there are many functions We need to be careful of the difference between the add used in a load word instruction and the add used to add two number together

17 ALUctr Truth Table

18 Putting the pieces together If you can believe it, or understand it, we have built all the parts needed to make a single cycle processor Single-cycle, of course, means that it can only do one instruction per clock cycle. This chapter gave us the Main Control, the instruction fetch unit and the ALU control. Now we can put these circuits with the pieces we made in the last chapter and get the whole CPU

19 A Single-Cycle processor

20 Problems with a Single Cycle Processor We have made a processor, even though it’s a simple processor. The ones that Intel makes are much more complicated The single cycle processor has a few drawbacks. That means there are things that make it so no one would want it in real life The biggest problem is that the processor needs to wait until an instruction is finished before it can start a new one Another problem is that it can only do one instruction at a time. Some instructions are very long to do (for example load word) and they make the overall system slower

21 Summary This concludes our section about processors. You should feel good about yourselves, because hopefully you understand how a processor actually works. In theory, if you really wanted to, you could build a processor on your own. And it would be really, really slow.


Download ppt "IT253: Computer Organization Lecture 10: Making a Processor: Control Signals Tonga Institute of Higher Education."

Similar presentations


Ads by Google