DOC PREVIEW
SJSU CS 147 - ch10_io_org

This preview shows page 1-2-14-15-30-31 out of 31 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Chapter 10OverviewExamples of I/O DevicesPowerPoint PresentationSynchronous data transfersAsynchronous data transfersSlide 7Slide 8Destination-initiated data transfer without handshakingSlide 10Slide 11The timing for a source-initiated data transfer with handshakingSlide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24NEW INSTRUCTIONNew control signalsSlide 27The modification the state diagram for the CPUModify the CPU hardware for the new instructionSummarySlide 31ChapterChapter 1010Input / Output OrganizationCS 147Yueyang ZhouOverview•Some examples of I/O Devices•Synchronous data transfers•Asynchronous data transfers•Source-initiated data transfer without handshaking•Destination-initiated data transfer without handshaking•Source-initiated data transfer with handshaking•Destination-initiated data transfer with handshaking•Programmed I/O•A thermostat•The control algorithm of ThermostatExamples of I/O Devices•A personal computer •Keyboard (input)•Mouse (input)•Monitor (output)•Printer (output)•Microwave ovens•Sensor (input)•Output signalsDevicesInterfaceControlerDataI/OCPUAddress busData busControl busSynchronous data transfers Synchronous transfers usually occur when peripherals are located within the same computer as the CPU because their close proximity allows them to share a common clock and because data does not have to travel very far physically, which becomes a concern at a higher clock frequencies.Asynchronous data transfers•A computer can make use of asynchronous data transfers when synchronous transfers are not viable.•Asynchronous transfers use control signals and their associated hardware to coordinate the movement of data. These data transfer do not require that the source and destination use the same system clock.•There are four types of asynchronous data transfers.•The source outputs its data.•Then strobes a control signal for a set amount of time.•The destination device reads in the data during this time.•The source device next desserts the strobe and stops outputting data.Destination-initiated data transfer without handshaking•The destination device transmits a data strobe signal to the source device which, after a brief delay, makes data available.•The destination device reads in this data •The destination device deasserts the data strobe.•For some devices, particularly electromechanical devices, do not require the same amount of time for every transfer, they can use handshaking to coordinate their transfers.•Handshaking uses an additional control signal to indicate that data is ready or has been read in.The timing for a source-initiated data transfer with handshaking•The source sets the data request signal high.•Makes valid data available to the destination device •The destination device reads in data. •The destination device sends a data acknowledge signal to the source.•The source sets its data request line low and stops sending data.•The destination then resets its data acknowledge signal.•Similar to that of the source-initiated data transfer using handshaking, except that the data-acknowledge signal is replaced by a data-ready signal.•Definition: Programmed I/O is exactly what its name implies: A program instruction causes the CPU to input or output data.•Programmed I/O can be either isolated or memory mapped.•Isolated I/O uses separate instructions to access I/O ports.•Memory-mapped I/O treats I/O ports as memory locations.It perform the following sequence of operation:1. Read temperature from external sensor.2. If (temperature > thermostat setting +2) then turn on air conditioner.3. If (temperature < thermostat setting and air conditioner is on) then turn off air conditioner.4. If (temperature < thermostat setting –2) then turn on heat.5. If (temperature > thermostat setting and heat is on) then turn off heat.6. Go to start of sequence.1. Illustration •An input port at address FFFFH•Whenever the illustration LDAC FFFF is executed, the CPU reads data from this port and stores it in its accumulator register.2. Implementation•Design the hardware for the input port •Makes data available to the CPU•The CPU would read the data from the data bus1. The tri-state buffers are only enable when:•The address bus contains the value FFFFH •Control bus signal READ= 12. Data from the input port passes on to the data bus of the computer .3. Data is read in by the CPU.4. Data stored in data register.5. CPU moves data from its data register into its accumulator.1. The software programmer is responsible for:•The CPU never attempts to access memory location FFFFH•The input port has been assigned to this address•It cannot be used by a memory location2. This is one of the limitation of memory-mapped I/O.1. The CPU reads in the current temperature from the memory-mapped input port at address FFFH 2. The thermostat setting from the port at address FFFE3. The CPU controls the heating and air conditioning system.4. Writing one of the four values to the output port at address FFFD•01 = turn on air conditioning •02 = turn off air conditioning•03 = turn on heat •04 = turn off heat5. The current status is stord in memory location 1000H•00 = heat and air conditioning are both off•FF = heat is on•FE = air conditioning is onNEW INSTRUCTIONInstruction Instruction CodeOperationINPT 0010 0000 T AC Input port TOTPT 0010 0001 T Output port T ACNew control signals1. When using isolated I/O•Need a signal to distinguish between memory references and I/O references2. Without this signal, it is not possible to tell whether an address refers to a memory location or to an I/O port3. We create a new signal called IO•IO = 1 for input/ output operations•IO = 0 for memory reference operations1. Difference between INPT instruction and the LDAC instruction.•In state LDAC4, the LDAC instruction reads data from memory.•During the corresponding state of the INPT instruction’s execute routine, it must read data from an input port.The modification the state diagram for the CPUModify the CPU hardware for the new instructionSummarySummary•Synchronous data transfers•Asynchronous data transfers•Source-initiated data transfer without handshaking•Destination-initiated data transfer without handshaking•Source-initiated data transfer with handshaking•Destination-initiated data transfer with handshaking•Programmed I/O•A


View Full Document

SJSU CS 147 - ch10_io_org

Documents in this Course
Cache

Cache

24 pages

Memory

Memory

54 pages

Memory

Memory

70 pages

Lecture 1

Lecture 1

53 pages

Cisc

Cisc

18 pages

Quiz 1

Quiz 1

4 pages

LECTURE 2

LECTURE 2

66 pages

RISC

RISC

40 pages

LECTURE 2

LECTURE 2

66 pages

Lecture 2

Lecture 2

67 pages

Lecture1

Lecture1

53 pages

Chapter 5

Chapter 5

14 pages

Memory

Memory

27 pages

Counters

Counters

62 pages

Load more
Download ch10_io_org
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view ch10_io_org and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view ch10_io_org 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?