lecture_10a - ECE 190 Lecture 10 September 22, 2011 1 V....

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ECE 190 Lecture 10 September 22, 2011 1 V. Kindratenko I/O interface, TRAPs, and Subroutines Lecture Topics I/O system concept Memory-mapped I/O TRAPS Subroutines Lecture materials Textbook Ch. 8-9 Homework/Projects Announcements Midterm Exam 1 next Monday ECE 190 Lecture 10 September 22, 2011 2 V. Kindratenko I/O system concept So far we learned how to get/put data into memory/registers o But where does data in memory come from? o And how does data get out of the system so that humans can use it? Input/output (I/O) system provides this mechanism o Input device can be keyboard, mouse, microphone, o Output device can be display, printer, o Regardless of the I/O device types, their operating principles have enough similarities. o We will look at keyboard and display as two standard I/O devices I/O Controller is the device that stands between the computer and the I/O device itself o Output controller example o Control/Status Registers CPU tells device what to do -- write to control register CPU checks whether task is done -- read status register o Data Registers CPU transfers data to/from device o Device electronics performs actual operation (pixels to screen, characters from keyboard, etc.) LC-3 input device o KeyBoard Data Register (KBDR) is used to store ASCII value entered from the keyboard o KeyBoard Status Register (KBSR) is used to let the processor know that a new value was entered on the keyboard Graphics Controller Control/Status Output Data Electronics CPU display Input device Output device LC-3 computing system keyboard LC-3 computer ASCII KBDR KBSR ECE 190 Lecture 10 September 22, 2011 3 V. Kindratenko LC-3 output device o Display Data Register (DDR) is used to store ASCII value to be displayed on the monitor o Display Status Register (DSR) is used to let the display know that a new value is ready to be displayed Memory-mapped I/O in LC-3 How are device registers identified and accessed? o One way is to use separate, dedicated instructions to work with these registers designate opcode(s) for I/O register and operation encoded in instruction o Another way is to use existing instructions in the LC-3 ISA In order to do this, however, device resisters must appear as one of already defined resources so that existing ISA instructions can work with them It would be convenient to use LD/ST family of instructions to work with these device registers Thus, we need a way to present device resisters as memory addresses In LC-3, four device registers are mapped into four distinct memory locations o This does not mean that the registers are physically located in memory o This only means that the registers are uniquely identified in the same way as memory locations when using dedicated memory addresses display LC-3 computer ASCII DDR DSR ECE 190 Lecture 10 September 22, 2011 4 V. Kindratenko Thus, we can use LD/ST family of instructions to work with them Input from the keyboard...
View Full Document

Page1 / 13

lecture_10a - ECE 190 Lecture 10 September 22, 2011 1 V....

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online