Chapter 8 Input/Output
|
|
- Tabitha Caitlin Dixon
- 5 years ago
- Views:
Transcription
1 Lecture on Introduction to Computing Systems Chapter 8 Input/Output An Hong han@ustc.edu.cn 0 Fall School of Computer Science and Technology 0/11/3 1
2 Review So far, we ve learned how to: compute with values in registers load data from memory to registers store data from registers to memory MEMORY MAR MDR INPUT Keyboard Mouse Scanner Disk PROCESSING UNIT ALU TEMP OUTPUT Monitor Printer LED Disk CONTROL UNIT PC IR 0/11/3
3 Review: LC-3 Data Path GateMAR MAR GatePC LD.PC PC PC +1 DR LD.REG 3 REG FILE LD.IR IR [7:0] Control Unit ADDR [10:0] [8:0] [5:0] [4:0] + N Z P LOGIC LD.CC ADDR1 FINITE STATE MACHINE SR SR1 Processing SR SR1 3 OUT OUT 3 ALUK Unit SR A ALU B RUN GateALU GateMDR LD.MDR Memory MDR Unit MEMORY MAR MEM.EN,R,W LD.MAR INPUT OUTPUT 3
4 Need for I/O But where does data in memory come from? And how does data get out of the system so that humans can use it? Computer systems are useless unless they can process information from outside of the computer and output results outside of the computer I/O is effectively the communication with outside of the computer I/O device itself communicates with outside world E.g., keyboard takes input from user Computer needs to communicate with I/O device E.g., computer takes input from keyboard Communication through shared memory locations Processor and I/O can read/write those memory locations Sometimes, data in memory locations can be set/cleared automatically (by hardware) depending on a read/write 0/11/3 4
5 I/O: Connecting to the Outside World Examples Keyboard/mouse input, video output on a standard computer Network input/output that enables web surfing Information from an engine of a car that a computer uses to determine how to tune the engine (output from computer tunes the engine) Requests for airline reservations and replies that service those requests Types of I/O devices characterized by: behavior: input, output, storage - input: keyboard, motion detector, network interface - output: display screen(monitor), printer, network interface - storage: disk, CD-ROM data rate: how fast can data be transferred? - keyboard: 100 bytes/sec - disk: 30 MB/s - network: 1 Mb/s - 1 Gb/s 0/11/3 5
6 I/O Controller Control/Status Registers CPU tells device what to do -- write to control register CPU checks whether task is done -- read status register Data Registers CPU transfers data to/from device Control/Status Graphics Controller CPU Output Data Electronics display Device electronics performs actual operation - pixels to screen, bits to/from disk, characters from keyboard 0/11/3 6
7 Programming Interface How are device registers identified? Memory-mapped vs. special instructions How is timing of transfer managed? Asynchronous vs. synchronous Who controls transfer? CPU (polling) vs. device (interrupts) 0/11/3 7
8 Memory-Mapped vs. I/O Instructions Instructions designate opcode(s) for I/O register and operation encoded in instruction Memory-mapped assign a memory address to each device register use data movement instructions (LD/ST) for control and data transfer 0x FE00 0/11/3 8
9 Transfer Timing I/O events generally happen much slower than CPU cycles. If : CPU 300MHz, 10clocks/character,6characters/word Then: typing speed (1/(300x10 6 ))x10x6=5x10 6 words/s Synchronous data supplied at a fixed, predictable rate CPU reads/writes every X cycles Asynchronous data rate less predictable CPU must synchronize with device, so that it doesn t miss data or write too quickly 0/11/3 9
10 Transfer Control Who determines when the next data transfer occurs? CPU vs. I/O device Polling is explicitly looking/examining CPU keeps checking status register until new data arrives OR device ready for next data Are you there yet? Are you there yet? Are you there yet? Interrupts is a nudge, knock on the door, loud noise, which forces you to pay attention Device sends a special signal to CPU when new data arrives OR device ready for next data CPU can be performing other tasks instead of polling device. Wake me when you get there. 0/11/3 10
11 LC-3 Memory-mapped I/O (Table A.1) Location I/O Register Function xfe00 xfe0 xfe04 xfe06 Keyboard Status Reg (KBSR) Keyboard Data Reg (KBDR) Display Status Register (DSR) Display Data Register (DDR) Bit [15] is one when keyboard has received a new character. Bits [7:0] contain the last character typed on keyboard. Bit [15] is one when device ready to display another char on screen. Character written to bits [7:0] will be displayed on screen. Asynchronous devices synchronized through status registers Polling and Interrupts the details of interrupts will be discussed in Chapter 10 0/11/3 11
12 Memory map of the LC-3 0x0000 0x00FF 0x0100 0x01FF 0x000 0xFFF 0x3000 Trap Vector Table Interrupt Vector Table Operating System and Supervisor Stack Program Text PC Global data section Heap (for dynamically allocated memory) R4(Global pointer) Function1 Function R6 R5 R6 R5 0xFDFF 0xFE00 0xFFFF Run-time stack Device Register Addresses R6 (stack pointer) R5 (frame pointer) Function3 0/11/3 1 R6 R5
13 Example: Processor Input from Keyboard When a character is typed: its ASCII code is placed in bits [7:0] of KBDR (bits [15:8] are always zero) the ready bit (KBSR[15]) is set to one keyboard is disabled -- any typed characters will be ignored ready bit KBDR KBSR keyboard data When KBDR is read: KBSR[15] is set to zero, meaning no keyboard key is pending keyboard is enabled 0/11/3 13
14 Memory-mapped Operations How do we read ready bit? How do we test whether the bit is one? How do we read keyboard data? 0/11/3 14
15 Basic Input Routine Polling NO new char? YES read character POLL KBSR KBDR LDI R0, KBSR BRzp POLL LDI R0, KBDR....FILL xfe00.fill xfe0 0/11/3 15
16 IN Memory-mapped I/O GateMDR MAR LD.MAR MDR LD.MDR MEM.R,W INPUT OUTPUT MEMORY ADDR.CTL LOGIC KBDR KBSR LD.DDR DDR DSR MEM.EN, READ/WRITE 0/11/3
17 LDI (Indirect) F D EA OP EX S GateMAR MAR GatePC LD.PC PC PC +1 DR LD.REG 3 REG FILE [7:0] + SR 3 SR SR1 OUT OUT 3 SR1 ADDR ADDR1 LD.IR [10:0] [8:0] [5:0] [4:0] IR LD.CC N Z P LOGIC FINITE STATE MACHINE SR ALUK A ALU B RUN GateALU GateMDR LD.MDR MDR MAR LD.MAR MEMORY INPUT OUTPUT MEM.EN,R,W 17
18 LDI (Indirect) F D EA OP EX S GateMAR MAR GatePC LD.PC PC PC +1 DR LD.REG 3 REG FILE [7:0] + SR 3 SR SR1 OUT OUT 3 SR1 ADDR ADDR1 LD.IR [10:0] [8:0] [5:0] [4:0] IR LD.CC N Z P LOGIC FINITE STATE MACHINE SR ALUK A ALU B RUN GateALU GateMDR LD.MDR MDR MAR LD.MAR MEMORY INPUT OUTPUT MEM.EN,R,W 18
19 RUN LD.CC MEM.EN,R,W MAR LD.MAR PC GatePC 19 ALU A B SR INPUT OUTPUT MEMORY FINITE STATE MACHINE N Z P LOGIC + DR LD.REG SR SR1 ALUK REG FILE SR1 OUT SR OUT GateALU ADDR PC +1 MAR [10:0] [8:0] [5:0] [4:0] [7:0] GateMAR LD.PC ADDR LD.IR IR MDR LD.MDR GateMDR LDI (Indirect) EA OP EX S F D
20 LDI (Indirect) F D EA OP EX S GateMAR MAR GatePC LD.PC PC PC +1 DR LD.REG 3 REG FILE [7:0] + SR 3 SR SR1 OUT OUT 3 SR1 ADDR ADDR1 LD.IR [10:0] [8:0] [5:0] [4:0] IR LD.CC N Z P LOGIC FINITE STATE MACHINE SR ALUK A ALU B RUN GateALU GateMDR LD.MDR MDR MAR LD.MAR MEMORY INPUT OUTPUT MEM.EN,R,W 0
21 LDI (Indirect) F D EA OP EX S GateMAR MAR GatePC LD.PC PC PC +1 DR LD.REG 3 REG FILE [7:0] + SR 3 SR SR1 OUT OUT 3 SR1 ADDR ADDR1 LD.IR [10:0] [8:0] [5:0] [4:0] IR LD.CC N Z P LOGIC FINITE STATE MACHINE SR ALUK A ALU B RUN GateALU GateMDR LD.MDR MDR MAR LD.MAR MEMORY INPUT OUTPUT MEM.EN,R,W 1
22 LDI (Indirect) F D EA OP EX S GateMAR MAR GatePC LD.PC PC PC +1 DR LD.REG 3 REG FILE [7:0] + SR 3 SR SR1 OUT OUT 3 SR1 ADDR ADDR1 LD.IR [10:0] [8:0] [5:0] [4:0] IR LD.CC N Z P LOGIC FINITE STATE MACHINE SR ALUK A ALU B RUN GateALU GateMDR LD.MDR MDR MAR LD.MAR MEMORY INPUT OUTPUT MEM.EN,R,W
23 IN Memory-mapped I/O: LDI R0, KBSR GateMDR MAR LD.MAR MDR LD.MDR MEM.R,W INPUT OUTPUT MEMORY ADDR.CTL LOGIC KBDR KBSR LD.DDR DDR DSR MEM.EN, READ/WRITE 0/11/3 3
24 IN Memory-mapped I/O: LDI R0, KBDR GateMDR MAR LD.MAR MDR LD.MDR MEM.R,W INPUT OUTPUT MEMORY ADDR.CTL LOGIC KBDR KBSR LD.DDR DDR DSR MEM.EN, READ/WRITE 0/11/3 4
25 LD.IR MEM.EN,R,W MAR LD.MAR MEMORY 3 SR1 SR 3 SR [10:0] [8:0] [5:0] [4:0] INPUT PC GatePC 5 OUTPUT + ADDR1 PC +1 MAR [7:0] GateMAR LD.PC ADDR LD.MDR ALU A B ALUK GateALU DR LD.REG REG FILE SR1 OUT SR OUT 3 FINITE STATE MACHINE N Z P RUN LOGIC LD.CC IR MDR GateMDR LDI (Indirect) EA OP S D F EX
26 Example: Processor Output to Screen When Display device is ready to display another character: the ready bit (DSR[15]) is set to one, indicating that processor can write a character for display ready bit DDR DSR output data When data is written to the Display data register: DSR[15] automatically set to 0 character in DDR[7:0] is displayed any other character data written to DDR is ignored (while DSR[15] is zero) 0/11/3 6
27 Basic Output Routine Polling NO screen ready? YES write character POLL DSR DDR LDI R1, DSR BRzp POLL STI R0, DDR....FILL xfe04.fill xfe06 0/11/3 7
28 STI (Indirect) F D EA OP EX S GateMAR MAR GatePC LD.PC PC PC +1 DR LD.REG 3 REG FILE [7:0] + SR 3 SR SR1 OUT OUT 3 SR1 ADDR ADDR1 LD.IR [10:0] [8:0] [5:0] [4:0] IR LD.CC N Z P LOGIC FINITE STATE MACHINE SR ALUK A ALU B RUN GateALU GateMDR LD.MDR MDR MAR LD.MAR MEMORY INPUT OUTPUT MEM.EN,R,W 8
29 STI (Indirect) F D EA OP EX S GateMAR MAR GatePC LD.PC PC PC +1 DR LD.REG 3 REG FILE [7:0] + SR 3 SR SR1 OUT OUT 3 SR1 ADDR ADDR1 LD.IR [10:0] [8:0] [5:0] [4:0] IR LD.CC N Z P LOGIC FINITE STATE MACHINE SR ALUK A ALU B RUN GateALU GateMDR LD.MDR MDR MAR LD.MAR MEMORY INPUT OUTPUT MEM.EN,R,W 9
30 RUN LD.CC MEM.EN,R,W MAR LD.MAR PC GatePC 30 ALU A B SR INPUT OUTPUT MEMORY FINITE STATE MACHINE N Z P LOGIC + DR LD.REG SR SR1 ALUK REG FILE SR1 OUT SR OUT GateALU ADDR PC +1 MAR [10:0] [8:0] [5:0] [4:0] [7:0] GateMAR LD.PC ADDR LD.IR IR MDR LD.MDR GateMDR STI (Indirect) EA OP EX S F D
31 STI (Indirect) F D EA OP EX S GateMAR MAR GatePC LD.PC PC PC +1 DR LD.REG 3 REG FILE [7:0] + SR 3 SR SR1 OUT OUT 3 SR1 ADDR ADDR1 LD.IR [10:0] [8:0] [5:0] [4:0] IR LD.CC N Z P LOGIC FINITE STATE MACHINE SR ALUK A ALU B RUN GateALU GateMDR LD.MDR MDR MAR LD.MAR MEMORY INPUT OUTPUT MEM.EN,R,W 31
32 STI (Indirect) F D EA OP EX S GateMAR MAR GatePC LD.PC PC PC +1 DR LD.REG 3 REG FILE [7:0] + SR 3 SR SR1 OUT OUT 3 SR1 ADDR ADDR1 LD.IR [10:0] [8:0] [5:0] [4:0] IR LD.CC N Z P LOGIC FINITE STATE MACHINE SR ALUK A ALU B RUN GateALU GateMDR LD.MDR MDR MAR LD.MAR MEMORY INPUT OUTPUT MEM.EN,R,W 3
33 STI (Indirect) F D EA OP EX S GateMAR MAR GatePC LD.PC PC PC +1 DR LD.REG 3 REG FILE [7:0] + SR 3 SR SR1 OUT OUT 3 SR1 ADDR ADDR1 LD.IR [10:0] [8:0] [5:0] [4:0] IR LD.CC N Z P LOGIC FINITE STATE MACHINE SR ALUK A ALU B RUN GateALU GateMDR LD.MDR MDR MAR LD.MAR MEMORY INPUT OUTPUT MEM.EN,R,W 33
34 STI (Indirect) F D EA OP EX OP GateMAR MAR GatePC LD.PC PC PC +1 LD.REG DR 3 REG FILE [7:0] + SR 3 SR SR1 OUT OUT 3 SR1 ADDR ADDR1 LD.IR [10:0] [8:0] [5:0] [4:0] IR LD.CC N Z P LOGIC FINITE STATE MACHINE SR ALUK A ALU B RUN GateALU GateMDR LD.MDR MDR MAR LD.MAR MEMORY INPUT OUTPUT MEM.EN,R,W 34
35 IN Memory-mapped I/O: STI R0, DDR? GateMDR MAR LD.MAR MDR LD.MDR MEM.R,W INPUT OUTPUT MEMORY ADDR.CTL LOGIC KBDR KBSR LD.DDR DDR DSR MEM.EN, READ/WRITE 0/11/3 35
36 Keyboard Echo Routine Usually, input character is also printed to screen. User gets feedback on character typed and knows its ok to type the next character. POLL1 POLL LDI R0, KBSR BRzp POLL1 LDI R0, KBDR LDI R1, DSR BRzp POLL STI R0, DDR NO new char? YES read character KBSR KBDR DSR DDR....FILL xfe00.fill xfe0.fill xfe04.fill xfe06 NO screen ready? YES write character 0/11/3 36
37 Interrupt-Driven I/O To implement an interrupt mechanism, we need: A way for the I/O device to signal the CPU that an interesting event has occurred. A way for the CPU to test whether the interrupt signal is set. Generating Signal Software sets "interrupt enable(ie)" bit in device register. When ready bit is set and IE bit is set, interrupt is signaled. interrupt enable bit ready bit KBSR interrupt signal to processor 0/11/3 37
38 Interrupt-Driven I/O Testing for Interrupt Signal CPU looks at signal between STORE and FETCH phases If not set, continues with next instruction If set, transfers control to Interrupt Service Routine(ISR) F NO D Transfer to ISR YES interrupt signal? EA OP EX More details in Chapter 10. S 0/11/3 38
39 Review Questions What is the danger of not testing the DSR before writing data to the Display screen? What is the danger of not testing the KBSR before reading data from the keyboard? What if the Display were a synchronous device, e.g., we know that it will be ready 1 microsecond after character is written. Can we avoid polling? How? What are advantages and disadvantages? 0/11/3 39
40 Review Questions Do you think polling is a good approach for other devices, such as a disk or a network interface? What is advantage of using LDI/STI for accessing device registers? 0/11/3 40
I/O. University of Texas at Austin CS310H - Computer Organization Spring 2010 Don Fussell
I/O University of Texas at Austin CS310H - Computer Organization Spring 2010 Don Fussell I/O: Connecting to Outside World So far, we ve learned how to: compute with values in registers load data from memory
More informationCopyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Computing Layers
Chapter 8 I/O Original slides from Gregory Byrd, North Carolina State University Modified slides by C. Wilcox, S. Rajopadhye Colorado State University Computing Layers Problems Algorithms Language Instruction
More informationChapter 8 I/O. Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. But where does data in memory come from?
Chapter 8 I/O I/O: Connecting to Outside World So far, we ve learned how to: compute with values in registers load data from memory to registers store data from registers to memory But where does data
More informationLC-3 Input and Output
LC-3 Input and Output I/O: Connecting to Outside World So far, we ve learned how to: compute with values in registers load data from memory to registers store data from registers to memory use the TRAP
More informationLC-3 Input and Output
LC-3 Input and Output I/O: Connecting to Outside World So far, we ve learned how to: compute with values in registers load data from memory to registers store data from registers to memory use the TRAP
More informationChapter 8 I/O. Computing Layers. I/O: Connecting to Outside World. I/O: Connecting to the Outside World
Computing Layers Problems Chapter 8 I/O Original slides from Gregory Byrd, North Carolina State University Modified slides by Chris Wilcox, Colorado State University Algorithms Language Instruction Set
More informationIntroduction to Computer Engineering. CS/ECE 252, Fall 2012 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison
Introduction to Computer Engineering CS/ECE 252, Fall 2012 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison Chapter 8 & 9.1 I/O and Traps I/O: Connecting to Outside World So
More informationIntroduction to Computer Engineering. CS/ECE 252, Spring 2017 Rahul Nayar Computer Sciences Department University of Wisconsin Madison
Introduction to Computer Engineering CS/ECE 252, Spring 2017 Rahul Nayar Computer Sciences Department University of Wisconsin Madison Chapter 8 & 9.1 I/O and Traps Aside Off-Topic: Memory Hierarchy 8-3
More informationInput & Output. Lecture 16. James Goodman (revised by Robert Sheehan) Computer Science 210 s1c Computer Systems 1 Lecture Notes
Computer Science 210 s1c Computer Systems 1 Lecture Notes Lecture 16 Input & Output James Goodman (revised by Robert Sheehan) Credits: Slides prepared by Gregory T. Byrd, North Carolina State University
More informationLC3DataPath ECE2893. Lecture 9a. ECE2893 LC3DataPath Spring / 14
LC3DataPath ECE2893 Lecture 9a ECE2893 LC3DataPath Spring 2011 1 / 14 LC3 Data Path [4:0] FINITE MACHINE STATE MEMORY IR ADDR2MUX ADDR1MUX + GateMARMUX LDPC MARMUX ZEXT SEXT SEXT SEXT RESET GateALU +1
More informationInput/Output Interfaces: Ch
Input/Output Interfaces: Ch 8.1-8.3 hardware software H/w s/w interface Problems Algorithms Prog. Lang & Interfaces Instruction Set Architecture Microarchitecture (Organization) Circuits Devices (Transistors)
More informationCopyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Computing Layers
Chapter 5 The LC-3 Original slides from Gregory Byrd, North Carolina State University Modified slides by C. Wilcox, S. Rajopadhye Colorado State University Computing Layers Problems Algorithms Language
More informationCOSC121: Computer Systems: Review
COSC121: Computer Systems: Review Jeremy Bolton, PhD Assistant Teaching Professor Constructed using materials: - Patt and Patel Introduction to Computing Systems (2nd) - Patterson and Hennessy Computer
More informationCS 2461: Computer Architecture I
Computer Architecture is... CS 2461: Computer Architecture I Instructor: Prof. Bhagi Narahari Dept. of Computer Science Course URL: www.seas.gwu.edu/~bhagiweb/cs2461/ Instruction Set Architecture Organization
More information11/28/2016. ECE 120: Introduction to Computing. Register Loads Control Updates to Register Values. We Consider Five Groups of LC-3 Control Signals
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing LC-3 Control Signals Time to Examine a Processor s Control Signals in Detail Recall
More informationSpecial Microarchitecture based on a lecture by Sanjay Rajopadhye modified by Yashwant Malaiya
Special Microarchitecture based on a lecture by Sanjay Rajopadhye modified by Yashwant Malaiya Computing Layers Problems Algorithms Language Instruction Set Architecture Microarchitecture Circuits Devices
More informationThe LC-3 Instruction Set Architecture. ISA Overview Operate instructions Data Movement instructions Control Instructions LC-3 data path
Chapter 5 The LC-3 Instruction Set Architecture ISA Overview Operate instructions Data Movement instructions Control Instructions LC-3 data path A specific ISA: The LC-3 We have: Reviewed data encoding
More information8.1 I/O Basics Device Registers. chapter
chapter 8 Up to now, we have paid little attention to input/output (I/O). We did note (in Chapter 4) that input/output is an important component of the von Neumann model. There must be a way to get information
More informationMidterm 2 Review Chapters 4-16 LC-3
Midterm 2 Review Chapters 4-16 LC-3 ISA You will be allowed to use the one page summary. 8-2 LC-3 Overview: Instruction Set Opcodes 15 opcodes Operate instructions: ADD, AND, NOT Data movement instructions:
More informationChapter 5 The LC-3. ACKNOWLEDGEMENT: This lecture uses slides prepared by Gregory T. Byrd, North Carolina State University 5-2
Chapter 5 The LC-3 ACKNOWLEDGEMENT: This lecture uses slides prepared by Gregory T. Byrd, North Carolina State University 5-2 Instruction Set Architecture ISA = All of the programmer-visible components
More informationIntroduction to Computer Engineering. CS/ECE 252, Fall 2016 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison
Introduction to Computer Engineering CS/ECE 252, Fall 2016 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison Chapter 5 The LC-3 Instruction Set Architecture ISA = All of the
More informationLC-3 Instruction Processing. (Textbook s Chapter 4)
LC-3 Instruction Processing (Textbook s Chapter 4) Instruction Processing Fetch instruction from memory Decode instruction Evaluate address Fetch operands from memory Usually combine Execute operation
More informationLC-3 Instruction Processing
LC-3 Instruction Processing (Textbookʼs Chapter 4)# Next set of Slides:# Textbook Chapter 10-10.2# Instruction Processing# It is impossible to do all of an instruction in one clock cycle.# Processors break
More informationIntroduction to Computer Engineering. Chapter 5 The LC-3. Instruction Set Architecture
Introduction to Computer Engineering CS/ECE 252, Spring 200 Prof. David A. Wood Computer Sciences Department University of Wisconsin Madison Chapter 5 The LC-3 Adapted from Prof. Mark Hill s slides Instruction
More informationEEL 5722C Field-Programmable Gate Array Design
EEL 5722C Field-Programmable Gate Array Design Lecture 12: Pipelined Processor Design and Implementation Prof. Mingjie Lin Patt and Patel: Intro. to Computing System * Stanford EE271 notes 1 Instruction
More informationComputing Layers. Chapter 5 The LC-3
Computing Layers Problems Chapter 5 The LC-3 Original slides from Gregory Byrd, North Carolina State University Modified slides by Chris Wilcox, Colorado State University Algorithms Language Instruction
More informationChapter 4 The Von Neumann Model
Chapter 4 The Von Neumann Model The Stored Program Computer 1943: ENIAC Presper Eckert and John Mauchly -- first general electronic computer. (or was it John V. Atanasoff in 1939?) Hard-wired program --
More informationThe von Neumann Model
chapter 4 The von Neumann Model We are now ready to raise our level of abstraction another notch. We will build on the logic structures that we studied in Chapter 3, both decision elements and storage
More informationChapter 4 The Von Neumann Model
Chapter 4 The Von Neumann Model The Stored Program Computer 1943: ENIAC Presper Eckert and John Mauchly -- first general electronic computer. (or was it John V. Atanasoff in 1939?) Hard-wired program --
More informationCopyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Computing Layers
Chapter 4 The Von Neumann Model Original slides from Gregory Byrd, North Carolina State University Modified slides by C. Wilcox, S. Rajopadhye, Colorado State University Computing Layers Problems Algorithms
More informationInstruction Set Architecture
Chapter 5 The LC-3 Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer memory organization address space -- how may locations can be addressed? addressibility
More informationChapter 5 - ISA. 1.The Von Neumann Model. The Stored Program Computer. Von Neumann Model. Memory
Chapter 5 - ISA 1.The Von Neumann Model The Stored Program Computer 1943: ENIAC Presper Eckert and John Mauchly -- first general electronic computer. (or was it John V. Atanasoff in 1939?) Hard-wired program
More informationCOSC121: Computer Systems: Review
COSC121: Computer Systems: Review Jeremy Bolton, PhD Assistant Teaching Professor Constructed using materials: - Patt and Patel Introduction to Computing Systems (2nd) - Patterson and Hennessy Computer
More informationRegister Files. Single Bus Architecture. Register Files. Single Bus Processor. Term Project: using VHDL. Accumulator based architecture
Register Files DR 3 SelS Design and simulate the LC-3 processor using VHDL Term Project: Single Processor Decoder... R R3 R6...... mux mux S S SelDR 3 DRin Clock 3 SelS LC-3 Architecture 3 Register File
More informationChapter 4 The Von Neumann Model
Chapter 4 The Von Neumann Model The Stored Program Computer 1943: ENIAC Presper Eckert and John Mauchly -- first general electronic computer. (or was it John V. Atananasoff in 1939?) Hard-wired program
More informationComputer Architecture Lecture 6: Multi-Cycle and Microprogrammed Microarchitectures
18-447 Computer Architecture Lecture 6: Multi-Cycle and Microprogrammed Microarchitectures Prof. Onur Mutlu Carnegie Mellon University Spring 2015, 1/28/2015 Agenda for Today & Next Few Lectures Single-cycle
More informationIntroduction to Computer Engineering. CS/ECE 252 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin Madison
Introduction to Computer Engineering CS/ECE 252 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin Madison Chapter 4 The Von Neumann Model The Stored Program Computer 1943: ENIAC Presper
More informationCS 270 Fall 2013 Mock Final
CS 270 Fall 2013 Mock Final Name(s) of student(s) Please read these instructions completely before proceeding, and sign below. Your exam will not be graded without your signature. This is the mock nal
More informationLC-3 Architecture. (Ch4 ish material)
LC-3 Architecture (Ch4 ish material) 1 CISC vs. RISC CISC : Complex Instruction Set Computer Lots of instructions of variable size, very memory optimal, typically less registers. RISC : Reduced Instruction
More informationDepartment of Electrical and Computer Engineering The University of Texas at Austin
Department of Electrical and Computer Engineering The University of Texas at Austin EE 360N, Fall 2005 Yale Patt, Instructor Aater Suleman, Linda Bigelow, Jose Joao, Veynu Narasiman, TAs Final Exam, December,
More informationComputer Architecture. Lecture 5: Multi-Cycle and Microprogrammed Microarchitectures
Computer Architecture Lecture 5: Multi-Cycle and Microprogrammed Microarchitectures Dr. Ahmed Sallam Based on original slides by Prof. Onur Mutlu Agenda for Today & Next Few Lectures Single-cycle Microarchitectures
More informationappendix a The LC-3 ISA A.1 Overview
A.1 Overview The Instruction Set Architecture (ISA) of the LC-3 is defined as follows: Memory address space 16 bits, corresponding to 2 16 locations, each containing one word (16 bits). Addresses are numbered
More informationIntroduction to Computer Engineering. CS/ECE 252, Spring 2017 Rahul Nayar Computer Sciences Department University of Wisconsin Madison
Introduction to Computer Engineering CS/ECE 252, Spring 2017 Rahul Nayar Computer Sciences Department University of Wisconsin Madison Chapter 5 The LC-3 Announcements Homework 3 due today No class on Monday
More informationTrap Vector Table. Interrupt Vector Table. Operating System and Supervisor Stack. Available for User Programs. Device Register Addresses
Chapter 1 The LC-3b ISA 1.1 Overview The Instruction Set Architecture (ISA) of the LC-3b is defined as follows: Memory address space 16 bits, corresponding to 2 16 locations, each containing one byte (8
More informationLC-3 Instruction Set Architecture. Textbook Chapter 5
LC-3 Instruction Set Architecture Textbook Chapter 5 Instruction set architecture What is an instruction set architecture (ISA)? It is all of the programmer-visible components and operations of the computer
More informationLec-memMapIOtrapJSR SYS_BUS
Lec-memMapIOtrapJSR Memory Mapped I/O: I/O Devices have read/write access via device registers. To send a word of data to a device, write to its memory-mapped address: ST R1, To receive a word
More information10/31/2016. The LC-3 ISA Has Three Kinds of Opcodes. ECE 120: Introduction to Computing. ADD and AND Have Two Addressing Modes
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing The LC-3 Instruction Set Architecture The LC-3 ISA Has Three Kinds of Opcodes
More informationCIT 593: Intro to Computer Systems Homework #4: Assembly Language Due October 18, 2012, 4:30pm. Name
CIT 593: Intro to Computer Systems Homework #4: Assembly Language Due October 18, 2012, 4:30pm Instructions You may print this document and write your answers here, or submit solutions on a separate piece
More information( input = α output = λ move = L )
basicarchitectures What we are looking for -- A general design/organization -- Some concept of generality and completeness -- A completely abstract view of machines a definition a completely (?) general
More informationCS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON. Instructor: Rahul Nayar TAs: Mohit Verma, Annie Lin
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Instructor: Rahul Nayar TAs: Mohit Verma, Annie Lin Examination 4 In Class (50 minutes) Wednesday, May 3rd, 2017 Weight:
More informationCS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof Mark D. Hill and Prof. Gurindar Sohi TAs: Rebecca Lam, Mona Jalal, Preeti Agarwal, Pradip Vallathol Midterm Examination
More informationImplement useq's FSM's --- Next-state function --- Output function. We know: Any function can be implemented in AND-OR
Implement useq's FSM's --- Next-state function --- Output function We know: Any function can be implemented in AND-OR i --- # bits input to FSM (IR, PSR,...) j --- # bits of current state k = i + j ---
More information20/08/14. Computer Systems 1. Instruction Processing: FETCH. Instruction Processing: DECODE
Computer Science 210 Computer Systems 1 Lecture 11 The Instruction Cycle Ch. 5: The LC-3 ISA Credits: McGraw-Hill slides prepared by Gregory T. Byrd, North Carolina State University Instruction Processing:
More informationComputer Architecture Review CS 595
Computer Architecture Review CS 595 1 The von Neumann Model Von Neumann (1946) proposed that a fundamental model of a computer should include 5 primary components: Memory Processing Unit Input Device(s)
More informationControl unit. Input/output devices provide a means for us to make use of a computer system. Computer System. Computer.
Lecture 6: I/O and Control I/O operations Control unit Microprogramming Zebo Peng, IDA, LiTH 1 Input/Output Devices Input/output devices provide a means for us to make use of a computer system. Computer
More informationBeyond One Core. Multi-Cores. Evolution in Frequency Has Stalled. Source: ISCA 2009 Keynote of Kathy Yelick
Beyond One Multi-s Evolution in Frequency Has Stalled Source: ISCA 2009 Keynote of Kathy Yelick 1 Multi-s Network or Bus Memory Private and/or shared caches Bus Network (on chip = NoC) Example: ARM Cortex
More informationCS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof. Mikko Lipasti & Prof. Gurinder S. Sohi TAs: Daniel Chang, Felix Loh, Philip Garcia, Sean Franey, Vignyan Kothinti
More informationCS 2200 Spring 2008 Test 1
Please indicate your GT number in the grid below so we have some chance of being able to read it. G t 0 1 2 3 4 5 6 7 8 9 0 e g 0 1 2 3 4 5 6 7 8 9 0 0 1 2 3 4 5 6 7 8 9 0 0 1 2 3 4 5 6 7 8 9 0 a B c d
More informationECE331: Hardware Organization and Design
ECE331: Hardware Organization and Design Lecture 31: Computer Input/Output Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Overview for today Input and output are fundamental for
More informationIntro. to Computer Architecture Homework 4 CSE 240 Autumn 2005 DUE: Mon. 10 October 2005
Name: 1 Intro. to Computer Architecture Homework 4 CSE 24 Autumn 25 DUE: Mon. 1 October 25 Write your answers on these pages. Additional pages may be attached (with staple) if necessary. Please ensure
More informationOPERATING SYSTEMS CS136
OPERATING SYSTEMS CS136 Jialiang LU Jialiang.lu@sjtu.edu.cn Based on Lecture Notes of Tanenbaum, Modern Operating Systems 3 e, 1 Chapter 5 INPUT/OUTPUT 2 Overview o OS controls I/O devices => o Issue commands,
More informationLC-3 Instruction Set Architecture
CMPE12 Notes LC-3 Instruction Set Architecture (Textbookʼs Chapter 5 and 6)# Instruction Set Architecture# ISA is all of the programmer-visible components and operations of the computer.# memory organization#
More information컴퓨터개념및실습. 기말고사 review
컴퓨터개념및실습 기말고사 review Sorting results Sort Size Compare count Insert O(n 2 ) Select O(n 2 ) Bubble O(n 2 ) Merge O(n log n) Quick O(n log n) 5 4 (lucky data set) 9 24 5 10 9 36 5 15 9 40 14 39 15 45 (unlucky
More informationCPSC 213. Introduction to Computer Systems. I/O Devices, Interrupts and DMA. Unit 2a Oct 27, 29, 31. Winter Session 2014, Term 1
CPSC 213 Introduction to Computer Systems Winter Session 2014, Term 1 Unit 2a Oct 27, 29, 31 I/O Devices, Interrupts and DMA Overview Reading in Text 8.1, 8.2.1, 8.5.1-8.5.3 Learning Goals Explain what
More informationOutcomes. Lecture 13 - Introduction to the Central Processing Unit (CPU) Central Processing UNIT (CPU) or Processor
Lecture 13 - Introduction to the Central Processing Unit (CPU) Outcomes What is a CPU? How are instructions prepared by the CPU before execution? What registers and operations are involved in this preparation
More informationMicroprogrammed Control. ECE 238L μseq 2006 Page 1
Microprogrammed Control ECE 238L μseq 26 Page 1 Sample Control Unit FSM Add Ld Ld1 Ld2 Jsr Jsr1 F F1 F2 D Ldi Ldi1 Ldi2 Ldi3 Ldi4 Ldr Ldr1 Ldr2 Not Sti Sti1 Sti2 Sti3 Sti4 ECE 238L μseq 26 Page 2 Sample
More informationAdvanced Parallel Architecture Lesson 3. Annalisa Massini /2015
Advanced Parallel Architecture Lesson 3 Annalisa Massini - 2014/2015 Von Neumann Architecture 2 Summary of the traditional computer architecture: Von Neumann architecture http://williamstallings.com/coa/coa7e.html
More informationDepartment of Electrical and Computer Engineering The University of Texas at Austin
Department of Electrical and Computer Engineering The University of Texas at Austin EE 306, Fall 2011 Yale Patt, Instructor Faruk Guvenilir, Milad Hashemi, Jennifer Davis, Garrett Galow, Ben Lin, Taylor
More informationCMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013
CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013 TOPICS TODAY I/O Architectures Interrupts Exceptions FETCH EXECUTE CYCLE 1.7 The von Neumann Model This is a general
More informationUNIVERSITY OF WISCONSIN MADISON
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof. Gurindar Sohi TAs: Sujith Surendran, Lisa Ossian, Minsub Shin Midterm Examination 4 In Class (50 minutes) Wednesday,
More informationI/O and Device Drivers
I/O and Device Drivers Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University msryu@hanyang.ac.kr Topics Covered I/O Components I/O Interface I/O Operations Device Drivers 2 I/O Components
More informationCOSC121: Computer Systems. Exceptions and Interrupts
COSC121: Computer Systems. Exceptions and Interrupts Jeremy Bolton, PhD Assistant Teaching Professor Constructed using materials: - Patt and Patel Introduction to Computing Systems (2nd) - Patterson and
More informationDesign of Digital Circuits Lecture 15: Pipelining. Prof. Onur Mutlu ETH Zurich Spring April 2017
Design of Digital Circuits Lecture 5: Pipelining Prof. Onur Mutlu ETH Zurich Spring 27 3 April 27 Agenda for Today & Next Few Lectures! Single-cycle Microarchitectures! Multi-cycle and Microprogrammed
More informationECE Homework 8
ECE 252 - Homework 8 Written (problems 1 & 2) Due in Discussion Wed Dec. 7 th Code (problem 3) Due Thurs. Dec 8 th at Midnight (11:59 PM) Instructions: You should do this homework in your group assigned
More informationClass Notes. Dr.C.N.Zhang. Department of Computer Science. University of Regina. Regina, SK, Canada, S4S 0A2
Class Notes CS400 Part VI Dr.C.N.Zhang Department of Computer Science University of Regina Regina, SK, Canada, S4S 0A2 C. N. Zhang, CS400 83 VI. CENTRAL PROCESSING UNIT 1 Set 1.1 Addressing Modes and Formats
More informationPC Interrupt Structure and 8259 DMA Controllers
ELEC 379 : DESIGN OF DIGITAL AND MICROCOMPUTER SYSTEMS 1998/99 WINTER SESSION, TERM 2 PC Interrupt Structure and 8259 DMA Controllers This lecture covers the use of interrupts and the vectored interrupt
More informationOur Simulation Equivalent: -- readmemb( "os.bin" ) -- PC <== x0200
LC3 OS basics LC3 System Start-Up Assumptions We will write an OS for the LC3. What would a real LC3 do at start up? 1. BIOS execution --- PC points to BIOS (Basic IO System). --- POST: Test and initialize
More informationComputer Organization
Chapter 5 Computer Organization Figure 5-1 Computer hardware :: Review Figure 5-2 CPU :: Review CPU:: Review Registers are fast stand-alone storage locations that hold data temporarily Data Registers Instructional
More informationSubroutines & Traps. Announcements. New due date for assignment 2 5pm Wednesday, 5May
Computer Science 210 s1c Computer Systems 1 2010 Semester 1 Lecture Notes Lecture 19, 26Apr10: Subroutines & Traps James Goodman! Announcements New due date for assignment 2 5pm Wednesday, 5May Test is
More informationCS 134. Operating Systems. April 8, 2013 Lecture 20. Input/Output. Instructor: Neil Rhodes. Monday, April 7, 14
CS 134 Operating Systems April 8, 2013 Lecture 20 Input/Output Instructor: Neil Rhodes Hardware How hardware works Operating system layer What the kernel does API What the programmer does Overview 2 kinds
More informationWilliam Stallings Computer Organization and Architecture. Chapter 11 CPU Structure and Function
William Stallings Computer Organization and Architecture Chapter 11 CPU Structure and Function CPU Structure CPU must: Fetch instructions Interpret instructions Fetch data Process data Write data Registers
More informationCS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING COMPUTER SCIENCES DEPARTMENT UNIVERSITY OF WISCONSIN-MADISON
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING COMPUTER SCIENCES DEPARTMENT UNIVERSITY OF WISCONSIN-MADISON Prof. Mark D. Hill & Prof. Mikko H. Lipasti TAs Sanghamitra Roy, Eric Hill, Samuel Javner,
More informationLC-3 Subroutines and Traps. (Textbook Chapter 9)"
LC-3 Subroutines and Traps (Textbook Chapter 9)" Subroutines" Blocks can be encoded as subroutines" A subroutine is a program fragment that:" lives in user space" performs a well-defined task" is invoked
More informationChapter 5: Computer Systems Organization. Invitation to Computer Science, C++ Version, Third Edition
Chapter 5: Computer Systems Organization Invitation to Computer Science, C++ Version, Third Edition Objectives In this chapter, you will learn about: The components of a computer system Putting all the
More informationChapter 5: Computer Systems Organization
Objectives Chapter 5: Computer Systems Organization Invitation to Computer Science, C++ Version, Third Edition In this chapter, you will learn about: The components of a computer system Putting all the
More informationCPU Structure and Function
CPU Structure and Function Chapter 12 Lesson 17 Slide 1/36 Processor Organization CPU must: Fetch instructions Interpret instructions Fetch data Process data Write data Lesson 17 Slide 2/36 CPU With Systems
More informationWilliam Stallings Computer Organization and Architecture
William Stallings Computer Organization and Architecture Chapter 11 CPU Structure and Function Rev. 3.2.1 (2005-06) by Enrico Nardelli 11-1 CPU Functions CPU must: Fetch instructions Decode instructions
More informationCPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.
CPU ARCHITECTURE QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system. ANSWER 1 Data Bus Width the width of the data bus determines the number
More informationDigital System Design Using Verilog. - Processing Unit Design
Digital System Design Using Verilog - Processing Unit Design 1.1 CPU BASICS A typical CPU has three major components: (1) Register set, (2) Arithmetic logic unit (ALU), and (3) Control unit (CU) The register
More informationComputer Architecture 2/26/01 Lecture #
Computer Architecture 2/26/01 Lecture #9 16.070 On a previous lecture, we discussed the software development process and in particular, the development of a software architecture Recall the output of the
More informationDepartment of Electrical and Computer Engineering The University of Texas at Austin
Department of Electrical and Computer Engineering The University of Texas at Austin EE 306, Fall 013 Yale Patt, Instructor Ben Lin, Mochamad Asri, Ameya Chaudhari, Nikhil Garg, Lauren Guckert, Jack Koenig,
More informationCS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING COMPUTER SCIENCES DEPARTMENT UNIVERSITY OF WISCONSIN-MADISON
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING COMPUTER SCIENCES DEPARTMENT UNIVERSITY OF WISCONSIN-MADISON Prof. Mark D. Hill & Prof. Parmesh Ramanathan TAs Kasturi Bidarkar, Ryan Johnson, Jie Liu,
More informationLC-2 Programmer s Reference and User Guide
LC-2 Programmer s Reference and User Guide University of Michigan EECS 100 Matt Postiff Copyright (C) Matt Postiff 1995-1999. All rights reserved. Written permission of the author is required for duplication
More informationMicro-Operations. execution of a sequence of steps, i.e., cycles
Micro-Operations Instruction execution execution of a sequence of steps, i.e., cycles Fetch, Indirect, Execute & Interrupt cycles Cycle - a sequence of micro-operations Micro-operations data transfer between
More informationLC-3 TRAP Routines. Textbook Chapter 9
LC-3 TRAP Routines Textbook Chapter 9 System Calls Certain operations require specialized knowledge and protection: specific knowledge of I/O device registers and the sequence of operations needed to use
More informationCS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.
CS 265 Computer Architecture Wei Lu, Ph.D., P.Eng. Part 3: von Neumann Architecture von Neumann Architecture Our goal: understand the basics of von Neumann architecture, including memory, control unit
More informationCS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING COMPUTER SCIENCES DEPARTMENT UNIVERSITY OF WISCONSIN-MADISON
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING COMPUTER SCIENCES DEPARTMENT UNIVERSITY OF WISCONSIN-MADISON Prof. Mark D. Hill & Prof. Parmesh Ramanathan TAs Kasturi Bidarkar, Ryan Johnson, Jie Liu,
More informationAnne Bracy CS 3410 Computer Science Cornell University
Anne Bracy CS 3410 Computer Science Cornell University The slides were originally created by Deniz ALTINBUKEN. P&H Chapter 4.9, pages 445 452, appendix A.7 Manages all of the software and hardware on the
More informationCPU Structure and Function
Computer Architecture Computer Architecture Prof. Dr. Nizamettin AYDIN naydin@yildiz.edu.tr nizamettinaydin@gmail.com http://www.yildiz.edu.tr/~naydin CPU Structure and Function 1 2 CPU Structure Registers
More informationEN1640: Design of Computing Systems Topic 07: I/O
EN1640: Design of Computing Systems Topic 07: I/O Professor Sherief Reda http://scale.engin.brown.edu Electrical Sciences and Computer Engineering School of Engineering Brown University Spring 2017 [ material
More information