Let s put together a Manual Processor



Similar documents
(Refer Slide Time: 00:01:16 min)

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Binary Adders: Half Adders and Full Adders

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

Addressing The problem. When & Where do we encounter Data? The concept of addressing data' in computations. The implications for our machine design(s)

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

Gates, Circuits, and Boolean Algebra

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Systems I: Computer Organization and Architecture

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

5 Combinatorial Components. 5.0 Full adder. Full subtractor

CPU Organisation and Operation

NEW adder cells are useful for designing larger circuits despite increase in transistor count by four per cell.

Chapter 2 Logic Gates and Introduction to Computer Architecture

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots

Understanding Logic Design

Lecture 8: Synchronous Digital Systems

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

CHAPTER 3 Boolean Algebra and Digital Logic

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

Microprocessor & Assembly Language

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Computer Organization. and Instruction Execution. August 22

CSE140 Homework #7 - Solution

COMBINATIONAL CIRCUITS

Binary Division. Decimal Division. Hardware for Binary Division. Simple 16-bit Divider Circuit

Sistemas Digitais I LESI - 2º ano

earlier in the semester: The Full adder above adds two bits and the output is at the end. So if we do this eight times, we would have an 8-bit adder.

MULTIPLE CHOICE FREE RESPONSE QUESTIONS

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

Central Processing Unit

MICROPROCESSOR AND MICROCOMPUTER BASICS

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Computer organization

Lecture N -1- PHYS Microcontrollers

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Chapter 01: Introduction. Lesson 02 Evolution of Computers Part 2 First generation Computers

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

Two's Complement Adder/Subtractor Lab L03

Memory Elements. Combinational logic cannot remember

CSCI 4717 Computer Architecture. Function. Data Storage. Data Processing. Data movement to a peripheral. Data Movement

DEPARTMENT OF INFORMATION TECHNLOGY

Decimal Number (base 10) Binary Number (base 2)

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Flip-Flops, Registers, Counters, and a Simple Processor

LSN 2 Computer Processors

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

The components. E3: Digital electronics. Goals:

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

CHAPTER 7: The CPU and Memory

An Effective Deterministic BIST Scheme for Shifter/Accumulator Pairs in Datapaths

Systems I: Computer Organization and Architecture

3.Basic Gate Combinations

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization

Section 1.4 Place Value Systems of Numeration in Other Bases

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED

Counters and Decoders

(Refer Slide Time: 02:39)

Lab 1: Full Adder 0.0

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

Chapter 5 Instructor's Manual

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

CHAPTER 4 MARIE: An Introduction to a Simple Computer

1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12

İSTANBUL AYDIN UNIVERSITY

EE360: Digital Design I Course Syllabus

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

SIM-PL: Software for teaching computer hardware at secondary schools in the Netherlands

Building a computer. Electronic Numerical Integrator and Computer (ENIAC)

EC 362 Problem Set #2

Base Conversion written by Cathy Saxton

Administrative Issues

Module 3: Floyd, Digital Fundamental

INTRODUCTION TO DIGITAL SYSTEMS. IMPLEMENTATION: MODULES (ICs) AND NETWORKS IMPLEMENTATION OF ALGORITHMS IN HARDWARE

Copyright 2012 Pearson Education, Inc. Chapter 1 INTRODUCTION TO COMPUTING AND ENGINEERING PROBLEM SOLVING

Systems I: Computer Organization and Architecture

An Introduction to the ARM 7 Architecture

AC : A PROCESSOR DESIGN PROJECT FOR A FIRST COURSE IN COMPUTER ORGANIZATION

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

2.0 Chapter Overview. 2.1 Boolean Algebra

TYPES OF COMPUTERS AND THEIR PARTS MULTIPLE CHOICE QUESTIONS

EE482: Advanced Computer Organization Lecture #11 Processor Architecture Stanford University Wednesday, 31 May ILP Execution

PART B QUESTIONS AND ANSWERS UNIT I

BASIC COMPUTER ORGANIZATION AND DESIGN

KS3 Computing Group 1 Programme of Study hours per week

Central Processing Unit (CPU)

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

exclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language

Logic in Computer Science: Logic Gates

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

Counters are sequential circuits which "count" through a specific state sequence.

Adder.PPT(10/1/2009) 5.1. Lecture 13. Adder Circuits

An Overview of Stack Architecture and the PSC 1000 Microprocessor

Transcription:

Lecture 14 Let s put together a Manual Processor Hardware Lecture 14 Slide 1

The processor Inside every computer there is at least one processor which can take an instruction, some operands and produce a result. Processors can be operated in different ways for example as: A central processor unit (CPU) A peripheral of another computer Array Processor Graphics Processor (GPU) A manually programmed processor Stand alone calculator We will now design a manual (or externally programmed) processor. Hardware Lecture 14 Slide 2

The Block Diagram of a Processor Both the data and the instructions will be binary numbers. The processing will be a sequence of one or more steps controlled by a clock. The result will be a binary number. Hardware Lecture 14 Slide 3

An 8 bit processor architecture We will base our design on the von Neumann architecture (1945) which subdivided the components of a processor into arithmetic units and registers, and had a common input stream for data and instructions. We will carry out processing on 8 bit bytes (similar to the processors of the 1970 s). Hardware Lecture 14 Slide 4

The Actions of a Simple Processor As an example we will find the average of two numbers. Result = (A+B)/2 Because of our choice of architecture all numbers must be represented in 8 bits. Thus the sum A+B must be less than 256. We will see later on how to extend the processing to cope with larger numbers. Hardware Lecture 14 Slide 5

The Actions of a Simple Processor The following steps are carried out: 1. The first number is set up on the input lines and stored in a register (A) 2. The second number is set up on the input lines and stored in a register (B) 3. The arithmetic circuits are set up to add register A to register B. 4. The resulting sum of A and B is transferred back into register A. 5. The shifting circuits are set up to shift the contents of register A one bit to the right. 6. The result is loaded onto an output register (Res). The processor is a sequential digital circuit Hardware Lecture 14 Slide 6

Designing a Processor From the example we see that we need a number of different components to make our processor: Registers: Registers to store the input data (A) & (B) A register to store the result (Res) A one bit register to store the carry (C)(if any) A register to store the instruction (IR) Arithmetic Circuits: An 8 bit adder An 8 bit shifter Hardware Lecture 14 Slide 7

The data path diagram The example also suggests that the registers and arithmetic units must be connected in a specific way. A simple data path diagram might be: Hardware Lecture 14 Slide 8

The data path diagram Note the following about the data path diagram: There is no information about when the data transfers occur. The diagram shows only the possible paths where data can be transferred. The arithmetic and shift operations are done by combinational circuits without more registers. The function of the arithmetic circuits are controlled by the bits in the instruction register. The processor is unable to execute further operations on the results register. Hardware Lecture 14 Slide 9

The Arithmetic-Logic Unit (ALU) We now design one important component of the central processor unit - the ALU - which carries out arithmetic or logic operations on its two inputs A and B. We will design a 4-bit unit that can be used as a building block to construct ALUs of any precision. The select lines (S2, S1, S0) determine the function of A and B that appears on the output. Hardware Lecture 14 Slide 10

The ALU functions The selection bits determine which out of 8 possible functions is used. Selection Function 000 0 001 B-A 010 A-B 011 A plus B 100 A XOR B 101 A OR B 110 A AND B 111-1 When Cin = 1 three operations change: 011: Res = A plus B plus 1 010: Res = A - B - 1 001: Res = B - A - 1 Hardware Lecture 14 Slide 11

Designing the ALU An arithmetic logic unit is a simple combinatorial circuit that can be built from components that we have already designed. To provide the arithmetic functions we use adders and subtractors. Hardware Lecture 14 Slide 12

Designing the ALU The logic functions are provided by simple gates. We need a multiplexer for each bit of the ALU to make the function selection. Hardware Lecture 14 Slide 13

Designing the ALU To finish the job we need one more multiplexer to provide the carry out. Hardware Lecture 14 Slide 14

Extending the ALU to 8 bits We can now follow the functional approach and extend our ALU to 8 bits Similarly we can scale it up to 32 bits or larger as the need arises. Hardware Lecture 14 Slide 15

Organising the Carry We can use a 2-to-1 multiplexer to allow two different carry input bits. The Carry in may be set to 1 or to the previous Carry out. The carry may be set to zero by setting the register C to zero. Thus the full range of arithmetic operations can be used. Hardware Lecture 14 Slide 16

Problem Why set the carry this way? Wouldn t it be simpler to connect the multiplexer inputs to 1 & 0 rather than using register C? Hardware Lecture 14 Slide 17

The Shifter Earlier in the course we discussed a specialised register, called the shift register, which could shift its contents let or right depending on a multiplexer selection. We could incorporate such a shift register in our design, but instead we will make use of a simpler shifter which does not store the result. We can achieve all the functionality we need by using multiplexers, and avoid the need for complex clocking arrangements. Hardware Lecture 14 Slide 18

A four function Shifter Our first shifter design will have four functions determined by two selection bits and will have a data length of eight bits. Hardware Lecture 14 Slide 19

The Shifter Functions The basic shifter will perform four operations depending on its two control inputs. These are: 00 Hold 01 Arithmetic shift left (with carry in) 10 Arithmetic shift right 11 Rotate right It is implemented simply using one multiplexer per bit. Hardware Lecture 14 Slide 20

Arithmetic Shifts Arithmetic Left Shift Arithmetic Right Shift Rotate Right Hardware Lecture 14 Slide 21

The four function shifter circuit 00 (A) 01 (B) 10 (C) 11 (D) Hold Arithmetic Shift Left Arithmetic Shift Right Rotate Right Hardware Lecture 14 Slide 22

Adding more functions to the Shifter There are many other different possible shifts that programmers may want to use. One example is: Logical Shift Right: This could be done by using first an ALU operation (Data AND 11111110) followed by a rotate right, but that would involve more processing steps and therefore be slow. Hardware Lecture 14 Slide 23

The eight function shifter A variety of useful shifts are defined in this table. F[2] F[1] F[0] Shift Carry Function 0 0 0 unchanged 0 0 1 left rotate left 0 1 0 left 0 arithmetic left shift 0 1 1 left Cin left shift with carry 1 0 0 right rotate right 1 0 1 right 0 logical right shift 1 1 0 right Input[7] arithmetic right shift 1 1 1 right Cin shift right with carry Hardware Lecture 14 Slide 24

The circuit of the eight function shifter It is a trivial matter to design a similar shifter of any precision. Hardware Lecture 14 Slide 25

The Data Path Diagram Again We now can put more detail onto the data path diagram: Note that we have not used the Cin input to the shifter in this processor. It will be connected to logic-0. Hardware Lecture 14 Slide 26