CSS 372 Oct 2 nd - Lecture 2 Review of CSS 371: Simple Computer Architecture Chapter 3 – Connecting Computer Components with Buses Typical Bus Structure.

Slides:



Advertisements
Similar presentations
Computer Architecture and Organization
Advertisements

Chapter 7: System Buses Dr Mohamed Menacer Taibah University
Computer Architecture
Digital Computer Fundamentals
Interrupts Chapter 8 – pp Chapter 10 – pp Appendix A – pp 537 &
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.
TCSS 372A Computer Architecture. Getting Started Get acquainted (take pictures) Discuss purpose, scope, and expectations of the course Discuss personal.
Overview I/O – memory mapped programmed / interrupt driven Traps mechanism & RET Subroutines & JSR & JSRR & RET Interrupt mechanism & RTI.
Chapter 9 Overview Traps mechanism & RET Subroutines & JSR & JSRR & RET Interrupt mechanism & RTI.
CSS 372 Oct 2 nd - Lecture 1 Course Overview: CSS 372 Web page Syllabus Lab Ettiquette Lab Report Format Review of CSS 371: Simple Computer Architecture.
Chapter 11-14, Appendix D C Programs Higher Level languages Compilers C programming Converting C to Machine Code C Compiler for LC-3 Please return breadboards.
Chapter 7 Interupts DMA Channels Context Switching.
University College Cork IRELAND Hardware Concepts An understanding of computer hardware is a vital prerequisite for the study of operating systems.
RapUp Dynamic Allocation of Memory in C Last HW Exercise Review for Final Final Exam Next Thursday – Same Time / Same Place.
Overview C programming Environment C Global Variables C Local Variables Memory Map for a C Function C Activation Records Example Compilation.
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.
TECH CH03 System Buses Computer Components Computer Function
Chapter 9 Trap Routines & RET Subroutines (or Functions) & JSR & JSRR & RET.
Overview Projects The Assembly Process Programmed I/O Interrupt Driven I/O.
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.
C Stack Frames / Pointer variables Stack: Local Variables Pass & Return values Frame Ptr linkage (R5) and PC linkage (R7) Pointer Variables: Defining &
Chapter 8 Overview Programmed I/O Interrupt Driven I/O.
CSS Lecture 2 Chapter 3 – Connecting Computer Components with Buses Bus Structures Synchronous, Asynchronous Typical Bus Signals Two level, Tri-state,
Overview von Neumann Model Components of a Computer Some Computer Organization Models The Computer Bus An Example Organization: The LC-3.
Midterm Wednesday 11/19 Overview: 25% First Midterm material - Number/character representation and conversion, number arithmetic - DeMorgan’s Law, Combinational.
TCSS 372A Computer Architecture. Getting Started Get acquainted (take pictures) Purpose, scope, and expectations of the course Expectations & strategy.
CS-334: Computer Architecture
Chapter 10 And, Finally... The Stack. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Stacks A LIFO.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Top Level View of Computer Function and Interconnection.
Interrupts, Buses Chapter 6.2.5, Introduction to Interrupts Interrupts are a mechanism by which other modules (e.g. I/O) may interrupt normal.
CSS 372 Oct 4th - Lecture 3 Chapter 3 – Connecting Computer Components with Buses Bus Structures Synchronous, Asynchronous Typical Bus Signals Two level,
I/O Computer Organization II 1 Interconnecting Components Need interconnections between – CPU, memory, I/O controllers Bus: shared communication channel.
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
Chapter 9 Chapter 9 Subroutines and TRAPs l Privileged Instructions l TRAP Routines l Subroutines.
13-Nov-15 (1) CSC Computer Organization Lecture 7: Input/Output Organization.
Computer System Internal components - The processor - Main memory - I / O controllers - Buses External components (peripherals). These include: - keyboard.
ECEG-3202 Computer Architecture and Organization Chapter 3 Top Level View of Computer Function and Interconnection.
Dr Mohamed Menacer College of Computer Science and Engineering, Taibah University CE-321: Computer.
Group 1 chapter 3 Alex Francisco Mario Palomino Mohammed Ur-Rehman Maria Lopez.
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
Computer Architecture. Top level of Computer A top level of computer consists of CPU, memory, an I/O components, with one or more modules of each type.
Computer Science 210 Computer Organization
CHAPTER 4 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Chapter 3 Top Level View of Computer Function and Interconnection
Computer Science 210 Computer Organization
ECEG-3202 Computer Architecture and Organization
Chapter 9 TRAP Routines and Subroutines
Chapter 9 TRAP Routines and Subroutines
TRAP Routines Privileged Instructions Subroutines
Chapter 8 I/O.
William Stallings Computer Organization and Architecture 7th Edition
Implementing Functions: Overview
Presentation transcript:

CSS 372 Oct 2 nd - Lecture 2 Review of CSS 371: Simple Computer Architecture Chapter 3 – Connecting Computer Components with Buses Typical Bus Structure Bus Structures Synchronous, Asynchronous Typical Bus Signals Two level, Tri-state, Wired Or

Simple Computer Data Paths

Simple Memory Mapped I/O Simple Memory Layout: x0000 – x00FF Trap vectors (Supports Software Interrupts) x0020 [x0400] GETC (Read Char from Keyboard) x0021 [x0430] OUT (Write Character to Console) x0022 [x0450] PUTS (Write string to Console) x0023 [x04A0] IN (Prompt, input character from Keyboard, echo character to Console) x0024 [x04E0] PUTSP (Write “packed” string to Console) x0025 [xFD70] HALT (Turn off run latch in MCR) x0100 – x01FF Interrupt Vectors (Supports Hardware Interrupts) x0200 – x2FFF System Programs & Data (“Operating System”) x3000 – xFDFF User Programs Area xFE00 – xFFFF I/O Programming “Registers” (Mapped I/O Registers) xFE00 KBSR [15 {Ready}, 14 {Intr enable}] (Keyboard Status Register) xFE02 KBDR [7:0{ascii data}] (Keyboard Data Register) xFE04 DSR [15{Done}, 14{Intr enable}] (Display Status Register) xFE06 DDR [7:0{ascii data}] (Display Data Register xFFFE MCR [15{Run latch}] (Machine Control Register)

Simple Interrupts 1)Programmer Action: Enable Interrupts by setting “intr enable” bit in Device Status Reg 2)Enabling Mechanism for device: When device wants service, and its enable bit is set (The I/O device has the right to request service), and its priority is higher than the priority of the presently running program, and execution of an instruction is complete, then The processor initiates the interrupt 4)Process to service the interrupt: The Processor saves the “state” of the program (has to be able to return) The Processor goes into Privileged Mode (PSR bit 15 cleared) Priority level is set (established by the interrupting device) The (USP), (R6)  USP.saved register (UserStackPointer.saved) The (SSP.saved)  R6 (SupervisorStackPointer) The (PC) and the (PSR) are PUSHED onto the Supervisor Stack The contents of the other registers are not saved. Why? The CC’s are cleared 5)The Processor Loads the PC from the Interrupt vector (vectors in 0100:01FF) 6)Interrupt Service Routine is executed Ends with an RTI 7)The stored user PSR (POP into PSR), PC (POP into PC), (R6)  SSP.saved, (USP.saved  R6), and the next instruction fetched

Allocating Space for Variables Global data section –All global variables stored here (actually all static variables) –R4 points to beginning Run-time stack –Used for local variables –R6 points to top of stack –R5 points to top “frame” on stack –New frame for each block (goes away when block exited) instructions global data run-time stack 0x0000 0xFFFF PC R4 R6 R5

Simple Register Convention R0 : Trap routine pass values R1 – R3 : General purpose R4 : Global variable stack pointer R5 : Frame pointer (or Activation Record pointer) R6 : Stack pointer R7 : Return PC value

Simple Activation Record Format Function stacked stuff …….. Local Variables Caller’s Frame Pointer (R5) Caller’s Return PC (R7) Function Return Value Function Pass Value n …….. Function Pass Value 1 R6 R5 X0000 XFFFF

Simple Function Call Implementation 1.Caller pushes arguments (last to first). 2.Caller invokes subroutine (JSR). 3.Callee allocates space for return value, pushes R7 and R5. 4.Callee allocates space for local variables. 5.Callee executes function code. 6.Callee stores result into return value slot. 7.Callee pops local vars, pops R5, pops R7. 8.Callee returns (RET or JMP R7). 9.Caller loads return value and pops arguments. 10.Caller resumes computation…

Chapter 3 Connecting Computer Components with Buses Typical Bus Structure Hierarchical Bus Structures Synchronous, Asynchronous Typical Bus Signals Two level, Tri-state, Wired Or PCI Bus Example

What is a Bus? A communication pathway connecting two or more devices (Computers, Components, I/O, …) Usually broadcast Often grouped –A number of channels in one bus –e.g. 32 bit data bus is 32 separate single bit channels Power lines may not be shown

What do Buses look like? –Parallel lines on circuit boards –Ribbon cables –Strip connectors on mother boards –Sets of wires

Communication with Memory

Communication with I/O

CPU Communication

Data Bus (Subset of Bus) Carries data –Remember that there is no difference between “data” and “instruction” at this level Width is a key determinant of performance –8, 16, 32, 64 bit

Address Bus (Subset of Bus) Identify the source or destination of data e.g. CPU needs to read an instruction (data) from a given location in memory Bus width determines maximum memory capacity of system –e.g has 16 bit address bus giving 64k address space

Control Bus (Subset of Bus) Control and timing information –Memory read/write signal(s) –Interrupt request/acknowledge signal(s) –Clock signal(s) –Etc.

Power/Ground (Subset of bus ?) Provides Power and Reference Levels for Devices May be several voltage levels Ground may be dispersed between signals

Bus Interconnection Scheme

Physical Realization of Bus Architecture

Types of Buses Synchronous Asynchronous (Hand Shaking) Serial (Twisted pair, Coaxial Cable,..) Parallel (Ribbon Cable,

Types of Buses Dedicated –Separate data & address lines Multiplexed –Shared lines –Address valid or data valid control line –Advantage - fewer lines –Disadvantages More complex control Ultimate performance

Physical Considerations for Buses Media (voltage, light) Signal levels Noise Absorption Noise Generation Length Delay (Bandwidth) Power Terminations - Transmission Characteristics