Microprocessor-based Systems

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

Categories of I/O Devices
INPUT-OUTPUT ORGANIZATION
Chapter 10 Input/Output Organization. Connections between a CPU and an I/O device Types of bus (Figure 10.1) –Address bus –Data bus –Control bus.
Universal Serial Bus Grant Heileman. The History of USB In 1994 a collaborative effort to design a standard for peripheral devices was made between Compaq,
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
USB: Data Flow Sukesh Shenoy. USB implementation areas.
04/16/2010CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying an earlier edition.
TECH CH03 System Buses Computer Components Computer Function
USB – An Overview Group 3 Kaushik Nandha Bikram What is the Universal Serial bus (USB)? Is a cable bus that supports data exchange between a host computer.
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
USB 2.0 INTRODUCTION NTUT CSIE 學 生:許家豪 指導教授:柯開維教授.
Input/Output and Communication
USB: UNIVERSAL SERIAL BUS Joe Kaewbaidhoon Alex Motalleb Vishal Joshi Prepared for EECS 373 University of Michigan, Ann Arbor 1.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
INPUT-OUTPUT ORGANIZATION
INPUT/OUTPUT ARCHITECTURE By Truc Truong. Input Devices Keyboard Keyboard Mouse Mouse Scanner Scanner CD-Rom CD-Rom Game Controller Game Controller.
Lecture 12 Today’s topics –CPU basics Registers ALU Control Unit –The bus –Clocks –Input/output subsystem 1.
CS-334: Computer Architecture
Computer Architecture Lecture 08 Fasih ur Rehman.
Introduction Electrical Considerations Data Transfer Synchronization Bus Arbitration VME Bus Local Buses PCI Bus PCI Bus Variants Serial Buses 11/06/20141Input/Output.
Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in.
Introduction to USB © 2010 Renesas Electronics America Inc. All rights reserved.
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
ECE 371 – UNIT 20 Universal Serial Bus (USB). References 1. Universal Serial Bus Specification, Revision 2.0. This specification is available on the World.
MICROPROCESSOR INPUT/OUTPUT
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
1 Microprocessor-based Systems Course 9 Design of the input/output interfaces (continue)
Top Level View of Computer Function and Interconnection.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
Input/Output 2 What is I/O? How we get the CPU to communicate with devices From the computer’s point of view, it’s just 1’s and 0’s Gets interpreted.
Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and.
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
Data Communications (E&T2760): USB and IEEE USB and IEEE 1394.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
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.
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.
I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
10/15: Lecture Topics Input/Output –Types of I/O Devices –How devices communicate with the rest of the system communicating with the processor communicating.
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.
Chapter 6 Input/Output Organization
USB PHYISICAL LAYER PROTOCOL ENGINE LAYER APPLICATION LAYER
Chapter 3 Top Level View of Computer Function and Interconnection
E3165 DIGITAL ELECTRONIC SYSTEM
Computer Architecture
CSCI 315 Operating Systems Design
Operating Systems Chapter 5: Input/Output Management
William Stallings Computer Organization and Architecture 7th Edition
Chapter 13: I/O Systems.
Presentation transcript:

Microprocessor-based Systems Course 10 Design of Input/Output interfaces (continuation)

USB – Universal Serial Bus Goal: a communication standard for a wide range of peripheral devices, connectable to a PC Mouse, keyboard, joy-stick – input devices Printer – output device Scanner, Digital camera, Webcam – multimedia devices Memory-stick – storage devices replaces traditional serial and parallel interfaces Solution: multilayer protocol with master-slave functionality

Performance features Very high speed Wide bandwidth (12 Mbs) PnP (Plag and Play) facilities One interface handle many devices in the same time Many communication channels on the same physical support Transmission modes adapted to different dataflow types: sporadic data periodic data high volume of data

Physical characteristics Transmission on standard cable: 4 wires: 2 for power supply: Vcc (red), GND (brown) => 5V, 500mA 2 for data (blue and yellow ), twisted Cable length: maximum 5 m extensible with HUBs until 30 m Standard connectors: type “A” – for the computer (host or master) type “B” – for devices Connectable during normal work (hot-swappable)

Physical topology of the USB (network) Host (computer) Root Hub Device Hub Compound Device Star topology

Device types: “Host” (master) – usually a computer the device that controls the communication on the USB network distributes network access rights to the other devices moditors the USB network topology “Device” – peripheral device connected to the computer offers a given “functionality” for the host (ex: mouse, printer, scanner, etc.) when it is connected the device gets a unique address from the host the format of data depends on the type of the device information exchanged between the host and the device may be: general information information specific for a given type of devices

Device types (cont.): “Hub” – amplifying and branching device “Compound Device” – contains a HUB and some devices every device has its own address (including the HUB) “Composite Device” – contains a number of functionalities but under a single address

The USB protocol model the protocol is organized on three hierarchical layers: USB bus interface layer – the physical layer handles the physical transmission of data (on the cable) USB device layer – assures the logical connection between the host and the devices it is the operating system’s vision over the USB interface Function layer – assures the connection between the “client software” in the host and the “function” in the device

The USB protocol model Host Device Physical connection Client software Function System software Logical device Bus interface USB controller Physical connection Logical connection

Logical topology (layer 2) Host Logical Device Logical Device Logical Device Logical Device Direct connections between the host and the logical devices the physical connections (including HUBs) are ignored

Application level topology (layer 3) Host Client software Client software Client software Client software Dispozitiv Function Function Function Function

Communication channels Host Client software Buffers Communication flows Channels (Pipes) Device Endpoints Function

Communication channels communication channel: a logical connection between a device and a software that runs on the host a device may have a number of communication channels the host allocates a given bandwidth for every channel according with: the type of the data transmission and the available bandwidth Every channel ends with an endpoint, used to: configure the data channel address the channel

Endpoints Endpoint: a part of a USB device: bus access frequency it is uniquely identified through a number ends a communication channel stores the parameters of a channel: bus access frequency required bandwidth endpoint’s number behavior in case of an error maximum length of accepted packages transfer type transfer direction

Endpoints an USB device is a collection of endpoints every device have two predefined endpoints, one for input and one for output, both on address 0; the other endpoints are not defined the other endpoints are configured by the host, when the device is connected the endpoints are for input or for output a communication channel is identified through: device address, the endpoint number and the dataflow direction

Communication on the USB bus communication is made through frames of 1 millisecond (1000 cadre/s) a frame contains a number of transactions a given transfer may be performed through a number of transactions Transfer types on the USB bus: control transfer isochronous transfer, or periodic interrupt transfer or a-periodic bulk transfer or on blocks

Control transfer initiated by the host, non-periodic used for configuring and dialog with the device a control transfer contains: a “setup” transaction – through which the device is interrogated zero ore more data transfers transactions a status transaction – to find the state of the device the control transfer is performed on a standard channel present in every USB device the standard channel is used for configuration and for device interrogation through this channel the host configures all the other channels (including endpoints)

Control transfer maximum dimension of the control packet may be 8, 16, 32 or 64 bytes the “setup” packet has a fixed dimension of de 8 bytes the device descriptor specifies the maximum accepted length for the data packets the control transfers have lower priority than isochronous or interrupt transfers at most 10% of a frame is allocated for control transfers, the rest is allocated for isochronous or interrupt transfers the control transfer used “handshake” in order to guarantee the correctness of the transfer the erroneous packets are re-transmited

Isochronous transfer (periodical) assures a guaranteed bandwidth for periodic transfers the format is not specified by the USB standard; it depends on the type of the device, the content is interpreted only at the client software level the transfer is continuous, it ends only on an explicit request a reduced error detection mechanism, the erroneous frames are not re-transmitted the transfer through an endpoint is made in a single direction; for bidirectional transfer two endpoints must be defined

Isochronous transfer (periodical) the maximum dimension of a packet is 1023 bytes if more isochronous devices are used in the same time the the packet dimension is divided accordingly the system allocates 90% of the bandwidth for isochronous and interrupt transfers every device will specify the required transfer rate, which may be between 1 and 216 , (one packet per several frames)

Interrupt transfers used for sporadic, small data transfers examples: mouse, keyboard, multiple channel devices maximum packet dimension: 64 bytes a channel has a guaranteed bandwidth assured through the allocation of a frame portion during configuration, a minimum appearance period is specified between 1-255 microseconds during configuration the system verifies if the required bandwidth necessary for a given frequency can be assured

Bulk transfer used for transferring blocks of data without time restrictions transfers are non-periodical examples: printer, digital camera the transfer will use the maximum available bandwidth the erroneous packets are re-transmitted maximum packet dimensions: 8,16, 32, or 64 pt. USB1.1 or 512 for USB 2.0 the bandwidth is not guaranteed the priority is minimum

Host Controller Driver Communication on USB Client software Data USBD interface USB Driver HCD interface Host Controller Driver Transfers Transaction list Transactions Transactions Transaction Hardware interface Host Controller Packets USB

Components involved in the communication Client software determines the type of the transfer for each device it does not handle communication channels for communication uses the drivers offered by the operating system USB driver (USBD) handles the configuration and normal transfer requests received from the client software establish and configure communication channels based on the received requests; some requests may be rejected because of bandwidth limitations

Components involved in the communication Host controller’s driver (HCD) receives transfer requests and handles their transmission puts the received data in the buffer checks the transmission limits (requests v.s bandwidth) announce the end of the transmission Transaction list contains the list of transactions in progress Host controller transforms the waiting transactions in activities on the bus handles the frames and send and receive packets

Parallel interface Transfer is made through a number of lines: Data lines (ex: 8) – for data transmission Control lines – for synchronization and dataflow control Features: High speed Small distances Usually unidirectional transfers Types of parallel transfers: a) without control signals b) asynchronous protocol without confirmation c) asynchronous protocol with confirmation (hand - shaking)

Transfer types a) Without control signals - only data lines are used - useful for reading status lines or generating command signals - cannot be used for sequential data transfer – there are no signals for synchronization or flow control - examples: testing digital sensors, control of actuators b) asynchronous protocol without confirmation - an extra control signal is used (besides data lines); it may be generated by the emitter or by the receiver - a sequence of data may be transmitted - the transmission speed is controlled by the device generating the control signal - there is no feedback signal (confirmation) from the other partner; the speed should be enough small to cover any possible delays; so the transmission is slow

Parallel transfer c) Asynchronous protocol with confirmation (hand - shaking) - two control signals are used: one from the emitter and one from the receiver - transmission with “feed-back” - it may be adapted to the variable speed of the emitter or receiver devices; the result is a higher speed - if the correlation between control signals is not good errors may occur Correct Error Error

Parallel transfer c) asynchronous protocol (hand - shaking), with inter-conditioning between control signals - solves the correct transmission of data - the control signals are inter-conditioned

Parallel transfer The I8255 circuit – controller for parallel transfers 3 data ports of 8 bits (A, B and C) Working modes: Inputs Outputs Bidirectional transfer Port C divided in 2 in order to serve as control signals for ports A and B A si B

Counter/Timer circuits Used for: counting external events generate different frequencies by dividing a base clock frequency delaying signals (mono-stable) generate periodic interrupts Specialized controller: I8253 3 counters of 16 bits different working modes Use in a PC: to generate interrupts in order to measure the time periodical memory refresh cycles to generate simple sounds

Design of an Input/Output interface Steps Define the functional block scheme select circuits for special interface functionalities (controllers) allocate addresses for registers from the I/O space establish the selection/decoding mode design circuits for selection and control. Functional blocks: selection/decoding block Input/Output registers (ports) Command device Command register Status register Adaptation circuit for the peripheral device

Design of an Input/Output interface Selection block: Role: Select the interface and the registers inside it Selection mode: Total – all the address lines are considered (rarely used) Partial – a limited number of address lines are used (most often used) Linear – every address line is considered a selection lie (used for small, dedicated systems)

Design of an Input/Output interface Register block: Data registers/ports – for data transmission: for Input for Output Control register(s) generate control signals to the peripheral device or determine the working mode of the interface Status register(s): show the state of the interface or of the device Data amplifier: assures the proper fan-out

Circuits specialized for different interfaces Parallel interface controller PIO – parallel I/O: I8255 Serial interface controller SIO – serial I/O, or USART – universal serial asynchronous receiver and transmitters: I8251 Counter/Timer controller: CTC – counter/timer controller: I8253 Floppy disk controller: I8272 DMA controller: I8237 Interrupt controller: I8259A