Upload
tapasbayen9388
View
216
Download
0
Embed Size (px)
Citation preview
8/23/2019 Memory Mapped IO Very Good
1/12
Computer Principles
AdvancedCompiler ResearchLaboratory
School of Computer Science & EngineeringSeoul National University
Memory Mapped I/O
8/23/2019 Memory Mapped IO Very Good
2/12
AdvancedCompiler ResearchLaboratory
School of Computer Science & EngineeringSeoul National University
Computer Principles
Memory Mapped I/O
2
To make all I/O devices look exactly the same to the
computer
Each I/O device is allocated an exclusive area in memory
Memory map
Data Memory
Screan
RAM
ScreenMemory Map
KeyboardMemory Map Keyboard
8/23/2019 Memory Mapped IO Very Good
3/12
AdvancedCompiler ResearchLaboratory
School of Computer Science & EngineeringSeoul National University
Computer Principles
Memory Mapped I/O (contd.)
3
Input device
Keyboard, mouse, etc.
The memory map continuously reflect the physical state ofthe device
Pressing a key on the keyboard makes a certain value
(code of the key) is written in the keyboards memorymap
Output device
Screen, speaker, etc.
The memory map continuously drive the physical state ofthe device
Whenever a bit is changed in the screens memory map, arespective pixel is drawn on the physical screen
8/23/2019 Memory Mapped IO Very Good
4/12
AdvancedCompiler ResearchLaboratory
School of Computer Science & EngineeringSeoul National University
Computer Principles
Memory Mapped I/O (contd.)
4
Hardware
Each I/O device need to provide an interface similar to
that of memory unitSoftware
Each I/O device is required to define an interactioncontract (protocol)
Standards play a key role in designing a computer system
8/23/2019 Memory Mapped IO Very Good
5/12
AdvancedCompiler ResearchLaboratory
School of Computer Science & EngineeringSeoul National University
Computer Principles
American Standard Codefor Information Exchange (ASCII)
A character encoding based on the English alphabet
Developed from telegraphic codes
Its first commercial use was as a seven-bit teleprinter codepromoted by Bell data services
The common code for personal computers and workstations7-bit 128 numbers ranging from zero through 127 assigned toletters, numbers, punctuation marks, and the most commonspecial characters
The Extended ASCII Character Set128 numbers and ranges from 128 through 255 (using thefull 8-bits of the byte) representing additional special,mathematical, graphic, and foreign character
5
http://en.wikipedia.org/wiki/Bithttp://en.wikipedia.org/wiki/Telegraphhttp://en.wikipedia.org/wiki/Bithttp://en.wikipedia.org/wiki/Bithttp://en.wikipedia.org/wiki/Telegraphhttp://en.wikipedia.org/wiki/Telegraphhttp://en.wikipedia.org/wiki/English_alphabethttp://en.wikipedia.org/wiki/English_alphabet8/23/2019 Memory Mapped IO Very Good
6/12
AdvancedCompiler ResearchLaboratory
School of Computer Science & EngineeringSeoul National University
Computer Principles
American Standard Codefor Information Exchange (contd.)
6
8/23/2019 Memory Mapped IO Very Good
7/12
AdvancedCompiler ResearchLaboratory
School of Computer Science & EngineeringSeoul National University
Computer Principles
American Standard Codefor Information Exchange (contd.)
7
8/23/2019 Memory Mapped IO Very Good
8/12
AdvancedCompiler ResearchLaboratory
School of Computer Science & EngineeringSeoul National University
Computer Principles
Unicode
8
Fundamentally, computers just deal with numbers. They store lettersand other characters by assigning a number for each one. BeforeUnicode was invented, there were hundreds of different encodingsystems for assigning these numbers. No single encoding couldcontain enough characters: for example, the European Union alone
requires several different encodings to cover all its languages. Even fora single language like English no single encoding was adequate for allthe letters, punctuation, and technical symbols in common use.
These encoding systems also conflict with one another. That is, twoencodings can use the same number for two different characters, or
use different numbers for the same character. Any given computer(especially servers) needs to support many different encodings; yetwhenever data is passed between different encodings or platforms,that data always runs the risk of corruption. (from www.unicode.org)
8/23/2019 Memory Mapped IO Very Good
9/12
AdvancedCompiler ResearchLaboratory
School of Computer Science & EngineeringSeoul National University
Computer Principles
Unicode (contd.)
Developed in cooperation between the UnicodeConsortium and the International Organization forStandardization (ISO)
16-bit character set, allowing up to 65,536 characters
An attempt to consolidate the alphabets and ideographs ofthe world's languages into a single, international characterset
Focuses on the characters themselves rather than onlanguages
The same Unicode character
A letter shared between English and Russian
An ideograph shared between kanji and Han script
9
http://kb.iu.edu/data/aepo.htmlhttp://kb.iu.edu/data/aeoo.htmlhttp://kb.iu.edu/data/aeoo.htmlhttp://kb.iu.edu/data/aepo.htmlhttp://kb.iu.edu/data/aepo.htmlhttp://kb.iu.edu/data/aepo.htmlhttp://kb.iu.edu/data/aepo.htmlhttp://kb.iu.edu/data/aeoo.htmlhttp://kb.iu.edu/data/aeoo.htmlhttp://kb.iu.edu/data/aeoo.htmlhttp://kb.iu.edu/data/aeoo.html8/23/2019 Memory Mapped IO Very Good
10/12
AdvancedCompiler ResearchLaboratory
School of Computer Science & EngineeringSeoul National University
Computer Principles
Unicode (contd.)
Required by modern standards such as XML, Java,JavaScript, LDAP, CORBA 3.0, WML, etc.
Supported in many operating systems and all modernbrowsers
Makes it possible for developers to create applicationswithout having to resort to the costly, time-consuming task
of releasing localized versions for each language
10
8/23/2019 Memory Mapped IO Very Good
11/12
AdvancedCompiler ResearchLaboratory
School of Computer Science & EngineeringSeoul National University
Computer Principles
Abstraction in Computer Science
Interested in what the entity does ignoring how it doesit
Every hardware and software developer is definingabstractions (a.k.a. interfaces) and then implementingthem
Abstractions are often built layer upon layer
11
8/23/2019 Memory Mapped IO Very Good
12/12
AdvancedCompiler ResearchLaboratory
School of Computer Science & EngineeringSeoul National University
Computer Principles
Where Are We?
12
Chips and Physical Gates Electrical Engineering
Transistors Physics
abstract interface
Computer Science and Engineering
Computer Hardware Platform
abstract interface (Boolean Logic)
Machine Language
abstract interface (ISA)
Assembly Language
abstract interface (Assembler)