Computer Architecture Lecture – 4.  Discussed individual functional units of the computer.  But to form a fully computational unit, they must be connected.

Slides:



Advertisements
Similar presentations
IO Interfaces and Bus Standards. Interface circuits Consists of the cktry required to connect an i/o device to a computer. On one side we have data bus.
Advertisements

Computer Architecture
Computer Organization, Bus Structure
I/O Organization popo.
Chapter 3 Basic Input/Output
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
I/O Organization popo.
INPUT-OUTPUT ORGANIZATION
Addressing Modes (Week4)
Input/Output Organization Asynchronous Bus
Processor System Architecture
CS-334: Computer Architecture
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
1 Sec (2.1) Computer Architectures. 2 For temporary storage of information, the CPU contains cells, or registers, that are conceptually similar to main.
Basic Input/Output Operations
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Interface circuits I/O interface consists of the circuitry required to connect an I/O device to a computer bus. Side of the interface which connects to.
0 What is a computer?  Simply put, a computer is a sophisticated electronic calculating machine that:  Accepts input information,  Processes the information.
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
INPUT-OUTPUT ORGANIZATION
Computer Architecture Lecture 08 Fasih ur Rehman.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
Input/OUTPUT [I/O Module structure].
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.
Basic Structure of Computer Computer Architecture Lecture – 2.
Input and Output Computer Organization and Assembly Language: Module 9.
MICROPROCESSOR INPUT/OUTPUT
Interrupts and DMA CSCI The Role of the Operating System in Performing I/O Two main jobs of a computer are: –Processing –Performing I/O manage and.
1. Introduction 2. Methods for I/O Operations 3. Buses 4. Liquid Crystal Displays 5. Other Types of Displays 6. Graphics Adapters 7. Optical Discs 10/01/20151Input/Output.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Overview of Hardware.
Advanced Computer Architecture 0 Lecture # 1 Introduction by Husnain Sherazi.
2009 Sep 10SYSC Dept. Systems and Computer Engineering, Carleton University F09. SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices 7.2.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
Computer Organization - 1. INPUT PROCESS OUTPUT List different input devices Compare the use of voice recognition as opposed to the entry of data via.
Computer Architecture Lecture 2 System Buses. Program Concept Hardwired systems are inflexible General purpose hardware can do different tasks, given.
Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
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.
Chapter 4. Input/Output Organization
CH10 Input/Output DDDData Transfer EEEExternal Devices IIII/O Modules PPPProgrammed I/O IIIInterrupt-Driven I/O DDDDirect Memory.
7. Peripherals 7.1 Introduction of peripheral devices Computer Studies (AL)
INTRODUCTION.  Upon completing this topic, you should be able to: Illustrate a basic elements of digital computer system and their functions, Depicts.
Lecture 4-1 I/O Organization I/O Accesses Interrupt in general Next Lecture   ARM Interrupt   DMA.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
4 Linking the Components Linking The Components A computer is a system with data and instructions flowing between its components in response to processor.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
IT3002 Computer Architecture
Processor Memory Processor-memory bus I/O Device Bus Adapter I/O Device I/O Device Bus Adapter I/O Device I/O Device Expansion bus I/O Bus.
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
بسم الله الرحمن الرحيم MEMORY AND I/O.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
Computer Organization
Department of Computer Science and Engineering
Computer Architecture
Input/Output.
Interfacing Memory Interfacing.
Presentation transcript:

Computer Architecture Lecture – 4

 Discussed individual functional units of the computer.  But to form a fully computational unit, they must be connected and organized in a proper way. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 The functional units of the computer must be organized so that all its units can handle one full word of data in a given time.  When a word of data is transferred between two units, all the bits are transferred simultaneously at the same time, over many wires/lines, one bit/wire.  Such a group of lines serving as a connecting path is called a bus. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 Bus not only carries data, but also addresses and control signals.  The simplest way to inter connect functional units(includes I/O devices) is to use a single bus.  But then, that bus can be used for only one transfer at a time actively between two units.  So, only two units can access that bus at a single time. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 Reasons for using single bus :  Single bus means, lower number of wires, so low cost.  Ease of adding an input or output device.  Flexibility of adding a new input or output device.  Problems of single bus(Advantage of using multiple buses) :  Can not support concurrent transfers to be carried out at the same time. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 Cost is increased due to the increase of wires.  Can achieve lower performance than multiple bus structure.  Now, speed of operation of all the functional units are not same.  Memory and processor operates at electronic speed, so the fastest part of the computer.  But the peripherals that is I/O devices are relatively slow. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 Since in a single bus structure, all the devices have to communicate over that single bus, an efficient way is required to make these slow I/O devices compatible with faster units.  A common approach to smooth out this differences in speed is to use another special storage, called buffer register.  The task of the buffer register(with each I/O device) is to hold data during transfer. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 Example of using a buffer register :  Assume, we have to print a character.  The processor sends the encoded character over the bus to the printer buffer register.  Since, register can operate in electronic speed, this transfer takes less time, because according to speed, buffer register is compatible with the processor. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 After the buffer is loaded, printer cam slowly print it, then there no problem is created due to the slow printer.  And the processor also need not wait for the printer to finish its job.  After giving the character the to buffer register, it ca go back to its next task.  So, here the buffer register with the printer is used to smooth out the speed difference. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 Since, in this single bus structure, three types of information(data, address and control signal) is passed through this single bus,  It consists of three sets of wires to carry data, address and control signal.  Each I/O device has a unique address.  To access a particular I/O device, the processor places the address of that device on the address line. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 The device corresponding to the device recognizes its address.  Responds to the command issued in the control signal on the control information lines.  The processor requests either read or write operation.  The requested data is then transferred over the data lines. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET ProcessorMemory I/O device 1I/O devicen Bus Figure 4.1. A single-bus structure.

 Memory-mapped I/O :  If memory and I/O devices share the same address space, the arrangement is called memory-mapped I/O.  DATAIN is the address of the input buffer and DATAOUT is the address of the output buffer of an I/O device.  For example, if Move DATAIN, R0 is an instruction, then it transfers the content of the 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 memory address DATAIN associated with the input buffer of some input device(say, keyboard) into Ro register.  Similarly, Move Ro, DATAOUT instruction moves the content of Ro register into the memory location DATAOUT, associated with the output buffer of some output device(say monitor).  Most of the computer system use memory- mapped I/O because it leads to a simpler s/w. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 Some processor has special instruction for I/O operation(IN/OUT) and has a separate 16 bit address space for I/O device.  One advantage of it is I/O devices can be accessed through fewer address lines.  But, one important concept is, this I/O address lines for such processor is not separate from the memory address line. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 When a special control signal for I/O access is asserted, I/O devices examine the lower order bits of the address bus.  H/W requirements to connect an I/O device with the bus :  Address Decoder : ▪ Enables the I/O device to recognize its corresponding address when its address appears in the address lines. ▪ Connected to the address lines of the bus. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 Data and Status Register : ▪ The data register holds the data being transferred to or from the processor. ▪ The status register contains information relevant to the operation of I/O devices. ▪ Both the data and status registers are connected to the data bus and the I/O device. ▪ Each of these registers are assigned a unique address.  Control Circuits : ▪ Coordinates the total I/O transfer operation. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 This address decoder, data register, status register and the control circuitry constitutes the I/O device’s interface circuit.  Some other basic idea’s for performing I/O operation : ▪ SIN Flag : Status flag, part of the status register. This flag is set to 1, when there is some data in the input buffer of an input device, otherwise cleared to 0. ▪ SOUT Flag :Status flag, part of the status register. This flag is set to 1, when there is some data in the output buffer of an output device, otherwise cleared to 0. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 Example : Write a program that takes a line of characters one by one as input and show them in any output device.  Solution :  The 4 registers, DATAIN, DATAOUT, STATUS, CONTROL are involved in any I/O operation.  Only two flags, SIN and SOUT is necessary in this example. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 Others bits in the STATUS and CONTROL registers(DIRQ, KIRQ, DEN, KEN) are not needed to be discussed for this problem.  Data from the input device(say, keyboard) are available in the DATAIN register, and  Data that is to be shown in a output device(say, monitor) is sent the DATAOUT register. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET Move#LINE, R0Initialize memory pointer WAITKTestBit#0, STATUSTest SIN(0 th bit of STATUS register) Branch = 0WAITKWait for character to be entered MoveDATAIN, R1Read character WAITDTestBit#1, STATUSTest SOUT(1 st bit of STATUS register) Branch = 0WAITDWait for display to become ready MoveR1, DATAOUTSend character to display Compare#$0D, R1Check if carriage return Branch  0 WAITKIf not, get another character Move#$0A, DATAOUTOtherwise, send Line Feed CallPROCESSCalls a subroutine to process the input line

 In the above program, R0 acts as a pointer to the character to be taken as input from keyboard.  The memory location of the start of the line of character is #LINE.  Now, in the following program, we make a slight change, that is, read the line of character from keyboard, store it in a memory location(buffer) and then display it into monitor(Self Study).  A single line is to be added to store the character in the R1 into the memory location pointed by R0. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET Move#LINE, R0Initialize memory pointer WAITKTestBit#0, STATUSTest SIN(0 th bit of STATUS register) Branch = 0WAITKWait for character to be entered MoveDATAIN, R1Read character WAITDTestBit#1, STATUSTest SOUT(1 st bit of STATUS register) Branch = 0WAITDWait for display to become ready MoveR1, DATAOUTSend character to display MoveR1, (R0)+Store character and advance the pointer Compare#$0D, R1Check if carriage return Branch  0 WAITKIf not, get another character Move#$0A, DATAOUTOtherwise, send Line Feed CallPROCESSCalls a subroutine to process the input line

 The above I/O operation is called program- controlled I/O. ▪ Where the processor repeatedly checks the status flag to maintain the synchronization between processor and I/O device. ▪ So, here the processor polls the device. ▪ There are other two mechanism for implementing I/O operation(Interrupts and Direct Memory Access) which will be discussed later. 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET

 Zaky(Chapter 1 : 1.4 )  Zaky(Chapter 4 : 4.1)  Class Lecture 1/15/2016Sumaiya Iqbal, Lecturer, CSE, BUET