CoE 353: Advanced Computer Architecture

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

Systems I: Computer Organization and Architecture

Chapter 2 Logic Gates and Introduction to Computer Architecture

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

Let s put together a Manual Processor

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

MICROPROCESSOR AND MICROCOMPUTER BASICS

Microprocessor & Assembly Language

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

Systems I: Computer Organization and Architecture

BASIC COMPUTER ORGANIZATION AND DESIGN

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

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: COMPUTER ORGANIZATION AND ARCHITECTURE (Code: )

5 Combinatorial Components. 5.0 Full adder. Full subtractor

Systems I: Computer Organization and Architecture

Central Processing Unit

CHAPTER 4 MARIE: An Introduction to a Simple Computer

CHAPTER 7: The CPU and Memory

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

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

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

3.Basic Gate Combinations

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

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

Gates, Circuits, and Boolean Algebra

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

EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors

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

PART B QUESTIONS AND ANSWERS UNIT I

Binary Adders: Half Adders and Full Adders

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

Computer organization

CHAPTER 3 Boolean Algebra and Digital Logic

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

Sistemas Digitais I LESI - 2º ano

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

Combinational circuits

CPU Organisation and Operation

Chapter 9 Computer Design Basics!

Central Processing Unit (CPU)

Digital Electronics Detailed Outline

MACHINE ARCHITECTURE & LANGUAGE

DEPARTMENT OF INFORMATION TECHNLOGY

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

An Overview of Stack Architecture and the PSC 1000 Microprocessor

EE361: Digital Computer Organization Course Syllabus

PROBLEMS #20,R0,R1 #$3A,R2,R4

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

UNIT 2 CLASSIFICATION OF PARALLEL COMPUTERS

EE360: Digital Design I Course Syllabus

Operating Systems. Lecture 03. February 11, 2013

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

Memory Elements. Combinational logic cannot remember

Figure 8-1 Four Possible Results of Adding Two Bits

Floating Point Fused Add-Subtract and Fused Dot-Product Units

Levels of Programming Languages. Gerald Penn CSC 324

COMPUTER ARCHITECTURE. Input/Output

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

CHAPTER 11: Flip Flops

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

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

Introducción. Diseño de sistemas digitales.1

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

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

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

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

CSE140 Homework #7 - Solution

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

CPU Organization and Assembly Language

A Lab Course on Computer Architecture

Module 3: Floyd, Digital Fundamental

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

Multiplexers Two Types + Verilog

Faculty of Engineering Student Number:

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

Computer Organization. and Instruction Execution. August 22

2.0 Chapter Overview. 2.1 Boolean Algebra

Computer Organization

Computer Systems Structure Input/Output

Lecture N -1- PHYS Microcontrollers

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

Architectures and Platforms

Chapter 1 Computer System Overview

Z80 Microprocessors Z80 CPU. User Manual UM Copyright 2014 Zilog, Inc. All rights reserved.

CS:APP Chapter 4 Computer Architecture. Wrap-Up. William J. Taffe Plymouth State University. using the slides of

LADDER LOGIC/ FLOWCHART PROGRAMMING DIFFERENCES AND EXAMPLES

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

MACHINE INSTRUCTIONS AND PROGRAMS

Design and Development of Virtual Instrument (VI) Modules for an Introductory Digital Logic Course

Computer Architecture

Memory Systems. Static Random Access Memory (SRAM) Cell

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

An Introduction to the ARM 7 Architecture

Multiple Choice Questions(Computer)

Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis

Philadelphia University Faculty of Information Technology Department of Computer Science Semester, 2007/2008.

Computer Systems Design and Architecture by V. Heuring and H. Jordan

Instruction Set Architecture

Transcription:

CoE 353: Advanced Computer Architecture 1997 John D. Carpinelli, All Rights Reserved 1

Course Outline Module # Topics 1 RTL, Micro-operations 2 Basic Computer 3 CPU Design 4 Microprogramming 1997 John D. Carpinelli, All Rights Reserved 2 RTL is Register Transfer Language. This is a hardware description language for digital system design. It allows you to specify the data transfers and data manipulation that can take place in a digital system, such as a computer, and the conditions under which these transfers take place. Each such conditional data transfer pair is called a micro-operation. By specifying the micro-operations properly, you can specify the entire digital system. The Basic Computer was created by M. Morris Mano to illustrate the concepts of computer design. In this module we design a computer from the ground up. We start with an instruction set to be realized by the computer and the internal registers. Given that, we determine the micro-operations which must be performed by the computer to realize this instruction set. This includes both the micro-operations to fetch and to execute an instruction. We also determine the proper sequencing of these microoperations to make the computer perform correctly. In module 3 we explore CPU design in more detail. We will get more into the design of specific sections of the CPU, including the arithmetic/logic unit, or ALU. We also examine different instruction formats and addressing modes. Microprogramming is one method of designing the control unit section of a CPU. In this method, control signals are stored in a separate memory unit rather than generated using combinatorial logic. The Basic Computer presented in module 2 used hardwired control. This module presents the other commonly used control unit design methodology.

Course Outline (continued) Module # Topics 5 Pipelining and Vector Processing 6 Computer Arithmetic 7 I/O Organization 8 Memory Organization 1997 John D. Carpinelli, All Rights Reserved 3 Pipelining and vector processing are two methods used to speed up computer performance. A pipeline is very similar to an assembly line. Each stage of a pipeline performs its specific function on every piece of data that passes through it. By arranging the stages properly, the entire pipeline results in correctly processed data. Since different data is in each stage of a pipeline simultaneously, you get data out more frequently, even though each piece of data takes the same amount of time to process. Pipelines can process arithmetic data or instructions. Vector processing processes disjoint data in parallel. Although each operation takes the same amount of time, you achieve speedup by performing several operations simultaneously. Computer arithmetic is an important part of CPU design. This module covers the design of arithmetic hardware for performing mathematical operations such as multiplication and division. This module covers different data formats, including signed-magnitude and floating point. Input/output organization covers the design of I/O interfaces. It includes different types of serial and parallel data transfers, and interrupts. The final module, memory organization, examines how to set up memory in a computer to maximize system performance. Topics covered in this module include cache memory, associateve memory and virtual memory and paging.

Prerequisites by topic Digital logic design Computer organization Assembly language programming 1997 John D. Carpinelli, All Rights Reserved 4 Digital logic design includes the topics typically taught in an introductory digital circuits course. These topics include combinatorial logic, sequential logic and Karnaugh maps. Students at NJIT learn this material in course EE 251, Digital Design. Students also need to know the fundamentals of computer organization. This includes the various components of a computer and how they interact. The NJIT course which covers this material is CoE 252, Computer Architecture. Finally, students should be familiar with at least one assembly language. The microprocessor used is not terribly important; the main concern is that each student understands how assembly languages work. NJIT course CoE 393, Assembly Language Laboratory, among others, covers this material.

Register Transfer Language and Micro-operations 1997 John D. Carpinelli, All Rights Reserved 5

Outline Introduction Register Transfer Language (RTL) Data transfers Micro-operations Summary 1997 John D. Carpinelli, All Rights Reserved 6 Introduction includes definitions and notation. RTL shows various types of register transfers. Data transfers expands on the previous topic by showing how to implement these transfers. Micro-operations covers some of the data transfer and manipulation operations that can be performed in a CPU and the hardware to perform them. Finally, concluding remarks are presented.

Definitions Micro-operation: operations executed on data stored in registers, performed in one clock cycle Register Transfer Language (RTL): symbolic notation used to describe micro-operations For example: P: A B 1997 John D. Carpinelli, All Rights Reserved 7 Micro-operations are the basis for microprocessors. An instruction is fetched from memory, decoded and executed by performing a sequence of microoperations. That is, a microprocessor performs the micro-operations in order to realize the instruction.

Digital computers are specified by... Registers and their functions Micro-operations Control functions For example: P: A B 1997 John D. Carpinelli, All Rights Reserved 8 Specifying registers alone is not sufficient; it is also necessary to specify the functions which can be performed by each register. These may include such things as increment/decrement, parallel load, etc. The micro-operations only specify which data transfers may occur; they don t specify when or how they may occur. The control functions specify the functions which cause specific microoperations to occur. In the example above, P: A <-- B, P is the control function and A <-- B is the micro-operation.

Register notation Entire registers may be referred to by a name of your choice: e.g. A, R3, PC The most significant bit of an n-bit register is bit n-1; the least significant is bit 0 Single bits may be referenced by using a subscript: e.g. A 1, R3 2. Bits may be grouped into ranges or named fields and referred to accordingly: e.g. A(LOW), A(3-0) For example: A(7-4) A(3-0) 1997 John D. Carpinelli, All Rights Reserved 9 In the example, A(3-0) could have been named A(LOW).

Parallel register transfers A P B P: A B 1997 John D. Carpinelli, All Rights Reserved 10 When condition P occurs, the contents of register B are copied into register A. Alternately, one could describe this as if P then A gets B. The word transfer is actually a misnomer, since it implies that data is moved from one location to another. In fact, the data is copied from one location to another, since it also still resides in register B.

Serial register transfers A 3 A 2 A 1 A 0 0 P P P P P: A shl(a) 1997 John D. Carpinelli, All Rights Reserved 11 In this example, each bit of A is shifted one position to the left. The value of 0 is shifted into the least significant bit of A. The value of the most significant bit of A is lost. For example, if A = 1001, shl(a) = 0010.

Serial register transfers A B P P P: AB shl(αb) 1997 John D. Carpinelli, All Rights Reserved 12 For example, if A = 1001 and B = 0110, shl(ab) = 0010 1100.

Simultaneous register transfers A C P B P: A B, C B P 1997 John D. Carpinelli, All Rights Reserved 13 In this example, when signal P is asserted, the contents of B are copied into both registers A and C. Note that the order in which the statement is written does not matter. If the transfer from B to C was written first, the result would be the same. As long as the transfers to occur are separated by commas, they are simultaneous.

Simultaneous register transfers A B P C D P: A B, C D 1997 John D. Carpinelli, All Rights Reserved 14 In this example, two registers are loaded simultaneously from different sources.

Illegal simultaneous transfers B C P A P: A B, A C 1997 John D. Carpinelli, All Rights Reserved 15 This is an example of an illegal operation, since A must be loaded with two different values simultaneously.

Simultaneous register transfers A 0 MUX S 1 B C P Q Q P: A B Q: A C 1997 John D. Carpinelli, All Rights Reserved 16 In this example, A can receive data from more than one source, depending on the control signal asserted. A multiplexer is used to determine the data to be loaded, although tri-state buffers could also have been used.

Direct 1-1 connections B A C F D E 1997 John D. Carpinelli, All Rights Reserved 17 To connect n items with direct connections, you need n(n-1)/2 connections.

Bus connections A B C BUS F E D 1997 John D. Carpinelli, All Rights Reserved 18 To connect n items with bus connections, you need only n connections. Using a bus is similar to using a highway. The Garden State Parkway is about 172 miles long and contains about as many exits. If you built a separate road to connect each pair of exits, you would have about 15,000 different roads. There would hardly be any room left for the cities they connect! However, by constructing the Parkway and having each city connect to the Parkway, you have only one connection per exit, barely 1 % of the roadway. Also, since each road connects at its nearest point to the parkway, the connections are much shorter.

Connecting registers with multiplexers QvRvT PvRvU S 1 S 0 4-1 MUX 0 1 2 3 A B C D PvQ R S TvU 1997 John D. Carpinelli, All Rights Reserved 19 This system implements the following micro-operations: P: A <-- B Q: A <-- C R: B <-- D S: C <-- A T: D <-- C U: D <-- B The multiplexer selects one of the four registers as the source register. Control lines for the mux are driven by external circuitry. The data is made available to all registers, but only one actually loads the data. Again, external hardware generates load signals for the four registers such that no more than one is active at any given time.

Connecting registers with tri-state buffers S PvU QvT R A B C D 1997 John D. Carpinelli, All Rights Reserved 20 This system implements exactly the same micro-operations as in the previous example. In this configuration, external circuitry enables at most one of the tri-state buffers to pass its data through to the inputs of the registers. Enable signals for the tri-state buffers are not shown. As before, the data is made available to all registers, but only one actually loads the data. The load signals for the four registers are exactly the same as in the previous example. This makes sense since the registers only know that they are to read in data from the bus. They don t care how the data got onto the bus in the first place. The primary advantage of using buffers rather than multiplexers is the reduced current load on the circuit.

Reading data from memory A R M RD WR DR 1997 John D. Carpinelli, All Rights Reserved 21 In memory read operations, the address of the memory location to be read is supplied by the address register of the CPU. The memory module inputs this address and makes the data from that memory location available to the CPU, which reads it into either its data register (shown here) or its instruction register (not shown). The address register may or may not have tri-state buffers on its outputs. The memory module always has tri-state buffers on its outputs (not shown). The data register has a load signal that triggers it to load in the data. In an actual CPU, the data register may receive data from sources other than the memory module, so some sort of input arbitration is necessary. This is usually similar to the tri-state buffers used in the example shown in the previous slide.

Arithmetic micro-operations ADD: R3 R1+R2 SUBTRACT: R3 R1-R2 COMPLEMENT: R2 R2 2 S COMPLEMENT: R2 R2+1 SUBTRACT (2C): R3 R1+R2+1 INCREMENT: R1 R1+1 DECREMENT: R1 R1-1 1997 John D. Carpinelli, All Rights Reserved 22 Describe operations individually. Subtract (2C) is subtraction performed by adding the two s complement of the number to be subtracted, i.e. x-y is implemented as x+(-y). For R1 = 1001 1100 and R2 = 01010110, the results of the operations are: ADD: 1111 0010 SUBTRACT: 0100 0110 COMP: 1010 1001 2 S COMP: 1010 1010 SUB (2C): 0100 0110 INCR: 1001 1101 DECR: 1001 1011

Hardware to implement A ± B B Q + Parallel Adder C in =Q P: A A+B Q: A A+B + 1 A PvQ 1997 John D. Carpinelli, All Rights Reserved 23 This circuit implemtns two micro-operations: P: A <-- A + B and Q: A <-- A + B + 1, or A - B. The parallel adder receives the inputs and generates the correct result. If P = 1, this result is A + B; if Q = 1 it is A + B + 1. In either case, A must be one of the operands input to the parallel adder. The second operand will be either B, if P = 1, or B, if Q = 1. We implement this by using a bank of exclusive-or gates, each of which has a single bit of B as one input and Q as the other input. If Q = 0, B (XOR) Q = B (XOR) 0 = B; if Q = 1, B (XOR) Q = B (XOR) 1 = B. Finally, by connecting Q to C in of the adder, we take care of the +1 part of the Q micro-operation.

Logic micro-operations AND: OR: EXCLUSIVE OR: COMPLEMENT: R1 R1 R2 R1 R1 R2 R1 R1 R2 R2 R2 1997 John D. Carpinelli, All Rights Reserved 24 Other logic operations, such as nor, nand, etc., can be generated using the logic micro-operations listed above. Depending on the CPU under design, some of these additional logic micro-operations may be implemented explicitly in hardware. For R1 = 1001 1100 and R2 = 01010110, the results of the operations are: AND: 0001 0100 OR: 1101 1110 XOR: 1100 1010 COMP: 1010 1001

Logic hardware - ') A i B i 0 1 4-1 M U X E i PvQvRvS + 2 3 S 1 S 0 RvS QvS 1997 John D. Carpinelli, All Rights Reserved 25 This system implements one bit of the following micro-operations: P: E <-- A Q: E <-- A ^ B R: E <-- A v B S: E <-- A (XOR) B Two control signals select one of the four logic micro-operations to be passed through to E i. If no logic micro-operation is to occur, one of the values is still passed though; additional hardware will make sure that this output is ignored by the rest of the CPU.

Linear shift micro-operations shl E: E n-1 E n-2 E 0 0 shr E: 0 E n-1 E n-2 E 0 1997 John D. Carpinelli, All Rights Reserved 26 For linear shifts, each bit is shifted one position to the left or right, as appropriate. A zero is shifted into the vacated bit. One bit s information is lost in the shift.

Circular shift micro-operations cil E: E n-1 E n-2 E 0 cir E: E n-1 E n-2 E 0 1997 John D. Carpinelli, All Rights Reserved 27 Circular shifts act exactly like linear shifts, except the bit formerly lost is circulated back into the vacated bit instead of a zero.

Arithmetic shift micro-operations E n-1 E n-2 E 0 ashl E: 0 ashr E: E n-1 E n-2 E 0 1997 John D. Carpinelli, All Rights Reserved 28 For arithmetic shifts, the most significant bit is treated as a sign bit that cannot be modified. Many arithmetic algorithms, as we will see later in this course, must use arithmetic shifts. The left arithmetic shift acts like the shl, except the most significant bit is unchanged and the next to most significant bit is lost. For the right arithmetic shift, the sign bit is not only retained, it is also shifted right as in the shr.

Summary Micro-operations and RTL Register notation and transfers Direct and bus connections Arithmetic, logical, shift micro-operations Next module: Basic Computer 1997 John D. Carpinelli, All Rights Reserved 29 This chapter has covered various types of register transfers. It also showed how to implement these transfers. Micro-operations which cover some of the data transfer and manipulation operations that can be performed in a CPU and the hardware to perform them were discussed. In the next module, we will proceed to a full design of the Basic Computer and put some of these ideas into practice.