The Microprocessor and its Architecture

Slides:



Advertisements
Similar presentations
The CPU The Central Presentation Unit What is the CPU?
Advertisements

Computer Architecture
Fetch-Execute cycle. Memory Read operation Read from memory.
The Fetch – Execute Cycle
Central Processing Unit
CS364 CH16 Control Unit Operation
Slide 4-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 4 Computer Organization.
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Damian BrowneLuis PabonPedro Tovar The operation of a computer in executing a program consists of a sequence of Instruction Cycles, with one machine.
2.3) Example of program execution 1. instruction  B25 8 Op-code B means to change the value of the program counter if the contents of the indicated register.
The CPU. Parts of the CPU Control Unit Arithmetic & Logic Unit Registers.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
1 Sec (2.3) Program Execution. 2 In the CPU we have CU and ALU, in CU there are two special purpose registers: 1. Instruction Register 2. Program Counter.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
CPU Fetch/Execute Cycle
2 nd Year - 1 st Semester Asst. Lect. Mohammed Salim
Computer Architecture and Organization
Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
CPU Computer Hardware Organization (How does the computer look from inside?) Register file ALU PC System bus Memory bus Main memory Bus interface I/O bridge.
Computer Architecture and Organization Introduction.
Computer Science 210 Computer Organization The von Neumann Architecture.
ECEn 191 – New Student Seminar - Session 9: Microprocessors, Digital Design Microprocessors and Digital Design ECEn 191 New Student Seminar.
Stack Stack Pointer A stack is a means of storing data that works on a ‘Last in first out’ (LIFO) basis. It reverses the order that data arrives and is.
Computer Architecture and the Fetch-Execute Cycle
Chapter 1 Introduction. Architecture & Organization 1 Architecture is those attributes visible to the programmer —Instruction set, number of bits used.
Lecture #30 Page 1 ECE 4110– Sequential Logic Design Lecture #30 Agenda 1.von Neumann Stored Program Computer Architecture Announcements 1.N/A.
Week 2.  Understand what the processor is and what it does.  Execute basic LMC programs.  Understand how CPU characteristics affect performance.
Computer Architecture Lecture 09 Fasih ur Rehman.
Section one revision:1. Computer Systems To be able to Identify and describe computer systems To demonstrate an understanding of the Central Processing.
The Central Processing Unit (CPU) and the Machine Cycle.
General Concepts of Computer Organization Overview of Microcomputer.
Fetch-execute cycle.
Computer Architecture 2 nd year (computer and Information Sc.)
COMPILERS CLASS 22/7,23/7. Introduction Compiler: A Compiler is a program that can read a program in one language (Source) and translate it into an equivalent.
HOW a Computer Works ? Anatomy of Microprocessor.
Computer Systems Organization
CS 1308 Computer Literacy and the Internet. Objectives In this chapter, you will learn about:  The components of a computer system  Putting all the.
Microarchitecture. Outline Architecture vs. Microarchitecture Components MIPS Datapath 1.
Dale & Lewis Chapter 5 Computing components
Computer Architecture Lecture 5 by Engineer A. Lecturer Aymen Hasan AlAwady 25/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Computer Architecture Lecture 4 by Engineer A. Lecturer Aymen Hasan AlAwady 17/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
CBP 2002ITY 270 Computer Architecture1 Module Structure Whirlwind Review – Fetch-Execute Simulation Instruction Set Architectures RISC vs x86 How to build.
CSIT 301 (Blum)1 Instructions at the Lowest Level Some of this material can be found in Chapter 3 of Computer Architecture (Carter)
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Chapter 10: Computer systems (1)
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Computer Science 210 Computer Organization
Lecture on Microcomputer
פרק 2: חיווט, זיכרונות בנקים זוגיים ואי-זוגיים
Number Representations and Basic Processor Architecture
COMS 161 Introduction to Computing
ECEG-3202 Computer Architecture and Organization
Computer Architecture
ECEG-3202 Computer Architecture and Organization
The Little Man Computer
MARIE: An Introduction to a Simple Computer
THE FETCH-EXECUTE CYCLE.
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
OCR GCSE (9-1) Computer Science (J276)
Computer Architecture
COMPUTER ARCHITECTURE
Sec (2.3) Program Execution.
Presentation transcript:

The Microprocessor and its Architecture Tutorial 11 The Microprocessor and its Architecture

Objectives Revision on lecture note(CPU Architecture) Intel x86 By Ivan Leung

CPU What is CPU? one central unit that executes program instructions communicates with and controls the operation of other subsystems within the computer its main function – to fetch and execute instructions By Ivan Leung

CPU By Ivan Leung

CPU Fundamental As you know, fetching and execution are broken down into smaller steps(e.g. movement between registers, addition by using ALU, etc…) Each of these smaller steps is a machine code, i.e. an assembly instruction Assembly program will be assembled to machine instructions and then put in the main memory (You should know that already, Right?) By Ivan Leung

CPU Fundamental Depends on the machine instruction, the CPU will generate a set of control signals to control other subsystem (You also known that) CPU bus(What is bus?) The bus is internal to the CPU connected the components in the CPU (e.g. ALU, GPR, MAR, MDR, PC, …) By Ivan Leung

CPU CPU with Single-bus Memory Function Completion: indicates the operation in memory is completed CPU with Single-bus CPU internal bus From control unit To main memory Y,Z and TEMP are registers. That are transparent to programmers. CPU will use it by itself. From control unit By Ivan Leung

Example of Bus organization Fetch a Word from MM Assume the address of the memory location to be accessed is in R1 and the memory data are to be loaded into R2 Write a Word to MM 1. MAR <= [R1] 2. Read (control to memory) 3. Wait for MFC from memory 4. R2 <= [MDR] CPU idle 1. MAR <= [R1] 2. MDR <= [R2], Write signal to control 3. Wait for MFC from memory By Ivan Leung

Control signals To MM: To Registers: To ALU: Read, Write, Reset, etc Riin – input data to Ri from CPU bus if ‘1’ Riout – output data in Ri to CPU bus if ‘1’; ‘0’: bus is used by others reset, etc… To ALU: Add, Sub, Mul, Div, etc… By Ivan Leung

Example of Control Signals Add data in R1 and R2 registers and put the result to R3 1. R1out,Yin 2. R2out, Add, Zin 3. Zout, R3in Electronic switch: In control ‘1’ will get input else will not Out control ‘1’ will output the data else ‘0’ will not By Ivan Leung

1-bit register with Switch Z means the tri-state is in high impedance mode Control to SR latch SR latch (God! What is it?) By Ivan Leung

Control Sequence ADD A,R1 Fetch Execution 1. PCout,MARin, Read, Clear Y, Set carry-in to ALU, Add, Zin Load [PC] into MAR; Send Read request to the memory; Reset Y to all ‘0’s Load [PC], 0 to ALU inputs, operate PC+1 and write result to Z 2. Zout,PCin, WMFC Load [Z] to PC wait for memory to complete 3. MDRout,IRin Got data in MDR from MM and load it to IR 4. IRout,MARin, Read Load address of A to MAR Send Read request to the memory 5. R1out,Yin, Load [R1] to Y and further to ALU 6. MDRout,Add,Zin Got data in MDR from MM and load it to ALU, add it to [Y], and write result to Z 7. Zout,R1in,End Load [Z] to R1 Fetch Execution By Ivan Leung

Control Sequence BRN(conditional/unconditional) 1. PCout,MARin, Read, Clear Y, Set carry-in to ALU, Add, Zin Load [PC] into MAR; Send Read request to the memory; Reset Y to all ‘0’s Load [PC], 0 to ALU inputs, operate PC+1 and write result to Z 2. Zout,PCin, WMFC Load [Z] to PC wait for memory to complete 3. MDRout,IRin Got data in MDR from MM and load it to IR 4. PCout, Yin Load branch address to Y and further to ALU 5. IRout, Add, Zin Load [IR] to ALU and add it to [Y], put the result to Z 6. Zout,PCin,End For step 4, if not satisfy branch condition, then End branch address = [PC] + Offset By Ivan Leung

CPU with 3 internal buses required significantly fewer control steps ADD R1,R2,R3 (one clock cycle) execution phase to be performed in one clock cycle Y is not required because ALU can take two inputs from two registers from two data buses Z is not required because ALU can write the result to the destination register by 3rd bus performs register-to-register operations in a single clock cycle By Ivan Leung

CPU Architecture By Ivan Leung

Control Signal But how to generate the control signals as the control sequence discussed before? By microprogramming What is microprogramming? Using a sequence of microinstructions to generates a sequence of control signals By Ivan Leung

Microprogramming A control word(CW) is a word whose individual bits represent the various control signals Each CW represents a set of control signals in one step of control sequence of an instruction, which is called microinstruction A sequence of CWs, which is referring to the control sequence of a machine instruction, is called microroutine Microprogram memory contains the microroutine of all instructions Depends on [IR], a starting address of corresponding microroutine is given to microprogram counter MicroPC will be incremented and then a sequence of CWs will be given out By Ivan Leung

Hand-shaking with Memory In the control sequence, there are steps that have to wait for MFC from memory. A signal WMFC is used. By Ivan Leung

Hand-shaking with Memory Why MR? if But, if it starts at (i+1)-th pulse, However, after the drop of (i+1)-th pulse and before the raise of (i+2)-th pulse, It is wrong! By Ivan Leung

80x86 By Ivan Leung

8086 (Review) 16-bit processor with 20-bit address bus Direct mode addressing with memory space of 1MByte 14 words by 16-bit register set (You should be familiar with them) Byte addressable For address and data operands, the least significant byte of the word is stored in the lower valued address location and the most significant byte in the next higher address location By Ivan Leung

8086 (Review) By Ivan Leung

8086 Why there is no Program Counter(PC)? How stack works? How to indicate the next instruction to be executed? How stack works? What is the function of SP? What is the starting position of SP? How “CALL” works? How to jump to other procedure? How to return(RET) to previous procedure? By Ivan Leung