Circuitos Digitales II The General Computer Architecture The CPU Control unit Semana No.9 Semestre 2008-2 Prof. Gustavo Patiño Prof.

Slides:



Advertisements
Similar presentations
JERARQUÍA DE MEMORIA MEMORIA VIRTUAL SEMANA NO.15 SEMESTRE PROF. EUGENIO DUQUE PÉREZ PROF. GUSTAVO PATIÑO
Advertisements

1 Circuitos Digitales II y Lab. Circuitos Digitales II y Lab. Arquitectura de Punto Flotante Semana No.14 Semestre Prof. Eugenio Duque Pérez
Circuitos Digitales II The General Computer Architecture The MIPS single-cycle datapath Semana No.8 Semestre Prof. Eugenio Duque
Adding the Jump Instruction
CS1104: Computer Organisation School of Computing National University of Singapore.
Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Overheads adapted from those provided by the authors of the textbook.
The Processor: Datapath & Control
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
Computer Structure - Datapath and Control Goal: Design a Datapath  We will design the datapath of a processor that includes a subset of the MIPS instruction.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Lecture 16: Basic CPU Design
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
1 COMP541 Completing the MIPS Datapath Montek Singh Mar 27, 2007.
The Processor Data Path & Control Chapter 5 Part 1 - Introduction and Single Clock Cycle Design N. Guydosh 2/29/04.
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
Chapter 5 Basic Processing Unit
Circuitos Digitales II The General Computer Architecture The Multicycle Design Semana No.10 Semestre Prof. Gustavo Patiño Prof.
IT253: Computer Organization Lecture 10: Making a Processor: Control Signals Tonga Institute of Higher Education.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
EE204 L12-Single Cycle DP PerformanceHina Anwar Khan EE204 Computer Architecture Single Cycle Data path Performance.
CPE232 Basic MIPS Architecture1 Computer Organization Multi-cycle Approach Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides
CDA 3101 Fall 2013 Introduction to Computer Organization
Electrical and Computer Engineering University of Cyprus LAB 2: MIPS.
1 A single-cycle MIPS processor  An instruction set architecture is an interface that defines the hardware operations which are available to software.
Computer Architecture Lecture 10 MIPS Control Unit Ralph Grishman Oct NYU.
Elements of Datapath for the fetch and increment The first element we need: a memory unit to store the instructions of a program and supply instructions.
CMSC 104, Lecture 061 Stored Programs A look at how programs are executed.
MIPS Processor.
1 The final datapath. 2 Control  The control unit is responsible for setting all the control signals so that each instruction is executed properly. —The.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
CS161 – Design and Architecture of Computer Systems
Electrical and Computer Engineering University of Cyprus
Computer Organization
Single-Cycle Datapath and Control
COMP541 Datapaths I Montek Singh Mar 28, 2012.
/ Computer Architecture and Design
Morgan Kaufmann Publishers The Processor
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Morgan Kaufmann Publishers The Processor
Processor Organization and Architecture
Computer Architecture
CS/COE0447 Computer Organization & Assembly Language
Design of the Control Unit for Single-Cycle Instruction Execution
The fetch-execute cycle
CSCI206 - Computer Organization & Programming
CSCE 212 Chapter 5 The Processor: Datapath and Control
Single-cycle datapath, slightly rearranged
Computer Organization “Central” Processing Unit (CPU)
Design of the Control Unit for One-cycle Instruction Execution
Systems Architecture II
MIPS Processor.
Control Unit Introduction Types Comparison Control Memory
Topic 5: Processor Architecture Implementation Methodology
Rocky K. C. Chang 6 November 2017
Composing the Elements
Composing the Elements
The Processor Lecture 3.2: Building a Datapath with Control
Guest Lecturer TA: Shreyas Chand
Topic 5: Processor Architecture
Fundamental Concepts Processor fetches one instruction at a time and perform the operation specified. Instructions are fetched from successive memory locations.
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
COMP541 Datapaths I Montek Singh Mar 18, 2010.
Instruction encoding We’ve already seen some important aspects of processor design. A datapath contains an ALU, registers and memory. Programmers and compilers.
ECE 352 Digital System Fundamentals
Chapter Four The Processor: Datapath and Control
Data Path Diagrams.
COMS 361 Computer Organization
Presentation transcript:

Circuitos Digitales II The General Computer Architecture The CPU Control unit Semana No.9 Semestre Prof. Gustavo Patiño Prof. Eugenio Duque Departamento de Ingeniería Electrónica Facultad de Ingeniería

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia The Central Processor Unit (CPU)

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia The CPU Control Unit Having designed the ALU or datapath so that it can perform the necessary instructions, we now have to do the same thing for the control unit, which decodes instructions and provides direction to the CPU. The MIPS control unit decodes the six bits on either end of the 32-bit instruction word, that is, the op code and function code* fields, to determine each instruction sequence.

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Functionality of Control Unit The control unit determines ALU functions in each instruction and selects operands for the ALU. The operation code (the left six bits of the instruction) determines the type of operation and in some cases (such as jump instructions) the actual instruction itself. In the case of register-register instructions, the function code determines the instruction (for example, in the R/R instruction above, the function code 0x 20 means add).

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Functionality of Control Unit (…cont) The control unit is a collection of decoders and multiplexers. The decoded instruction fields tell The ALU what function to perform, What operands to use.

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Completing ALU Design

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Current Architecture The ALU control uses instruction bits 0-5 to obtain information about the ALU operation in register-to- register instructions. Note in the following diagram that some of the decoding is done in the register block, which has the decoding mechanism that identifies source and destination registers in load/store and register/register operations. The ALU control also has input control lines from the operation code decoder which decodes bits 26-31, and which will be shown later.

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia ALU Design with ALU Control Design shown

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia ALU Control Block

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Single-Cycle ALU Design with Full Control Block

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Stages on the MIPS processor

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Op Code Control Block Signal Identifier

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Function OpCode Control Signals

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia OpCode Control Block Circuitry

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Instruction Disposition Showing Destination Units

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Data/Control Signal Flow Examples The following diagrams illustrate the flow of control signals and data in some example MIPS instructions in the single cycle implementation. The single cycle implementation is just a stepping stone to the final MIPS design, but this simpler example has all the features of the more complex final design in terms of data routing and the way in which the control signals determine the specific operation for each given instruction. Note the data flow in these instructions.

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Start of R-Type Instruction

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Next Step of R-Type Instruction

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Third Step of R-Type Instruction

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Completion of R-Type Instruction

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Load Instruction

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Branch Instruction

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Jump Instruction Circuitry Added

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Jump Instruction Flow

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Drawbacks of the Single-Cycle Implementation We have now completed design of the basic MIPS CPU. Although a good basic design, it has a serious drawback: The processor is designed so that all instructions complete in one clock cycle. While this assures that there is sufficient time to complete any instruction, it also means that one clock period must be long enough to accommodate the longest and most complicated instruction. Thus, ALL instructions take as long as the longest instruction. Since many (most!) instructions in the MIPS architecture take less time to execute than the longest instructions (which are usually the lw memory reference instructions), this means that we are slowing execution of the CPU a large part of the time to accommodate instructions that occur substantially less frequently.

Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Departamento de Ing. Electrónica Circuitos Digitales II Universidad de Antioquia Comparative Instruction Timing