A3 Computer Architecture

Similar documents
3A35 Computer Architecture

Microcontroller Systems

A3 Computer Architecture

Continuing with whatever we saw in the previous lectures, we are going to discuss or continue to discuss the hardwired logic design.

Module 5 - CPU Design

EE 231 Fall EE 231 Homework 8 Due October 20, 2010

Computer Architecture: Part III. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

CSE A215 Assembly Language Programming for Engineers

(Refer Slide Time: 00:01:53)

(Refer Slide Time: 1:43)

COMPUTER ORGANIZATION AND ARCHITECTURE

EE 3170 Microcontroller Applications

INTRODUCTION OF MICROPROCESSOR& INTERFACING DEVICES Introduction to Microprocessor Evolutions of Microprocessor

EECS150 Homework 2 Solutions Fall ) CLD2 problem 2.2. Page 1 of 15

(ii) Simplify and implement the following SOP function using NOR gates:

Major and Minor States

Digital System Design with SystemVerilog

Written exam for IE1204/5 Digital Design Thursday 29/

(Refer Slide Time: 2:20)

There are four registers involved in the fetch cycle: MAR, MBR, PC, and IR.

R07. Code No: V0423. II B. Tech II Semester, Supplementary Examinations, April

Chapter 3 : Control Unit

Storage Elements & Sequential Circuits

Code No: 07A3EC03 Set No. 1

Final Exam Solution Sunday, December 15, 10:05-12:05 PM

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Data Paths and Microprogramming

Injntu.com Injntu.com Injntu.com R16

Chapter 3 - Top Level View of Computer Function

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

Hardware Modeling using Verilog Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

: : (91-44) (Office) (91-44) (Residence)

1. Prove that if you have tri-state buffers and inverters, you can build any combinational logic circuit. [4]

Laboratory Exercise 7

COPYRIGHTED MATERIAL INDEX

EE6301 DIGITAL LOGIC CIRCUITS UNIT IV ASYNCHRONOUS SEQUENTIAL CIRCUITSAND PROGRAMMABLE LOGIC DEVICES PART A

Honorary Professor Supercomputer Education and Research Centre Indian Institute of Science, Bangalore

Microprocessors and Microcontrollers Prof. Santanu Chattopadhyay Department of E & EC Engineering Indian Institute of Technology, Kharagpur

L11: Major/Minor FSMs

PROGRAMMABLE LOGIC DEVICES

Code No: R Set No. 1

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Philadelphia University Student Name: Student Number:

von Neumann Architecture Basic Computer System Early Computers Microprocessor Reading Assignment An Introduction to Computer Architecture

Basic Computer System. von Neumann Architecture. Reading Assignment. An Introduction to Computer Architecture. EEL 4744C: Microprocessor Applications

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Microcontroller Systems

CHAPTER - 2 : DESIGN OF ARITHMETIC CIRCUITS

Basic Processing Unit: Some Fundamental Concepts, Execution of a. Complete Instruction, Multiple Bus Organization, Hard-wired Control,

1. Internal Architecture of 8085 Microprocessor

Digital VLSI Testing Prof. Santanu Chattopadhyay Department of Electronics and EC Engineering India Institute of Technology, Kharagpur.

R10. II B. Tech I Semester, Supplementary Examinations, May

Laboratory 05. Single-Cycle MIPS CPU Design smaller: 16-bits version One clock cycle per instruction

CSCE 312 Lab manual. Lab 4 - Computer Organization and Data Path Design. Instructor: Dr. Yum. Fall 2016

Ripple Counters. Lecture 30 1

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Recitation Session 6

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATIONS ENGINEERING


Interrupt is a process where an external device can get the attention of the microprocessor. Interrupts can be classified into two types:

Chapter Operation Pinout Operation 35

Computer Architecture

DIGITA L LOGIC AND COMPUTER ORGA NIZATION

ECE369. Chapter 5 ECE369

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

Digital System Design Using Verilog. - Processing Unit Design

MLR Institute of Technology

Microprocessors/Microcontrollers

CHAPTER 9 MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

EC4205 Microprocessor and Microcontroller

Lecture-55 System Interface:

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

MICROPROGRAMMED CONTROL

Blog -

VERILOG 2: LANGUAGE BASICS

Recommended Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto

Finite State Machines (FSMs) and RAMs and CPUs. COS 116, Spring 2011 Sanjeev Arora

EEL 4744C: Microprocessor Applications. Lecture 7. Part 1. Interrupt. Dr. Tao Li 1

Reading Assignment. Interrupt. Interrupt. Interrupt. EEL 4744C: Microprocessor Applications. Lecture 7. Part 1

Outline. EECS Components and Design Techniques for Digital Systems. Lec 11 Putting it all together Where are we now?

/90 TOTAL. 1(a) 8pts. fiv(a,b) is called the function.

ENCM 369 Winter 2019 Lab 6 for the Week of February 25

SHRI ANGALAMMAN COLLEGE OF ENGINEERING. (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

MICROPROCESSOR B.Tech. th ECE

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

Lecture-9 Intel 8085 Microprocessor It is a 40-pin DIP(Dual in package) chip, base on NMOS technology, on a single chip of silicon.

University of Technology

5. (a) What is secondary storage? How does it differ from a primary storage? (b) Explain the functions of (i) cache memory (ii) Register

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 01, SPRING 2013

Chapter 20 - Microprogrammed Control (9 th edition)

8085 Interrupts. Lecturer, CSE, AUST

Architecture of 8085 microprocessor

Design a three-input, two-output sequential digital circuit which functions as a digital locking mechanism. LOCK ALARM

Model EXAM Question Bank

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE) UNIT-I

Laboratory Exercise 3 Davide Rossi DEI University of Bologna AA

Digital Electronics Education and Design Suite

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics

DIRECTORATE OF TECHNICAL EDUCATION DIPLOMA IN ELECTRICAL AND ELECTRONICS ENGINEERING II YEAR M SCHEME IV SEMESTER.

Transcription:

Computer Architecture MT 2 A3 Computer Architecture Engineering Science 3rd year A3 Lectures Prof David Murray david.murray@eng.ox.ac.uk www.robots.ox.ac.uk/ dwm/courses/3co Michaelmas 2 /

Computer Architecture MT 2 Computer Architecture 3A3 Michaelmas 2 Prof D W Murray 2 /

Computer Architecture MT 2 Overview The development of the the digital computer must rank as one of the two engineering achievement which have has most impact on the progress of this century. Open up the box on any PC, and one is likely to be (i) impressed and (ii) daunted by the sheer complexity even of what one can see. One is looking at the cumulative wizardry of, say, 6 engineer-years of development. Not surprising if you personally could not reproduce it tomorrow. BUT you already know all you need to build a computer. 3 /

Computer Architecture MT 2 After the st year you know...... how to build combinational logic including larger elements such as ROMs, PLAs... how to design sequential logic... how to design machines with a finite number of identifiable states. But you have probably/certainly forgotten it all... 4 /

Computer Architecture MT 2 In these lectures... You are going to exploit what you know to discover how the most sophisticated sequential machine the general purpose computer works. The emphasis is on computer architecture rather than on computer buildings. Computer designs are diverse, often creating confusion. However, as with conventional architecture, although the detailed shape and plumbing is different, the underyling principles are obeyed...... and the differences are the result of engineering design considerations. We will establish a Bog Standard Architecture to expose the necessities providing a basis for understanding more complex designs. 5 /

Computer Architecture MT 2 Lecture Content Lecture revises Sequential Logic and introduces RTL. Lectures 2 5 deal with the basic operation of the core of the computer. Lectures 6 8 extend the picture to include the hardware and software functionality of the typical machine. Revision and RTL 2 Overall structure of CPU and Memory. Instruction Fetching. 3 Control : The random logic controller. 4 ALU and Memory hardware. The Status word. 5 Control 2: Microprogrammed controller 6 The macro level. Memory addressing and stacks. 7 I/O, programmed and interrupt-driven. 8 Memory hierarchies ++ 6 /

Computer Architecture MT 2 A hierarchy of languages You will see ermerging a hierarchy of representations of machine operation. The operational description at the lowest (micro-) level will be in terms of RTL We will introduce Assembler Language as a way of describing several RTL statements (the macro-level) We shall look at how certain aspects of languages at the high level get compiled. 7 /

Computer Architecture MT 2 Books... Hill and Peterson, Digital Logic and Microprocessors, John Wiley and Sons, New York, ISBN -47-82979-X Essential reading up to and including Chapter on RTL. Chapter - on small computer organization is showing its age. Clements, The Principles of Computer Hardware 2nd ed, Oxford University Press, ISBN -9-853764-6 Early chapters cover basic combinational and sequential logic Chapter 5 onwards are essential reading Tanenbaum, Structured Computer Organization (998 edition) focusses on overall operation of computer systems stresses the hierarchy of levels of detail at which the operation can be viewed More emphasis is given to the higher levels than other texts. Introduces description based on virtual machine and Java. YOU MUST READ! Don t merely rely on the notes. 8 /

Computer Architecture MT 2 : Revision and Register Transfer Language 3A3 Michaelmas 2 9 /

Computer Architecture MT 2 State machines using flip-flops: revision Problem: Design using JK flip flops a modulo-4 counter that if x= would count repeatedly from,,2,3,... and if x= would cound 3,2,,,... Solution. If we designate the output bits as the outputs Q and Q of the JKs, then there are 4 states, for which we require 2 flip-flops. The truth table and transition list of the JK are J K Q k+ Q k Q k x= O O J K J K X X J K Q k Q k+ X X X X and hence x= O O J K J K X X /

Computer Architecture MT 2 To repeat... x= O O J K J K X X x= O O J K J K X X Thus J is a function of O, O and x, and its Karnaugh map is x O O X X X X whence J = O.x + O.x and similarly for K, J, and K. /

Computer Architecture MT 2 State machines using ROMs You also saw in Year that an easy method of building a sequence state machine was to use a ROM, where: one part of the contents at a particular address tells you what to do now, and the other part tells you the address of where to go next Problem. Design using a ROM a modulo-4 counter that if x= would count repeatedly from,,2,3,... and if x= would count 3,2,,,... Whenever the output is, a light should light. 2 /

Computer Architecture MT 2 One possible solution let x become the high bit of the ROM address, as in D type latches A A Address 2 3 4 5 6 7 Contents Where next? What now? x=a2 C2 C C Count Output Light Output 3 /

Computer Architecture MT 2 Should ROM solutions be clever? Tempting to ask whether there is not a more efficient solution than Contents Where next? What now? D type latches A A Address 2 3 4 5 6 7 x=a2 C2 C C Count Output Light Output Eg, here the light output could be made by ANDing the inverses of C 2 and C. For another, by reorganizing the where next bits of addresses 4 to 7, we could make the content bits C 2 and C the same as A and A, and therefore redundant. Such questions miss the main points of using a ROM: to provide a solution with minimal thought and to provide a solution which is alterable merely by re-programming the ROM. 4 /

Computer Architecture MT 2 Algorithmic State Machine Charts These two methods of designing sequential circuits are specific hardware solutions, but they do not address a particular area of the design problem: the translation of the written description of what a machine should do into a formal description of the state machine. One way of doing this is to use an ASM chart, similar to flow diagrams used in software design. 5 /

Computer Architecture MT 2 Algorithmic State Machine Charts There are three symbols in such diagrams: State definition (rectangles): There is one per state. It gives the name of the state, the binary flip-flop values that define the state, and a list of outputs. Decision (diamonds): There are any number of these for each state. Each senses an input condition or flag, and takes a binary decision. Conditional outputs (curvy boxes): These occur at the exit lines of decision diamonds, and describe outputs that become true only when a condition is satisfied. Note that these outputs cannot change the outputs given in the state box. If you need to do that, you need an extra state. 6 /

Computer Architecture MT 2 Vending machine example Problem. A vending machine holds items which cost 2 cents, and accepts 5 cent (nickel), cent (dime) and 25 cent (quarter) coins. Sensors in the coin shute cause two flags to be set as follows Coin I I2 No Coin 25 5 When coins to the value of 2 cents are deposited, the activate signal A is set to for one clock cycle. If a 25 cent coin is deposited, a change signal C is set to one. Flag R is set when the user wishes to have all money returned. 7 /

Computer Architecture MT 2 Vending machine example Example Solution. A possible solution is shown in Figure??. Any press of the Return button and every completed transaction puts the system in the Q state. From there one enters Q25 if a 25 cent coin is deposited, Q if a cent coin and Q5 if a 5 cent. Notice that in this solution if in Q5, Q or Q5 when a 25 coin is deposited, the coin is ignored. However, also notice that in the solution given when the machine is in state Q5, any coin will be accepted and no change given. There are 6 states, so at least 3 flip-flops are required. There is no method to determine how to assign the configuration of flip-flop outputs to the particular states, but the choice will alter the complexity of the resulting circuit. Thus, the choice of Q= and Q5= etc is not arbitrary, but nonetheless there are no formal rules to obtain the optimal assignment. 8 /

Computer Architecture MT 2 ASM Chart Q R= I2= I= I= Q25 C= A= Q Q5 R R I= I= I2= I2= Q2 A= Q5 R I+I2 9 /

Computer Architecture MT 2 Separating Data and Control More economical graphical methods can be found to represent state machines. BUT, whatever graphical method is used, there is an obvious difficulty using a method which represents every state. Given n flip-flops we require 2 n states which gets very large very quickly. Now, the large numbers of flip-flops are often storing data upon which the machine operates in largely the same way irrespective of what the data is exactly. Our understanding then of how the machine functions depends on those control operations, not on the particular data. It makes sense then to separate the representation of control from that of data. 2 /

Computer Architecture MT 2 Separating Data from Control The control section will need at times to know something about the data for example, to take a different action if a datum is zero rather than positive so there will be two way communication between the control and data sections BUT, only decision flags about a datum, not the datum itself need be communicated. Data In Data Section Data Out Control Signals Data Flags External Controls Control Section 2 /

Computer Architecture MT 2 Register Transfer Language It is of course possible to describe the control section of such a machine using ASM charts But the language does not have the syntax to deal with data elements. Instead we can use a hardware description language called Register Transfer Language. Why Register Transfer? The transfer of data between two storage registers is the principal activity that occurs in the data section of the machine, and as we will see in Lecture 2 is the bread and butter operation in computers. 22 /

Computer Architecture MT 2 Register Transfers A register is a D-type latch which transfers input to output on a receipt of a clock pulse: that is Q t+ = D t. In the example on the leftby clocking register b, the transfer b a is effected. Most often the register has several bits. In the right hand example B A means that B[i] A[i] for i =,, 2, 3. Note carefully that the receiving register is clocked, NOT the transmitting register. D Q A[] B[] a b Q A[] A[2] B[] B[2] A[3] B[3] A B 23 /

Computer Architecture MT 2 Syntax of RTL by example Module: Datamover Memory: A[2];B[2];C[2];S Inputs: X[2]. Ouputs: Z [2]; P. A X 2 C A; S A[] 3 B C 4 C A B 5 Z = C; S ; ENDSEQUENCE ControlReset(); P = S. END 24 /

Computer Architecture MT 2 Control section: generating CSL and CSP signals To get the data section to work may require on each line CSL a level signal, typically to set up data pathways between registers CSP an edge or pulse to fire the register transfers. These are provided by the control section. To realize the control section, you count the number of lines of RTL (here 5) In our example flows uninterrupted from line to 5, where there is an unconditional goto (). (We shall see a conditional goto later on.) study the flow from one line to another. 25 /

Computer Architecture MT 2 Hardware realization of Control Section Control Reset CSLn CSPn CSL CSP 2 3 4 5 S R R R R Falling edge triggers D type Level to set up combinational logic Falling edge to trigger register transfer Transition from one line to the next occurs on the falling edge of a clock pulse. The clock is ANDed with the CSL to provide a pulse CSP which is used to fire the register transfers and the transition to the next line of RTL. So CSP only occurs at the end of line of RTL. CSLn+ CSPn+ 26 /

Computer Architecture MT 2 Other observations... CSL CSP 2 3 4 S R R R 5 R Control Reset The latch corresponding to the active line has output the remainder have output. The () is achieved by looping the output of latch 5 into the input of latch. Notice too that the reset line sets flip-flop high, and the rest low. The level output from a latch supplies the CSL signal, so CSL is high during line, CSL2 is high during line 2, and so on. 27 /

Computer Architecture MT 2 Data section: using the CSL and CSP signals The register hardware required for the data section is defined in the first blocks of the module. MEMORY: A[2]; B[2]; C[2]; S INPUTS: X[2]. OUTPUTS: Z [2]; P. X[] A S P X[] Z[] B C Z[] 28 /

Computer Architecture MT 2 Data section/ continued Line of sequence indicates that inputs X are connected to the input of register A, which is clocked by CSP. A X X[] A S P X[] Z[] B C Z[] CSP 29 /

Computer Architecture MT 2 Line 2 2 C A; S A[] Line 2 indicates that the inverted outputs of A are to be connected to C and that the output A[] should be connected to the input of S. CSP2 should be attached to the input of C and S. X[] X[] B A Q Q S C P Z[] Z[] CSP CSP2 3 /

Computer Architecture MT 2 Line 3 3 B C X[] X[] A Q Q S P Z[] B C Z[] CSP CSP3 CSP2 3 /

Computer Architecture MT 2 Line 4 4 C A B For Line 4, our design need modifying. Notice that C is clocked on line 4 as well as line 2, so C s clock input must be CSP2 CPS4. But on line 2, the inputs to C are connected to A and on line 4 they are connected to A B. We need to insert AND gates, ANDing with CSL2 and CSL4 respectively, and then OR the inputs into C. A CSL2 S X[] P Q X[] Q Z[] B C Z[] CSP CSP3 CSL4 CSP4 CSP2 32 /

Computer Architecture MT 2 Line 5 5 Z = C; S ; At line 5, Z = C means that outputs Z should be connected to the output of C for the entire line so we must AND the outputs of C with CSP5. In addition, we have to make alterations to the input of S and to its clock input. (Incomplete! See Question sheet.) X[] X[] A Q Q CSL2 S P Z[] B C Z[] CSP CSP3 CSL4 CSP4 CSP2 33 /

Computer Architecture MT 2 Using data to control flow MODULE: DATAMOVER MEMORY: A[2]; B[2]; C[2]; S INPUTS: X[2]. OUTPUTS: Z [2]; P. A X 2 C A; S A[] 3 B C 4 C A B; (A[], A[])/(5, 6) 5 Z = C; S ; 6 Z = C; S ; ENDSEQUENCE ControlReset(); P = S. END 34 /

Computer Architecture MT 2... using a de-multiplexer! A[] provides the selection line in a multiplexer. During Line 4 CSL4 is high, and if A[] is high the input to latch 5 is high, but if A[] is low the input to latch 6 is high. After the next clock pulse, CSL5 or CSL6 respectively will go high. Note that because there are multiple ways of arriving back at Line, the input to latch requires an OR gate. There are obviously some alterations required to the Data Section for the new line 6. You are asked to do these in the Problem Sheets. 35 /

Computer Architecture MT 2 Timing Let us consider the various register outputs as a function of time for particular inputs X. Note that X can change asynchronously. A X 2 C A; S A[] 3 B C 4 C A B; (A[], A[])/(5, 6) 5 Z = C; S ; 6 Z = C; S ; 36 /