The Manual Processor. Lecture 17. Registers: The Multiplexers: The Arithmetic and Logic Unit. The Shifter (This is just a special multiplexer)

Similar documents
A 32-bit Processor: Sequencing and Output Logic

Let s put together a Manual Processor

68HC11 PROGRAMMER'S MODEL

CS.17.A.MachineI.Overview

Reference Sheet for C112 Hardware

CISC 662 Graduate Computer Architecture. Classifying ISA. Lecture 3 - ISA Michela Taufer. In a CPU. From Source to Assembly Code

A mathematician has asked us to design a simple digital device that works similarly to a pocket calculator.

CS3350B Computer Architecture Winter 2015

Clever Signed Adder/Subtractor. Five Components of a Computer. The CPU. Stages of the Datapath (1/5) Stages of the Datapath : Overview

CS 24: INTRODUCTION TO. Spring 2015 Lecture 2 COMPUTING SYSTEMS

CS 31: Intro to Systems Digital Logic

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

Id Question Microprocessor is the example of architecture. A Princeton B Von Neumann C Rockwell D Harvard Answer A Marks 1 Unit 1

CS61C : Machine Structures

Lecture Topics ECE 341. Lecture # 10. Register File. Hardware Components of a Processor

UC Berkeley CS61C : Machine Structures

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

Parallel logic circuits

TDT4255 Computer Design. Lecture 4. Magnus Jahre. TDT4255 Computer Design

Instruction set of 8085

Design of Decode, Control and Associated Datapath Units

The Need of Datapath or Register Transfer Logic. Number 1 Number 2 Number 3 Number 4. Numbers from 1 to million. Register

Computer Architecture

Chapter 4. The Processor

Unsigned Binary Integers

Unsigned Binary Integers

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

COMP 303 Computer Architecture Lecture 6

Chapter 2. Instruction Set. RISC vs. CISC Instruction set. The University of Adelaide, School of Computer Science 18 September 2017

ECE232: Hardware Organization and Design

ECE 154A Introduction to. Fall 2012

CS:APP Chapter 4 Computer Architecture Logic Design Randal E. Bryant Carnegie Mellon University

Chapter 4. The Processor

ECE 341. Lecture # 10

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

PROBLEMS. 7.1 Why is the Wait-for-Memory-Function-Completed step needed when reading from or writing to the main memory?

EE309: Computer Organization, Architecture and MicroProcessors. sumantra/courses/up/up.html GND HIGH ORDER ADDRESS BUS

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 4. The Processor

CPU Design John D. Carpinelli, All Rights Reserved 1

REGISTER TRANSFER LANGUAGE

Class Notes. Dr.C.N.Zhang. Department of Computer Science. University of Regina. Regina, SK, Canada, S4S 0A2

SPARC Architecture. SPARC Registers

EC4205 Microprocessor and Microcontroller

ICS 233 COMPUTER ARCHITECTURE. MIPS Processor Design Multicycle Implementation

Instructions. Philipp Koehn. 16 February 2018

COMPUTER ORGANIZATION AND DESIGN

Chapter 4. The Processor

CS 24: INTRODUCTION TO. Spring 2018 Lecture 3 COMPUTING SYSTEMS

COMP3221: Microprocessors and Embedded Systems

Machine (Assembly) Language Human Thought

COMPUTER ORGANIZATION

Computer Architecture

COMP2121: Microprocessors and Interfacing

Final Lecture. A few minutes to wrap up and add some perspective

Computer Architecture and Organization: L04: Micro-operations

EECE.2160: ECE Application Programming

Introduction. Chapter 4. Instruction Execution. CPU Overview. University of the District of Columbia 30 September, Chapter 4 The Processor 1

CS/ECE 252 Introduction to Computer Engineering

Single Cycle Data Path

Objective now How are such control statements registers and other components Managed to ensure proper execution of each instruction

CS 31: Introduction to Computer Systems. 03: Binary Arithmetic January 29

Design for a simplified DLX (SDLX) processor Rajat Moona

STRUCTURE OF DESKTOP COMPUTERS

CENG 3420 Lecture 06: Datapath

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control

Part II Instruction-Set Architecture. Jan Computer Architecture, Instruction-Set Architecture Slide 1

RISC Design: Multi-Cycle Implementation

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

Chapter 7. Storage Components

Central Processing Unit

ECE232: Hardware Organization and Design

Computer Science 61C Spring Friedland and Weaver. The MIPS Datapath

13. Building the Beta

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 27: Single- Cycle CPU Datapath Design

COSC 6385 Computer Architecture - Instruction Set Principles

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

Overview. EECS Components and Design Techniques for Digital Systems. Lec 16 Arithmetic II (Multiplication) Computer Number Systems.

Mark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control

Review: Abstract Implementation View

ENCM 369 Winter 2013: Reference Material for Midterm #2 page 1 of 5

MICROPROCESSOR & MICROCONTROLLER

Grading: 3 pts each part. If answer is correct but uses more instructions, 1 pt off. Wrong answer 3pts off.

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.

Computer Architecture. Lecture 2 : Instructions

Truth Table! Review! Use this table and techniques we learned to transform from 1 to another! ! Gate Diagram! Today!

MIPS R-format Instructions. Representing Instructions. Hexadecimal. R-format Example. MIPS I-format Example. MIPS I-format Instructions

MC9211Computer Organization. Unit 4 Lesson 1 Processor Design

Pipelined Datapath. One register file is enough

ALU Design. 1-bit Full Adder 4-bit Arithmetic circuits. Arithmetic and Logic Unit Flags. Add/Subtract/Increament/Decrement Circuit

CSE Lecture In Class Example Handout

Introduction. ENG3380 Computer Organization and Architecture MIPS: Data Path Design Part 3. Topics. References. School of Engineering 1

Computer Organization CS 206 T Lec# 2: Instruction Sets

Lecture 6: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture

Combinational and sequential circuits (learned in Chapters 1 and 2) can be used to create simple digital systems.

Binghamton University. CS-140 Fall Pippin

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

Inf2C - Computer Systems Lecture Processor Design Single Cycle

Chapter 5 The LC-3. ACKNOWLEDGEMENT: This lecture uses slides prepared by Gregory T. Byrd, North Carolina State University 5-2

Transcription:

The Manual Processor Lecture 7 In 7 LK Designing a entral Processor Unit: 7 6 5 4 3 2 Part : rchitecture and Instructions LK LK Res LU RES Out LKRES Y-out Y-in LK arry Out omputer Hardware Lecture 7 Slide omputer Hardware Lecture 7 Slide2 Registers: The Multiplexers: O U T P U T S S S D Q D Q D Q lock In- I I a b c d a b c d a b c d MUX On- O O S S onnection Oi=Ii(a) Oi=Ii(b) Oi=Ii(c) Oi=Ii(c) I N P U T S omputer Hardware Lecture 7 Slide3 omputer Hardware Lecture 7 Slide4 The rithmetic and Logic Unit The Shifter (This is just a special multiplexer) n- n- f2 f f LU out O O On- f2 f f Function O = O = minus O = minus O = plus O = eor O = or O = and O = - In- I I in f2 f f out On- O O f2 f f Function Oi = Ii (unchanged) Oi = Ii- (left shift) Oi = Ii+ (right shift) Oi = Ii+ (right shift) unchanged left shift with carry arithmetic right shift right shift with carry in omputer Hardware Lecture 7 Slide5 omputer Hardware Lecture 7 Slide6

The Manual Processor Execution ycle Executing Instructions Stream Set the multiplexers so that the correct registers are connected together Instruction Pt Instruction Pt2 Unused Insruction Pt Instruction Pt2 Unused etc c cres c Idle c c c c 2 Set the arithmetic hardware to compute the correct function 3 Provide a clock pulse to the registers that are to change omputer Hardware Lecture 7 Slide7 omputer Hardware Lecture 7 Slide Fetching from Memory Idle So why not put the two together Function Generator Output + Get Set MR s2 f2 f f f5 f4 f3 s4 MR c7 Read/Write ddress In MEMORY P MDR MR Read/Write RM lock TS ddress us us 256 by RM 256 by RM &c c s c Res LU Y-out Y-in c3 + MDR c4 s3 P c5 In Out c f f5 s c c s4 ontroller Go c6 To other registers omputer Hardware Lecture 7 Slide9 omputer Hardware Lecture 7 Slide hanges to the Maunal Processor Simple ontroller The Result register now becomes the MDR ready to send data to memory 2 MR can be loaded direct from memory 3 Memory "data out" separated from "data in", and always enabled 4 bits now used as input to the controller 7 6 5 Idle 4 2 3 State Function Idle Wait for the start signal 2 Load the instruction, 3 Load to Reg 4 Load to Regs and 5 Load the Instruction 6 Load to Regs and MDR 7 Load Result ddress to MR Store the Result Set ddress to get next byte omputer Hardware Lecture 7 Slide omputer Hardware Lecture 7 Slide2

Have we done the job? Unfortunately not:- We will never sell a processor that: ontinually needs to read and write to memory 2 Has a large number of execution cycles per instruction 3 Processes only integers up to 255 4 Has cumbersome 5 byte instructions We need to find ways of speeding it up How can we speed things up hange all the buses from bits to 32 bit, and thus do four times as much in each cycle 2 Provide local registers which can be programmed to store partial results 3 Reduce the size of the combinatorial logic by putting the LU and shifter in parallel omputer Hardware Lecture 7 Slide3 omputer Hardware Lecture 7 Slide4 How can we speed things up real processor at last 4 Design a controller with as small a number of execution cycles as possible 5 Remove elaborate carry arrangements, by doing our arithmetic on big integers R c R c R2 c2 R3 c3 R4 c4 Internal 32 bit us c7 c 32 f4 f3 f2 f f Res LU s3 + P c MR ddress c MEMORY In Out MDR c3 c4 c c4 f f5 s s6 R5 c5 f5 in MSK ontroller R6 out c6 s4 s5 s6 c2 s s s2 c9 omputer Hardware Lecture 7 Slide5 omputer Hardware Lecture 7 Slide6 Problem reak If we wanted to exchange the contents of register R and Register R, what operations must our processor carry out? few observations Registers,, P, MR, MDR, and belong to the hardware designers R //Load from R Registers R, R, R2, R3, R4, R5 and R6 can be manipulated by the programmers R, R //Load R from and from R //at the same time! R //Load R from omputer Hardware Lecture 7 Slide7 omputer Hardware Lecture 7 Slide

The ontroller Specification The controller is going to be a finite state machine looking something like this: The ontroller Specification The fetch cycle will get one 32 bit instruction from the memory E3 F The execute cycles will make the processor carry out that instruction Execute E2 E F3 F2 Fetch So, to formalise our specification we need to define what the instructions will do omputer Hardware Lecture 7 Slide9 omputer Hardware Lecture 7 Slide2 The program instructions ssembler instructions are decided between the software specialists and the hardware designers From the software point of view: Instructions should be few but very powerful From the hardware point of view Instructions should be simple and take only a few clock pulses to execute compromise must be found omputer Hardware Lecture 7 Slide2 Memory Reference Instructions LOD Reg, ddress STORE Reg, ddress JUMP ddress LL Reg, ddress LODINDET Reg, Reg2 STOREINDET Reg, Reg2 JUMPINDET Reg LLINDET Reg, Reg2 omputer Hardware Lecture 7 Slide22 Two Register Instructions MOVE Rscr,Rdest DD Rscr,Rdest SUTRT ND OR XOR OMPRE (Subtract but without storing the result) One Register Instructions LER Rdest INREMENT (IN) DEREMENT (DE) OMPLEMENT (OMP) RITHMETI SHIFT LEFT (SL) RITHMETI SHIFT RIGHT (SR) LOGIL SHIFT RIGHT (LSR) RETURN omputer Hardware Lecture 7 Slide23 omputer Hardware Lecture 7 Slide24

No Register Instructions SKIP Following an arithmetic or compare operation SKIPPOSITIVE SKIPNEGTIVE NOP Instruction Formats 3 24 23 2 9 Opcode Rdest ddress 3 24 23 2 9 6 5 Opcode Rdest Rscr Unused 3 24 23 2 9 Opcode Rdest Unused 3 24 23 Opcode Unused omputer Hardware Lecture 7 Slide25 omputer Hardware Lecture 7 Slide26 The Mask Input and Output The memory reference instructions contain a memory address in the bottom 2 bits The mask converts this unsigned 2 bit number to a 32 bit number by masking the top bits This addressing scheme can only cope with 4Mytes, hence the need for indirect memory reference instructions omputer Hardware Lecture 7 Slide27 I 32 I 2 I 2 I 9 I I Gnd O 32 O 2 O 2 O 9 O O Input and output will be achieved using the LOD and STORE instructions Many peripherals, disks, serial ports, etc can be read or written to as if they were memory They can also be connected directly with the memory so that input and output can be done while the processor is otherwise engaged omputer Hardware Lecture 7 Slide2 Register Transfers Memory Reference Instructions We check our design, by determining the register transfers that will be needed to carry out each instruction These register transfers will become the formal specification of the processor controller LOD Rdest, ddress E MR MDR Use the mask E2 MDR Memory E3 Rdest MDR No Mask STORE Rdest, ddress E MR MDR, Rdest Use the mask E2 Memory via the Shifter (no change) JUMP ddress E P MDR Use the mask LL Rdest, ddress E P P+ E2 Rdest P E3 P MDR Use the mask omputer Hardware Lecture 7 Slide29 omputer Hardware Lecture 7 Slide3

Indirect Memory Reference Instructions To be continued LODINDET Rscr,Rdest E Rsrc E2 MR E3 MDR Memory E4 Rdest MDR No Mask STOREINDET Rscr,Rdest E Rscr E2 MR ; Rdest via the shifter (no change) E3 Memory via the shifter (no change) JUMPINDET Rscr E Rscr E2 P via the shifter (no change) LLINDET Rscr, Rdest E P P+; Rscr E2 Rdest P; E3 P via the shifter (no change) Don t miss the next thrilling episode omputer Hardware Lecture 7 Slide3 omputer Hardware Lecture 7 Slide32