Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Chapter 10 Input/Output Organization.

Post on 16-Jan-2016

217 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Chapter 10Chapter 10Input/Output OrganizationInput/Output Organization

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Chapter OutlineChapter Outline

• Asynchronous data transfersAsynchronous data transfers

• Programmed I/OProgrammed I/O

• InterruptsInterrupts

• Direct Memory AccessDirect Memory Access

• I/O ProcessorsI/O Processors

• Serial CommunicationSerial Communication

• Serial Communication StandardsSerial Communication Standards

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Asynchronous Data TransfersAsynchronous Data Transfers

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Source-initiated Data TransferSource-initiated Data Transfer

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Destination-initiated Data Destination-initiated Data TransferTransfer

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Source-initiated Data Transfer Source-initiated Data Transfer with Handshakingwith Handshaking

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Destination-initiated Data Destination-initiated Data Transfer with HandshakingTransfer with Handshaking

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Programmed I/OProgrammed I/O

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

ExampleExample

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

ExampleExample

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

ExampleExample

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

ExampleExample

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

ExampleExample

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

New InstructionsNew Instructions

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

New Control SignalsNew Control Signals

• IO differentiates I/O and memory IO differentiates I/O and memory accessesaccesses– IO = 1 for I/O accessIO = 1 for I/O access– IO = 0 for memory accessIO = 0 for memory access

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

New States and RTL CodeNew States and RTL Code

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

CPU ModificationsCPU Modifications

• Modify register sectionModify register section

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

CPU ModificationsCPU Modifications

• Modify register sectionModify register section

• Modify ALUModify ALU

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

CPU ModificationsCPU Modifications

• Modify register sectionModify register section

• Modify ALUModify ALU

• Modify control unit (hard-wired)Modify control unit (hard-wired)

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

CPU ModificationsCPU Modifications

• Modify register sectionModify register section

• Modify ALUModify ALU

• Modify control unit (hard-wired)Modify control unit (hard-wired)

• Register and ALU sections unchangedRegister and ALU sections unchanged

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

CPU ModificationsCPU Modifications

• Modify register sectionModify register section

• Modify ALUModify ALU

• Modify control unit (hard-wired)Modify control unit (hard-wired)

• Register and ALU sections unchangedRegister and ALU sections unchanged

• One new micro-operation: DR One new micro-operation: DR Input Input PortPort

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Control Unit ChangesControl Unit Changes

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Control Unit Changes - INC Control Unit Changes - INC and CLR signalsand CLR signals

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Control Unit Changes - INC Control Unit Changes - INC and CLR signalsand CLR signals

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Control Unit Changes - Control Unit Changes - Memory Read SignalMemory Read Signal

• Memory Read = READ ^ Memory Read = READ ^ IOIO’’

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

InterruptsInterrupts

• PollingPolling

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

InterruptsInterrupts

• IRQ - Interrupt RequestIRQ - Interrupt Request

• IACK - Interrupt AcknowledgeIACK - Interrupt Acknowledge

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Types of InterruptsTypes of Interrupts

• ExternalExternal

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Types of InterruptsTypes of Interrupts

• ExternalExternal

• InternalInternal

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Types of InterruptsTypes of Interrupts

• ExternalExternal

• InternalInternal

• SoftwareSoftware

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Processing InterruptsProcessing Interrupts

• Do nothing (until the current instruction Do nothing (until the current instruction has been executed)has been executed)

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Processing InterruptsProcessing Interrupts

• Do nothing (until the current instruction Do nothing (until the current instruction has been executed)has been executed)

• Get handler address (vectored)Get handler address (vectored)

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Processing InterruptsProcessing Interrupts

• Do nothing (until the current instruction Do nothing (until the current instruction has been executed)has been executed)

• Get handler address (vectored)Get handler address (vectored)

• Invoke handler routineInvoke handler routine

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Vectored Interrupt HardwareVectored Interrupt Hardware

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Non-vectored Interrupt Non-vectored Interrupt HardwareHardware

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Multiple Non-vectored Multiple Non-vectored InterruptsInterrupts

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Daisy ChainingDaisy Chaining

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

IACKIACKinin and IACK and IACKoutout

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Parallel Priority InterruptsParallel Priority Interrupts

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

CPU ModificationsCPU Modifications

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

CPU ModificationsCPU Modifications

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Interrupt StatesInterrupt States

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Direct Memory AccessDirect Memory Access

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

DMA ControllerDMA Controller

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

DMA Transfer ModesDMA Transfer Modes

• Block/Burst ModeBlock/Burst Mode

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

DMA Transfer ModesDMA Transfer Modes

• Block/Burst ModeBlock/Burst Mode

• Cycle Stealing ModeCycle Stealing Mode

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

DMA Transfer ModesDMA Transfer Modes

• Block/Burst ModeBlock/Burst Mode

• Cycle Stealing ModeCycle Stealing Mode

• Transparent ModeTransparent Mode

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

CPU Modifications - Micro-CPU Modifications - Micro-operationsoperations

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

CPU Modifications - Micro-CPU Modifications - Micro-operationsoperations

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

CPU ModificationsCPU Modifications

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

CPU ModificationsCPU Modifications

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

I/O ProcessorsI/O Processors

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

I/O Processors - operationsI/O Processors - operations

• Block transfer commandsBlock transfer commands

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

I/O Processors - operationsI/O Processors - operations

• Block transfer commandsBlock transfer commands

• ALU operationsALU operations

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

I/O Processors - operationsI/O Processors - operations

• Block transfer commandsBlock transfer commands

• ALU operationsALU operations

• Control commandsControl commands

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Asynchronous Serial Asynchronous Serial CommunicationCommunication

• bps - Bits Per Second (baud rate)bps - Bits Per Second (baud rate)

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Asynchronous Serial Asynchronous Serial CommunicationCommunication

• bps - Bits Per Second (baud rate)bps - Bits Per Second (baud rate)

• start bitstart bit

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Asynchronous Serial Asynchronous Serial CommunicationCommunication

• bps - Bits Per Second (baud rate)bps - Bits Per Second (baud rate)

• start bitstart bit

• parity bitparity bit

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Asynchronous Serial Asynchronous Serial CommunicationCommunication

• bps - Bits Per Second (baud rate)bps - Bits Per Second (baud rate)

• start bitstart bit

• parity bitparity bit

• stop bit(s)stop bit(s)

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Asynchronous Serial Asynchronous Serial CommunicationCommunication

• bps - Bits Per Second (baud rate)bps - Bits Per Second (baud rate)

• start bitstart bit

• parity bitparity bit

• stop bit(s)stop bit(s)

• bit timebit time

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Asynchronous Serial Asynchronous Serial CommunicationCommunication

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Synchronous Serial Synchronous Serial Communication - HDLCCommunication - HDLC

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Universal Asynchronous Universal Asynchronous Receiver/TransmittersReceiver/Transmitters

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

UART Internal ConfigurationUART Internal Configuration

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

• Request To SendRequest To Send• Clear To SendClear To Send• Transmission DataTransmission Data• Data Terminal ReadyData Terminal Ready• Data Set ReadyData Set Ready• Received DataReceived Data• Data Carrier DetectData Carrier Detect• Ring IndicatorRing Indicator• GroundGround

RS 232C Standard - SignalsRS 232C Standard - Signals

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

RS 232C Standard - RS 232C Standard - ConnectionConnection

• Use RTS, CTS, DTR, and DSR to verify Use RTS, CTS, DTR, and DSR to verify that both devices are activethat both devices are active

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

RS 232C Standard - RS 232C Standard - ConnectionConnection

• Use RTS, CTS, DTR, and DSR to verify Use RTS, CTS, DTR, and DSR to verify that both devices are activethat both devices are active

• Use RI to indicate call statusUse RI to indicate call status

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

RS 232C Standard - RS 232C Standard - ConnectionConnection

• Use RTS, CTS, DTR, and DSR to verify Use RTS, CTS, DTR, and DSR to verify that both devices are activethat both devices are active

• Use RI to indicate call statusUse RI to indicate call status

• Use DCD to establish connectivityUse DCD to establish connectivity

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

RS 232C Standard - RS 232C Standard - ConnectionConnection

• Use RTS, CTS, DTR, and DSR to verify Use RTS, CTS, DTR, and DSR to verify that both devices are activethat both devices are active

• Use RI to indicate call statusUse RI to indicate call status

• Use DCD to establish connectivityUse DCD to establish connectivity

• Use TD and RD to transfer data, and Use TD and RD to transfer data, and RTS and CTS to coordinate transfersRTS and CTS to coordinate transfers

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

RS 422 Standard - SignalsRS 422 Standard - Signals

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Universal Serial Bus StandardUniversal Serial Bus Standard

• Connects one port to several devicesConnects one port to several devices

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

Universal Serial Bus StandardUniversal Serial Bus Standard

• Connects one port to several devicesConnects one port to several devices

• Transfers data in packetsTransfers data in packets– Token packetsToken packets– Data packetsData packets– Handshake packetsHandshake packets– Special PacketsSpecial Packets

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

USB Packet FormatsUSB Packet Formats

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001

SummarySummary

• Asynchronous data transfersAsynchronous data transfers

• Programmed I/OProgrammed I/O

• InterruptsInterrupts

• Direct Memory AccessDirect Memory Access

• I/O ProcessorsI/O Processors

• Serial CommunicationSerial Communication

• Serial Communication StandardsSerial Communication Standards

top related