Midterm Wednesday 11/19 Overview: 25% First Midterm material - Number/character representation and conversion, number arithmetic - DeMorgan’s Law, Combinational.

Slides:



Advertisements
Similar presentations
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Advertisements

Chapter 8: Central Processing Unit
Chapter 10 And, Finally.... Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display A Final Collection of ISA-related.
Interrupts Chapter 8 – pp Chapter 10 – pp Appendix A – pp 537 &
68HC11 Polling and Interrupts
Allocating Space for Variables Global data section –All global variables stored here (actually all static variables) –R4 points to beginning Run-time stack.
CSS 372 Lecture 1 Course Overview: CSS 372 Web page Syllabus Lab Ettiquette Lab Report Format Review of CSS 371: Simple Computer Architecture Traps Interrupts.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Computer System Overview
1 Computer System Overview OS-1 Course AA
OS Spring’03 Introduction Operating Systems Spring 2003.
Computer System Overview
Chapter 7 Interupts DMA Channels Context Switching.
RapUp Dynamic Allocation of Memory in C Last HW Exercise Review for Final Final Exam Next Thursday – Same Time / Same Place.
Computer System Organization S H Srinivasan
Chapter 9 & 10 Subroutines and Interrupts. JSR Instruction: JSR offset (11 bit) xxxxxxxxxxx [PC ]  R7, JMP Offset Jump to Subroutine at offset.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
CSS 372 Oct 2 nd - Lecture 2 Review of CSS 371: Simple Computer Architecture Chapter 3 – Connecting Computer Components with Buses Typical Bus Structure.
State Machines Used to Design Sequential Circuits.
Chapter 8 Overview Programmed I/O Introduction to Interrupt Driven I/O Project 3.
TCSS 372A Computer Architecture. Getting Started Get acquainted (take pictures) Review Web Page (
Chapter 8 I/O Programming Chapter 9 Trap Service Routines Programmed I/O Interrupts Interrupt Driven I/O Trap Service Routines.
OS Spring’04 Introduction Operating Systems Spring 2004.
Chapter 8 Overview Programmed I/O Interrupt Driven I/O.
Overview von Neumann Model Components of a Computer Some Computer Organization Models The Computer Bus An Example Organization: The LC-3.
TCSS 372A Computer Architecture. Getting Started Get acquainted (take pictures) Purpose, scope, and expectations of the course Expectations & strategy.
COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 4 Processor Implementation ©Copyright 2008 Umakishore Ramachandran.
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
Introduction to Embedded Systems
Exceptions and Interrupts 2
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
Chapter 10 And, Finally... The Stack. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Stacks A LIFO.
Chapter 10 The Stack Stack: An Abstract Data Type An important abstraction that you will encounter in many applications. We will describe two uses:
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.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Khaled A. Al-Utaibi  Interrupt-Driven I/O  Hardware Interrupts  Responding to Hardware Interrupts  INTR and NMI  Computing the.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 part 4 Exceptions.
Microprocessors 1 MCS-51 Interrupts.
13-Nov-15 (1) CSC Computer Organization Lecture 7: Input/Output Organization.
8085. Microcomputer Major components of the computer - the processor, the control unit, one or more memory ICs, one or more I/O ICs, and the clock Major.
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.
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
6-1 Infineon 167 Interrupts The C167CS provides 56 separate interrupt sources that may be assigned to 16 priority levels. The C167CS uses a vectored interrupt.
Embedded Systems Design 1 Lecture Set 8 MCS-51 Interrupts.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Introduction to Exceptions 1 Introduction to Exceptions ARM Advanced RISC Machines.
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
Chapter 1 Computer System Overview
MICROPROCESSOR BASED SYSTEM DESIGN
68HC11 Interrupts & Resets.
Microprocessor Systems Design I
Interrupts In 8085 and 8086.
Chapter 10 And, Finally... The Stack
Chapter 8 Input/Output I/O basics Keyboard input Monitor output
Chapter 10 The Stack.
Arithmetic using a stack
Computer System Overview
Lecture 18 Interrupt 동국대학교 홍유표.
Interrupts.
Chapter 10 And, Finally... The Stack
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
Chapter 1 Computer System Overview
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
Computer System Overview
COMP3221: Microprocessors and Embedded Systems
Presentation transcript:

Midterm Wednesday 11/19 Overview: 25% First Midterm material - Number/character representation and conversion, number arithmetic - DeMorgan’s Law, Combinational logic elements, PLA’s & sequential logic elements (flip flops), and design (including debounce) - Memory organization and implementation - Clocks and Synchronous/Asynchronous timing 25% State Machines, State Transition Tables, & Implementation 25% Addressing Modes, LC-3 Architecture, Memory Map, LC-3 Machine Language, & Assembly Language Programming 25% Traps, Subroutines, I/O, & Stacks (More Assy Lang Prog) You will be able to use the “Programming Card”, and list of Trap Routines

Interrupts Chapter 8 – pp Chapter 10 – pp Appendix A – pp 537 &

Interrupts & Exceptions Interrupts: - Asynchronous external requests for service (think device needing service). - Being asynchronous, Interrupts can occur anyplace in your program! - They are a normal event, and shouldn’t interfere with the normal running of your program. Exceptions: - “Synchronous” internal requests for service based upon abnormal events (think illegal instruction, illegal address, overflow, hardware malfunction, or …). - Exceptions occur when the abnormal event happens. - They are abnormal events and often result in the termination of a program, or the execution of a “recovery” before continuing. Interrupt/Exception Vector Table: (256 Address Vectors) - x0100 – 017F: Used for addresses for exception service routines. Vector # is provided by the CPU. - x0180 – 01FF: Used for addresses for interrupt service routines. Vector # is provided by Devices.

Program Context: PC, PSW (PSR), & SP (R6) Program Status Register PSR (PSW): PSR[15] – Privilege Bit - 0 for Privileged (Supervisor) State 1 for User State PSR[10:8] – Priority Bits - Eight Levels (7 is the highest) PSR[2:0] – Condition codes - N, Z, P Stack Pointer USP & SSP: User Stack Pointer & System Stack Pointer USP.saved & SSP.saved: Two auxiliary registers that are used to store the value of the Stack Pointer (User or Supervisor) that is not in use. This is done automatically when the PSR[15] bit is switched. - When in User Mode (PSR[15] = 1), R6 is the User Stack Pointer and SSP.Saved contains the Supervisor Stack Pointer. - When in Supervisor Mode (PSR[15] = 0), R6 is the Supervisor Stack Pointer and USP.Saved contains the User Stack Pointer.

Interrupt Process This is important to understand ! 1) Programmer Action: Loads a Service Routine for the Device, and enters its Entry Addr in the Interrupt Vector Table Enables Interrupts by setting “intr enable” bit in Device Status Reg 2) Device Action to Request an Interrupt: When device wants service, (done or ready bit set) and - its priority is higher than the priority of the Presently Running Program, and - execution of the present instruction is complete, then The Device submits an “Interrupt Request”, and when granted, supplies the Interrupt Vector # 3) Processor Action to Initiate Service of the Interrupt: When the Processor accepts the Interrupt Request (Priority higher than the present Priority) - The Processor goes into Privileged Mode (PSR bit 15 cleared) - (R6)  USP.saved register and (SSP.saved)  R6 - The Processor saves the “state” of the program (has to be able to return) The (PC) and the (PSR) are PUSHED onto the Supervisor Stack (Other reg are not. Why?) - Priority level is set (established by the interrupting device) and the CC’s are cleared Then the PC is loaded with the service routine address (between 100 and 180). (Based upon the Device supplied Interrupt Vector #: 00 to 80) 5) Interrupt Service Routine is Executed: - It resets the Done or Ready bit in the DSR (Likely reads from or writes to the DDR) - Ends with an RTI 6) RTI Initiates Return of Control to the Interrupted Program: - The stored User PSR (POPed into PSR), PC (POPed into PC), - (R6)  SSP.saved, (USP.saved  R6), - and the next instruction in the interrupted program is fetched An interrupt can occur “anywhere” in a computer program, unlike Trap Calls or Subroutine Calls which occurs exactly where you place them !

Interrupt Components Device Computer Note: The Device also supplies the Service Routine Priority. That is not shown here.

Interrupt Example Intr Vectors Program flow Supervisor Stack

Interrupt Driven Keyboard Service Routine Demonstrate a Program with an Interrupt Service Routine using: LC3Edit and LC3Simulate Program: Program consists of a main program and a keyboard service routine. Program will Print “Input an Endless Character String: “ and loop forever. Program Steps: “Create Stack” Set up the Keyboard to be able to Interrupt Print prompt Loop

LC-3 Architecture - Figure C.8