Chapter 3 : Top Level View of Computer Functions Basic CPU function, Interconnection, Instruction Format and Interrupt.

Slides:



Advertisements
Similar presentations
ARITHMETIC LOGIC SHIFT UNIT
Advertisements

Computer Organization and Architecture
Computer Organization and Architecture
CSCI 4717/5717 Computer Architecture
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
1 Computer System Overview OS-1 Course AA
Computer System Overview
University College Cork IRELAND Hardware Concepts An understanding of computer hardware is a vital prerequisite for the study of operating systems.
TECH CH03 System Buses Computer Components Computer Function
Computer Organization and Assembly language
CH12 CPU Structure and Function
CS-334: Computer Architecture
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
The Structure of the CPU
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
MICROPROCESSOR INPUT/OUTPUT
THE COMPUTER SYSTEM. Lecture Objectives Computer functions – Instruction fetch & execute – Interrupt Handling – I/O functions Interconnections Computer.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Top Level View of Computer Function and Interconnection.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 1 Computer System Overview.
2 nd Year - 1 st Semester Asst. Lect. Mohammed Salim Computer Architecture I 1.
COMPUTER ORGANIZATIONS CSNB123. COMPUTER ORGANIZATIONS CSNB123 Expected Course Outcome #Course OutcomeCoverage 1Explain the concepts that underlie modern.
Computer Architecture Lecture 2 System Buses. Program Concept Hardwired systems are inflexible General purpose hardware can do different tasks, given.
EEE440 Computer Architecture
Lecture 14 Today’s topics MARIE Architecture Registers Buses
ECEG-3202 Computer Architecture and Organization Chapter 3 Top Level View of Computer Function and Interconnection.
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
By Fernan Naderzad.  Today we’ll go over: Von Neumann Architecture, Hardware and Software Approaches, Computer Functions, Interrupts, and Buses.
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 21 & 22 Processor Organization Register Organization Course Instructor: Engr. Aisha Danish.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Chapter 6: Computer Components Dr Mohamed Menacer Taibah University
Dr Mohamed Menacer College of Computer Science and Engineering, Taibah University CE-321: Computer.
Lecture 1: Review of Computer Organization
Computer Organization Instruction Set Architecture (ISA) Instruction Set Architecture (ISA), or simply Architecture, of a computer is the.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
PART 4: (1/2) Central Processing Unit (CPU) Basics CHAPTER 12: P ROCESSOR S TRUCTURE AND F UNCTION.
Group 1 chapter 3 Alex Francisco Mario Palomino Mohammed Ur-Rehman Maria Lopez.
Processor Organization
Structure and Role of a Processor
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
Types of Micro-operation  Transfer data between registers  Transfer data from register to external  Transfer data from external to register  Perform.
Functions of Processor Operation Addressing modes Registers i/o module interface Memory module interface Interrupts.
Basic Processor Structure/design
CHAPTER 4 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Chapter 3 Top Level View of Computer Function and Interconnection
Introduction to Micro Controllers & Embedded System Design Stored Program Machine Department of Electrical & Computer Engineering Missouri University.
Computer System Overview
William Stallings Computer Organization and Architecture 8th Edition
ECEG-3202 Computer Architecture and Organization
Processor Organization and Architecture
BIC 10503: COMPUTER ARCHITECTURE
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
Computer System Overview
Computer System Overview
COMPUTER ARCHITECTURE
Presentation transcript:

Chapter 3 : Top Level View of Computer Functions Basic CPU function, Interconnection, Instruction Format and Interrupt

Agenda 1.Basic Function of a computer. The view of software execution. Before, we discussed “micro program” (hardware), now we discuss software 2.“Picture” of program in memory : machine format, hexa-decimal format, mnemonic codes 3.Basic Instruction Format and its corresponding CPU components (PC, IR) 4.Interconnection structures (highlight) 4. Interrupt : a way of sharing CPU time amongst different devices attached to it (hardware discussion)

3.2. The Computer Function Basic function : program execution Program : Set of instructions stored in memory CPU fetches the instructions, one at a time and executes them one by one, according to the operation code Simple way of thinking : two steps of instruction processing, fetch and execute Actually, instruction execution may involve a number of steps The processing time required for execution of a single instruction is called an instruction cycle time

3.2 Computer Function : Basic Instruction Cycle Fetch Next Instruction Execute Instruction START HALT Fetch Cycle Execute Cycle

3.2 Function - Fetch and Execute Cycles An instruction is fetched to CPU using the address in PC (Program Counter) Unless told otherwise, CPU always increment PC after fetching an instruction. PC points to next instruction. Example : For instance PC is set to 300. After a fetch cycle, the PC is incremented by 1. PC points to location 301. This activity happens at PC unless CPU execute a jump instruction. The fetched instruction is loaded into IR (Instruction Register) in the CPU. The instruction is in the form of binary code.

3. System Bus 3.1. Computer Components : MAR MBR I/O AR I/O BR CPUMemory I/O Module Buffers n Instruction... Data IR PC

3. System Bus 3.1. Computer Components : MAR MBR I/O AR I/O BR CPUMemory I/O Module Buffers n Instruction... Data IR PC

3. System Bus 3.1. Computer Components : MAR MBR I/O AR I/O BR CPUMemory I/O Module Buffers n Instruction... Data IR PC

3.2 Function - Instruction format & codes Consider a hypothetical machine : OpCodeAddress a. Instruction Format S Magnitude b. Integer Format Program Counter (PC) = Address of Instruction Instruction Register (IR) = Instruction being Executed Accumulator (AC) = Temporary Storage c. Inter CPU Registers 0001 = Load AC from Memory 0010 = Store AC to Memory 0101 = Add to AC from Memory d. Partial List of Opcodes

3.2 Function - Example of program execution Word length = 16 bit: 1. Assume PC contains 300. This content of location 300 is loaded into IR ( First PC to MAR, READ, Memory xfer to MBR and finally MBR to IR). 2. The first 4 bit in IR indicate that AC is to to be loaded. The next 12 bits (940) specify operand address. 3. PC is incremented, next instruction is fetched 4. Old content of AC & content of location 940 are added, stored in AC. 5. PC is incremented, next instruction is fetched. 6. The content of AC are stored in location 941. OpCode Address (12 bits)

Instructions and Data in Memory Instrcution (16 bits)Instruction & DataMemory (hexadecimal)Address instructions data

3.2 Function - execution in hypothetical machine

3.2. Interrupt Interrupt is a mechanism whereby a particular computer system component (I/O devices, Real Time Clock, Memory Unit, etc) could ask for CPU attention due to some very important condition occuring

Interrupt in Computer Systems Governed by : Operating Systems Interrupt : Mechanism to alert CPU, something needs its attention

3.2 Interrupts Table 3.1 : Classes of Interrupts Program Generated by some condition that occurs as a result of an instruction execution, such as arithmetic overflow, division by zero, attempt to execute illegal instruction, reference outside user’s allowed memory space. Timer Generated by timer within the processor. This allows the O/S to perform certain function on regular basis. I/O Generated by an I/O controller, to signal normal completion of an operation or to signal a variety of error conditions Hardware Failure Generated by failure, such as power or memory parity

Transfer of Control via Interrupts

What happen with instruction cycle ? Instruction cycle with interrupt

Example of Interrupt chain Priority Encoder Bus Buffers IST IEN VAD To CPU Signal line From CPU Signal line tp CPU Disk Printer FloppyKeyboard I0I0 I1I1 I2I2 I3I3 Mask register Bus Buffer Enable line Interrupt register x y Mask Register could be set to 0, which disable the possibility of accepting interrupt signal from devices (0 through 3) IEN is a latch, that may be set by the CPU to enable/disable the acceptance of any interrupt form all devices

Example of Interrupt chain Priority Encoder Bus Buffers IST IEN VAD Interrupt to CPU Disk Printer FloppyKeyboard I0I0 I1I1 I2I2 I3I3 Mask register Interrupt register Device 0 interrupt, mask-bit is 1. Interrupt signal reach Priority Encoder, going out with device code 11 (in VAD) Interrupt signal goes further to CPU, using the bottom side of the circuit (red lines)

Example of Interrupt chain Priority Encoder Bus Buffers IE IST IEN VAD Interrupt Address (VAD) (Vector) To CPU INTACK from CPU Disk Printer FloppyKeyboard I0I0 I1I1 I2I2 I3I3 Mask register Enable Interrupt register Interrupt Acknowledged by the CPU (INTACK) Interrupt enable latch is set on (IEN) Interrupt signal, IEN signal and INTACK set the IE AND gate to pass interrupt enable signal to BUS Buffers Enabled by this signal, Bus Buffers send the interrupt address to CPU (the address of interrupt handler)