10/30/2016. How Do We Write Instructions? ECE 120: Introduction to Computing. Put Bits into Memory, Then Execute the Bits
|
|
- Erica Ross
- 6 years ago
- Views:
Transcription
1 University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Instructions Illustrated How Do We Write Instructions? Previously, we looked at some instruction and talked about executing instructions. It s natural to wonder: How did those get there? Similarly, when making a peanut butter sandwich: Why was the bag closed? Where did the bread come from? Why was it whole wheat bread? ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 1 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 2 Put Bits into Memory, Then Execute the Bits Let s Illustrate LC-3 Instruction Processing All perfectly valid questions, but be patient! Our model of programming: Place into locations (you ll see how in the lab, and later in class). Then tell the LC-3 to interpret our as instructions. We can also put data in. But be careful! The LC-3 can t tell the difference between instructions and data. Both are. Let s execute the LC-3 for a few cycles and see how it works. We ll show a few pieces of the datapath: PC and IR MAR and MDR ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 3 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 4
2 What s in the Blank Boxes? Why are Some Values in Hex? R x1230 Bits! (not blanks!) PC x3000 IR MAR MDR For us humans (only). R x1230 Computers always use. PC x3000 IR MAR MDR ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 5 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 6 Fetch #1: MAR PC, PC PC + 1 Fetch #2: MDR M[MAR] R x1230 PC x3000 IR MAR MDR x3001 x R x1230 PC x3001 IR MAR x3000 MDR x670a ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 7 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 8
3 Fetch #3: IR MDR DECODE, then EXECUTE R x1230 PC x3001 IR MAR x3000 MDR x670a x670a These are the instruction to R be 0000decoded x1230 and executed. ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 9 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 10 Let s Decode the Instruction The IR has x670a. In, that s destination base 6-bit 2 s complement opcode register register offset LDR, R4, x0a Which means what? Let s decode it. M[R4 + x000a] What is the address? The LC-3 Reads the Bits from R Look at the stored in R4. R x1230 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 11 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 12
4 Let s Calculate the Memory Address M[R4 + x000a] R4 is x1230. Adding x000a, we obtain? x123a What is stored at address x123a? The LC-3 Reads Memory at x123a 16 Here is address x123a. 16 R x1230 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 13 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 14 The LC-3 Stores x0f0f into M[R4 + x000a] R4 is x1230. Adding x000a, we obtain? x123a What is stored at address x123a? x0f0f So the LC-3 stores x0f0f into. The LC-3 Stores x0f0f into x0f0f R x1230 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 15 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 16
5 What s Next? Fetch #1: MAR PC, PC PC Fetch another instruction! x0f0f R x x0f0f R x1230 x3002 x3001 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 17 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 18 Fetch #2: MDR M[MAR] Fetch #3: IR MDR x0f0f R x1230 Not shown, but say it s x16c3. PC x3002 IR x670a MAR x3001 MDR x670a x16c x0f0f R x1230 PC x3002 IR x670a MAR x3001 MDR x16c3 x16c3 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 19 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 20
6 DECODE, then EXECUTE Let s Decode the Instruction These are the instruction to x0f0f R be 0000decoded x1230 and executed. The IR has x16c3. In, that s destination source source opcode register register 1 register ADD,, Which means what? Let s decode it. + Add to, storing the sum back into. ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 21 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 22 The LC-3 Stores x1e1e into What s Next? x0f0f x1e1e R x x1e1e R x1230 Fetch another instruction! Life is not so exciting for LC-3 processors ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 23 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 24
7 Fetch #1: MAR PC, PC PC + 1 Fetch #2: MDR M[MAR] x1e1e R x1230 x3003 x x1e1e R x1230 Not shown, but say it s x770a. PC x3003 IR x16c3 MAR x3002 MDR x16c3 x770a ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 25 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 26 Fetch #3: IR MDR DECODE, then EXECUTE x1e1e R x1230 PC x3003 IR x16c3 MAR x3002 MDR x770a x770a These are the instruction to x1e1e R be 0000decoded x1230 and executed. PC x3003 IR x770a MAR x3002 MDR x770a ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 27 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 28
8 Let s Decode the Instruction The IR has x770a. In, that s source base 6-bit 2 s complement opcode register register offset STR, R4, x0a Which means what? Let s decode it. M[R4 + x000a] What is the address? The LC-3 Reads the Bits from R x1e1e Look at the stored in R4. R x1230 PC x3003 IR x770a MAR x3002 MDR x770a ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 29 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 30 Let s Calculate the Memory Address M[R4 + x000a] R4 is x1230. Adding x000a, we obtain? x123a So the LC-3 stores the in to address x123a. The LC-3 Writes x1e1e to Memory Address x123a x1e1e x1e1e R x1230 PC x3003 IR x770a MAR x3002 MDR x770a ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 31 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 32
9 What s Next? Computers Just Execute Instructions x1e1e For the LC-3, x123a x1e1e R x1230 fetch another instruction! But as for us, we re done. What does that instruction sequence do? Multiplies the value at address x123a by 2 (shifts it left by 1 bit). What if held something important before we executed those instructions? Too bad. Those are gone. The programmer controls the computer. The computer just does what it s told. ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 33 ECE 120: Introduction to Computing 2016 Steven S. Lumetta. All rights reserved. slide 34
11/10/2016. Review the Problem to Be Solved. ECE 120: Introduction to Computing. What Shall We Keep in the Registers? Where Are the Pieces in Memory?
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Letter Frequency Coding Review the Problem to Be Solved The task: given an ASCII
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 information11/6/2016. Let s Solve a Problem. ECE 120: Introduction to Computing. Overview of Our Task. Programs are Finite State Machines
University of Illinot Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Typing in a Number Let s Solve a Problem Let s see how we can translate a task in
More information11/29/2016. ECE 120: Introduction to Computing. Microinstruction Branch Conditions for LC-3. LC-3 State Transition Diagram Has Few Outgoing Arcs
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing The Patt and Patel Control Unit LC-3 State Transition Diagram Has Few Outgoing
More information2/5/2018. Learn Four More Kinds of C Statements. ECE 220: Computer Systems & Programming. C s if Statement Enables Conditional Execution
2/5/218 University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 22: Computer Systems & Programming Control Constructs in C (Partially a Review) Learn Four More Kinds
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 information11/16/2016. Review Our Process for Programming. ECE 120: Introduction to Computing. A Typical Programming Process. Can a Computer Help Us Program?
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Assembly Language Review Our Process for Programming Step 1: Figure out the instruction
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 information9/10/2016. Time for Some Detailed Examples. ECE 120: Introduction to Computing. Let s See How This Loop Works. One Statement/Step at a Time
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Examples of C Programs with Loops Time for Some Detailed Examples Let s do some
More information1/31/2017. Expressions are Used to Perform Calculations. ECE 120: Introduction to Computing. Five Arithmetic Operators on Numeric Types
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Expressions are Used to Perform Calculations Let s talk in more detail starting
More information9/2/2016. Expressions are Used to Perform Calculations. ECE 120: Introduction to Computing. Five Arithmetic Operators on Numeric Types
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Expressions are Used to Perform Calculations Let s talk in more detail starting
More information2/8/2017. SOP Form Gives Good Performance. ECE 120: Introduction to Computing. K-Maps Can Identify Single-Gate Functions
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Two-Level Logic SOP Form Gives Good Performance s you know, one can use a K-map
More informationFortunately not. In LC-3, there are a variety of addressing modes that deal with these concerns.
CIT 593 Intro to Computer Systems Lecture #8 (10/2/12) Now let's see how an LC-3 program can read data from ( load ) and write data to ( store ) memory. Whenever we load/read from memory, we always have
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 information10/24/2016. We Can Perform Any Computation with an FSM. ECE 120: Introduction to Computing. Find the Minimum Value Among Ten Integers
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing From FSM to Computer We Can Perform Any Computation with an FSM Let s build an
More information1/30/2018. Conventions Provide Implicit Information. ECE 220: Computer Systems & Programming. Arithmetic with Trees is Unambiguous
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 220: Computer Systems & Programming The Stack Abstraction Conventions Provide Implicit Information What does
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 information9/10/2016. ECE 120: Introduction to Computing. The Domain of a Boolean Function is a Hypercube. List All Implicants for One Variable A
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing To Simplify, Write Function as a Sum of Prime Implicants One way to simplify a
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 informationBinghamton University. CS-120 Summer LC3 Memory. Text: Introduction to Computer Systems : Sections 5.1.1, 5.3
LC3 Memory Text: Introduction to Computer Systems : Sections 5.1.1, 5.3 John Von Neumann (1903-1957) Princeton / Institute for Advanced Studies Need to compute particle interactions during a nuclear reaction
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 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 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 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 information2/6/2018. Let s Act Like Compilers! ECE 220: Computer Systems & Programming. Decompose Finding Absolute Value
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 220: Computer Systems & Programming Let s Act Like Compilers! Let s have some fun! Let s pretend to be a C compiler!
More information2/5/2018. Expressions are Used to Perform Calculations. ECE 220: Computer Systems & Programming. Our Class Focuses on Four Types of Operator in C
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 220: Computer Systems & Programming Expressions and Operators in C (Partially a Review) Expressions are Used
More information10/27/2016. ECE 120: Introduction to Computing. The LC-3 Memory is Bit. Recall the Five Parts of the von Neumann Model
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing LC-3 as a von Neumann Machine Build an LC-3 Processor as a von Neumann Machine
More information8/30/2016. In Binary, We Have A Binary Point. ECE 120: Introduction to Computing. Fixed-Point Representations Support Fractions
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Fixed- and Floating-Point Representations In Binary, We Have A Binary Point Let
More information1/29/2018. Starting a Program Executes its main Function. ECE 220: Computer Systems & Programming. The Function main Divides into Two Parts
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 220: Computer Systems & Programming Starting a Program Executes its main Function Let s take a look at a C program
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 informationADD R3, R4, #5 LDR R3, R4, #5
ECE 109 Sections 602 to 605 Exam 2 Fall 2007 Solution 6 November, 2007 Problem 1 (15 points) Data Path In the table below, the columns correspond to two LC/3 instructions and the rows to the six phases
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 information2/28/2018. Let s Talk About Testing the Nonogram Code. ECE 220: Computer Systems & Programming. Example Nonogram Code Solution
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 220: Computer Systems & Programming Testing the Nonogram Code Let s Talk About Testing the Nonogram Code What
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 informationMachine Language and Assembly Language
Machine Language and Assembly Language In the following lectures, we will learn: How instructions are represented and decoded Introduction to different types of Addressing Modes Most commonly used assembly
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 information1/25/2018. ECE 220: Computer Systems & Programming. Write Output Using printf. Use Backslash to Include Special ASCII Characters
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 220: Computer Systems & Programming Review: Basic I/O in C Allowing Input from the Keyboard, Output to the Monitor
More information9/3/2016. ECE 120: Introduction to Computing. Few Programmers Write Instructions (Assembly Code) Spend a Week Learning the C Programming Language
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Introduction to the C Programming Language Few Programmers Write Instructions
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 information10/5/2016. Review of General Bit-Slice Model. ECE 120: Introduction to Computing. Initialization of a Serial Comparator
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Example of Serialization Review of General Bit-Slice Model General model parameters
More information10/24/2016. Let s Name Some Groups of Bits. ECE 120: Introduction to Computing. We Just Need a Few More. You Want to Use What as Names?!
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Memory Let s Name Some Groups of Bits I need your help. The computer we re going
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 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 informationIntroduction to Computer. Chapter 5 The LC-3. Instruction Set Architecture
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin Madison Chapter 5 The LC-3 Instruction Set Architecture
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 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 information9/10/2016. The Dual Form Swaps 0/1 and AND/OR. ECE 120: Introduction to Computing. Every Boolean Expression Has a Dual Form
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Boolean Properties and Optimization The Dual Form Swaps 0/1 and AND/OR Boolean
More information2/6/2018. ECE 220: Computer Systems & Programming. Function Signature Needed to Call Function. Signature Include Name and Types for Inputs and Outputs
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 220: Computer Systems & Programming C Functions and Examples Signature Include Name and Types for Inputs and
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 informationDesign of Decode, Control and Associated Datapath Units
1 Design of Decode, Control and Associated Datapath Units ECE/CS 3710 - Computer Design Lab Lab 3 - Due Date: Thu Oct 18 I. OVERVIEW In the previous lab, you have designed the ALU and hooked it up with
More informationCOMARCH. COMPUTER ARCHITECTURE TERM 3 SY COMPUTER ENGINEERING DE LA SALLE UNIVERSITY Quiz 1
COMARCH. COMPUTER ARCHITECTURE TERM 3 SY 2015 2016 COMPUTER ENGINEERING DE LA SALLE UNIVERSITY Quiz 1 1. Draw the logic symbol of the component whose operations are specified by the following microoperations:
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 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 information2/12/2018. Recall Why ISAs Define Calling Conventions. ECE 220: Computer Systems & Programming. Recall the Structure of the LC-3 Stack Frame
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 220: Computer Systems & Programming Stack Frames Revisited Recall Why ISAs Define Calling Conventions A compiler
More informationDepartment of Computer and Mathematical Sciences. Lab 4: Introduction to MARIE
Department of Computer and Mathematical Sciences CS 3401 Assembly Language 4 Lab 4: Introduction to MARIE Objectives: The main objective of this lab is to get you familiarized with MARIE a simple computer
More information10/21/2016. ECE 120: Introduction to Computing. Let s Extend Our Keyless Entry FSM. FSM Designs Also Allow Use of Abstraction
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Extending Keyless Entry Combinational Logic Design Allows Use of Abstraction Recall
More informationLC-3 ISA - II. Lecture Topics. Lecture materials. Homework. Machine problem. Announcements. ECE 190 Lecture 10 February 17, 2011
LC- ISA - II Lecture Topics LC- data movement instructions LC- control instructions LC- data path review Lecture materials Textbook 5. - 5.6 Textbook Appendix A. Homework HW due Wednesday February 2 at
More informationThe MARIE Architecture
The MARIE Machine Architecture that is Really Intuitive and Easy. We now define the ISA (Instruction Set Architecture) of the MARIE. This forms the functional specifications for the CPU. Basic specifications
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 informationLC-3. 3 bits for condition codes (more later) Fixed-length instructions, with 4-bit opcodes. IIT CS 350 S 18- Hale
LC-3 (Little computer version 3) 16-bit address width, 16-bit addressability. (Word size is 16 bits) 65K possible memory addresses Signed integers are 2 s complement 8 General purpose registers (GPRs),
More informationComputer Organization II CMSC 3833 Lecture 33
Term MARIE Definition Machine Architecture that is Really Intuitive and Easy 4.8.1 The Architecture Figure s Architecture Characteristics: Binary, two s complement Stored program, fixed word length Word
More informationOctober 24. Five Execution Steps
October 24 Programming problems? Read Section 6.1 for November 5 How instructions execute Test Preview Ask Questions! 10/24/2001 Comp 120 Fall 2001 1 Five Execution Steps Instruction Fetch Instruction
More informationLecture1: introduction. Outline: History overview Central processing unite Register set Special purpose address registers Datapath Control unit
Lecture1: introduction Outline: History overview Central processing unite Register set Special purpose address registers Datapath Control unit 1 1. History overview Computer systems have conventionally
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 informationLogistics. IIT CS 350 S '17 - Hale
Logistics Remember: Lab 5 due next week not this week. Finish it early though so you can move on to Lab 6! Lab 2 grades in BB Required reading posted (Patt & Patel Ch. 5) First exam during class next Wednesday
More information12/2/2016. Error Detection May Not Be Enough. ECE 120: Introduction to Computing. Can We Use Redundancy to Correct Errors?
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Error Correction, Hamming Codes, and SEC-DED Codes Error Detection May Not Be
More informationUNIVERSITY OF WISCONSIN MADISON
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof. Gurindar Sohi TAs: Lisa Ossian, Minsub Shin, Sujith Surendran Midterm Examination 3 In Class (50 minutes) Friday,
More informationMemory General R0 Registers R1 R2. Input Register 1. Input Register 2. Program Counter. Instruction Register
CPU Organisation Central Processing Unit (CPU) Memory General R0 Registers R1 R2 ALU R3 Output Register Input Register 1 Input Register 2 Internal Bus Address Bus Data Bus Addr. $ 000 001 002 Program Counter
More informationLoad -- read data from memory to register. Store -- write data from register to memory. Load effective address -- compute address, save in register
Data Movement Instructions Load -- read data from memory to register LD: PC-relative mode LDR: base+offset mode LDI: indirect mode Store -- write data from register to memory ST: PC-relative mode STR:
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 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 informationC Functions and Pointers. C Pointers. CS270 - Fall Colorado State University. CS270 - Fall Colorado State University
1 C Pointers C unctions and Pointers 3 2 4 5 6 7 8 our-bit Adder Logical Completeness (Example)! Can implement ANY truth table with combo of AN, OR, NOT gates. Implementing a inite tate Machine (equential
More informationCS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON. Instructor: Rahul Nayar TAs: Annie Lin, Mohit Verma
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Instructor: Rahul Nayar TAs: Annie Lin, Mohit Verma Examination 2 In Class (50 minutes) Wednesday, March 8, 207 Weight:
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 information1/17/2018. Task: Print a Number in Binary. ECE 220: Computer Systems & Programming. First Step: Break the Task into a Sequence of Two
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 220: Computer Systems & Programming LC-3 I/O Usage Example Task: Print a Number in Binary Let s write some code
More informationWhere Does The Cpu Store The Address Of The
Where Does The Cpu Store The Address Of The Next Instruction To Be Fetched The three most important buses are the address, the data, and the control buses. The CPU always knows where to find the next instruction
More informationFundamentals of Computer Architecture. 8. Bringing It All Together The Hardware Engineer s Perspective
Fundamentals of Computer Architecture 8. Bringing It All Together The Hardware Engineer s Perspective 1 CHAPTER OVERVIEW This chapter includes: Assigning tasks to individual processor components; Micro-instructions;
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 informationECE 411 Exam 1. This exam has 5 problems. Make sure you have a complete exam before you begin.
This exam has 5 problems. Make sure you have a complete exam before you begin. Write your name on every page in case pages become separated during grading. You will have three hours to complete this exam.
More informationECE 411, Exam 1. Good luck!
This exam has 6 problems. Make sure you have a complete exam before you begin. Write your name on every page in case pages become separated during grading. You will have three hours to complete this exam.
More informationsession 7. Datapath Design
General Objective: Determine the hardware requirement of a digital computer based on its instruction set. Specific Objectives: Describe the general concepts in designing the data path of a digital computer
More informationGeneral purpose registers These are memory units within the CPU designed to hold temporary data.
Von Neumann Architecture Single processor is used Each instruction in a program follows a linear sequence of fetch decode execute cycle Program and data are held in same main memory Stored program Concept
More information7/25/2016. Example: Addition of Unsigned Bit Patterns. ECE 120: Introduction to Computing. Adding Two Non-Negative Patterns Can Overflow
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing 2 s Complement Overflow and Boolean Logic Example: ddition of Unsigned Bit Patterns
More informationCENG3420 Lab 2-1: LC-3b Simulator
CENG3420 Lab 2-1: LC-3b Simulator Bei Yu Department of Computer Science and Engineering The Chinese University of Hong Kong byu@cse.cuhk.edu.hk Spring 2018 1 / 29 Overview LC-3b Basis LC-3b Assembly Examples
More informationImplementing Another ISA, Basic Pipelining
EE360N: Computer Architecture Lecture #4 Department of Electical and Computer Engineering The University of Texas at Austin September 24, 2008 Disclaimer: The contents of this document are scribe notes
More informationObjective now How are such control statements registers and other components Managed to ensure proper execution of each instruction
Control and Control Components Introduction Software application similar to familiar nested Russian dolls As we ve observed earlier Application written in some high level programming language C, C++, C#,
More informationSingle cycle MIPS data path without Forwarding, Control, or Hazard Unit
Single cycle MIPS data path without Forwarding, Control, or Hazard Unit Figure 1: an Overview of a MIPS datapath without Control and Forwarding (Patterson & Hennessy, 2014, p. 287) A MIPS 1 single cycle
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 informationChapter 6 Programming the LC-3
Chapter 6 Programming the LC-3 Based on slides McGraw-Hill Additional material 4/5 Lewis/Martin Aside: Booting the Computer How does it all begin? We have LC-3 hardware and a program, but what next? Initial
More informationDesign of the MIPS Processor (contd)
Design of the MIPS Processor (contd) First, revisit the datapath for add, sub, lw, sw. We will augment it to accommodate the beq and j instructions. Execution of branch instructions beq $at, $zero, L add
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 informationSTRUCTURE OF DESKTOP COMPUTERS
Page no: 1 UNIT 1 STRUCTURE OF DESKTOP COMPUTERS The desktop computers are the computers which are usually found on a home or office desk. They consist of processing unit, storage unit, visual display
More informationChapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics
Chapter 4 Objectives Learn the components common to every modern computer system. Chapter 4 MARIE: An Introduction to a Simple Computer Be able to explain how each component contributes to program execution.
More informationChapter 02: Computer Organization. Lesson 02: Functional units and components in a computer organization- Part 1: Processor
Chapter 02: Computer Organization Lesson 02: Functional units and components in a computer organization- Part 1: Processor Objective Understand functional units in Processor Understand execution unit,
More informationMajor and Minor States
Major and Minor States We now consider the micro operations and control signals associated with the execution of each instruction in the ISA. The execution of each instruction is divided into three phases.
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 informationUniversity of Illinois at Urbana-Champaign First Midterm Exam, ECE 220 Honors Section
University of Illinois at Urbana-Champaign First Midterm Exam, ECE 220 Honors Section Name: SOLUTION IS IN RED Thursday 15 February 2018 Net ID: Be sure that your exam booklet has ELEVEN pages. Write your
More information3/7/2018. Sometimes, Knowing Which Thing is Enough. ECE 220: Computer Systems & Programming. Often Want to Group Data Together Conceptually
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 220: Computer Systems & Programming Structured Data in C Sometimes, Knowing Which Thing is Enough In MP6, we
More information10/21/2016. A Finite State Machine (FSM) Models a System. ECE 120: Introduction to Computing. An FSM Consists of Five Parts
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Finite State Machines (FSMs) A Finite State Machine (FSM) Models a System A model
More information