Housekeeping 1.teams—end of class 2.Example verilog code (alter) 3.Example altera report 4.Lab Monday: you will be asked to show: -- one or more reports.

Slides:



Advertisements
Similar presentations
Chapter 5 The LC-3 Instruction Set Architecture l ISA Overview l Operate instructions l Data Movement instructions l Control Instructions l LC-3 data path.
Advertisements

CS25410 Memory Machine Code. Common types of non-rotating memory (1) RAMRandom Access Memory In reality, read/write memory This is usually volatile, meaning.
INSTRUCTION SET ARCHITECTURES
Chapter 5 The LC-3.
Chapter 4 - ISA 1.The Von Neumann Model. 4-2 The Stored Program Computer 1943: ENIAC Presper Eckert and John Mauchly -- first general electronic computer.
Embedded Systems: Hardware Computer Processor Basics ISA (Instruction Set Architecture) RTL (Register Transfer Language) Main reference: Peckol, Chapter.
Instruction Set Architecture & Design
LC-3 Computer LC-3 Instructions
S. Barua – CPSC 240 CHAPTER 5 THE LC-3 Topics Memory organization Registers Instruction set Opcodes.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
LC-3 Instruction Set Architecture (Textbook’s Chapter 5)
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Chapter 5 The LC-3 LC-3 Computer Architecture Memory Map
Chapter 6 Programming in Machine Language The LC-3 Simulator
Choice for the rest of the semester New Plan –assembler and machine language –Operating systems Process scheduling Memory management File system Optimization.
Overview The von Neumann Machine - the programmable digital computer Introducing the LC-3 Computer - A “toy” computer for us to learn from Computer machine.
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
LC-3 Instruction Set Architecture
Chapters 4 & 5: LC-3 Computer Architecture Machine Instructions Assembly language Programming in Machine and Assembly Language.
Overview von Neumann Model Components of a Computer Some Computer Organization Models The Computer Bus An Example Organization: The LC-3.
Embedded Systems: Hardware Computer Processor Basics ISA (Instruction Set Architecture) RTL (Register Transfer Language) Main reference: Peckol, Chapter.
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
Chapter 5 The LC-3. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5-2 Instruction Set Architecture ISA.
1 Catalog of useful (structural) modules and architectures In this course we will be working mostly at the BEHAVIORAL and STRUCTURAL levels. We will rely.
Machine Instruction Characteristics
Chapter 4 The Von Neumann Model
Introduction to Computing Systems from bits & gates to C & beyond Chapter 5 The LC-3 Instruction Set Architecture ISA Overview Operate instructions Data.
Chapter 5 The LC Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer memory organization.
Chapter 5 The LC-3. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5-2 Data Movement Instructions Load --
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
The LC-3. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5-2 Instruction Set Architecture ISA = All of the.
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
Lecture 14 Today’s topics MARIE Architecture Registers Buses
Chapter 5 The LC Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer memory organization.
Computer Architecture and Organization
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Von Neumann Model Computer Organization I 1 September 2009 © McQuain, Feng & Ribbens The Stored Program Computer 1945: John von Neumann –
What is a program? A sequence of steps
Introduction to Computing Systems and Programming The LC-2.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
Chapter 4 The Von Neumann Model
COSC121: Computer Systems: Review
Chapter 4 The Von Neumann Model
A Closer Look at Instruction Set Architectures: Expanding Opcodes
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
Computer Science 210 Computer Organization
Chapter 5 The LC-3.
The LC-3 Instruction Set Architecture Data Movement instructions
Chapter 4 The Von Neumann Model
LC-3 Details and Examples
Computer Science 210 Computer Organization
Chapter 5 The LC-3.
Introduction to Computer Engineering
Chapter 8 Central Processing Unit
ECEG-3202 Computer Architecture and Organization
Chapter 4 The Von Neumann Model
ECEG-3202 Computer Architecture and Organization
LC-2: The Little Computer 2
The Stored Program Computer
COMPUTER ORGANIZATION AND ARCHITECTURE
Computer Architecture Assembly Language
Introduction to Computer Engineering
Introduction to Computer Engineering
Introduction to Computer Engineering
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
Chapter 5 The LC-3.
Presentation transcript:

Housekeeping 1.teams—end of class 2.Example verilog code (alter) 3.Example altera report 4.Lab Monday: you will be asked to show: -- one or more reports --one or more verilog modules --one or more simulation

Processors (ISA, RTL levels); Instruction cycle; interrupts Computer Processor Basics ISA (Instruction Set Architecture) RTL (Register Transfer Language) Main references: Peckol, Chapters 1-3 Patt and Patel, Introduction to Computing Systems (slides from NC State) Fig

“Machine” categories FSM Stack machine Turing machine –von Neumann architecture –Harvard architecture program and data share one memory Von Neumann memory Harvard memory: separation of program, data program data

Control (fsm) “Top” Stack Popped Item (from “Top”) Combinational Logic I/O

(Actual “RAM” Hierarchy) Registers Cache Main Memory (RAM) (Virtual Storage) {Hard Disk, Secondary Devices}

fig_01_05 Some processor options (note firmware) DSP (A/D, D/A; high speed—video, audio, images 2. Microcontroller-based system Fig components integrated into one unit) 1. Microprocessor- based system fig_01_06 fig_01_07

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 -- how many bits per location? –register set how many? what size? how are they used? –instruction set opcodes data types addressing modes ISA provides all information needed for someone that wants to write a program in machine language (or translate from a high-level language to machine language).

Example 1:LC-3 (Patt) Overview: Memory and Registers Memory –address space: 2 16 locations (16-bit addresses) –addressability: 16 bits Registers –temporary storage, accessed in a single machine cycle accessing memory generally takes longer than a single cycle –eight general-purpose registers: R0 - R7 each 16 bits wide how many bits to uniquely identify a register? –other registers not directly addressable, but used by (and affected by) instructions PC (program counter), condition codes

LC-3 Overview: Instruction Set Opcodes –15 opcodes –Operate instructions: ADD, AND, NOT –Data movement instructions: LD, LDI, LDR, LEA, ST, STR, STI –Control instructions: BR, JSR/JSRR, JMP, RTI, TRAP –some opcodes set/clear condition codes, based on result: N = negative, Z = zero, P = positive (> 0) Data Types –16-bit 2’s complement integer: (q: how does 2’s c arithmetic work?) Addressing Modes –How is the location of an operand specified? –non-memory addresses: immediate, register –memory addresses: PC-relative, indirect, base+offset

Example: NOT (Register) Note: Src and Dst could be the same register.

Example: ADD/AND (Register) this zero means “register mode”

fig_01_08 DATA: DATA TYPES NUMERIC --Unsigned integer --Signed integer (2’s complement, sign-magnitude, fixed point, etc.) --Floating point: 3 components: sign exponent mantissa NONNUMERIC --address --character Q: what common data type is not named? Is it “missing”?

Instructions—ISA level Instruction coding: HLL (high level language, C, C++, e.g.)  assembly language (ISA)  machine language (can work at any level; high level allows faster but less efficient coding) IEEE Standard —IEEE standard for microprocessor assembly language—used for examples in text

Instruction coding: Fields: operator, operands (type of addressing) Example: 32 bits 3 bits: opcode 2 bits: address mode (e.g. direct, indirect, indexed, immediate) 27 bits: for addressing operand (s) Expanding opcode (example): xxxx…xxx: 2 operands 1110xxx…xxx: 1 operand 1111xxx…xxx: no operand (e.g., HALT) operator addr mode operand(s)

fig_01_13 fig_01_14 fig_01_15 Example instruction formats

fig_01_42 Typical ALU and registers

fig_01_16 Data movement instructions: source / destination

fig_01_12 Addressing modes: Immediate: MOVE A, #BH; Direct:MOVE OPR1, OPR2; Indirect:MOVE OPR1, *myVarPtr; MOVE *OPR1, *OPR1; MOVE *OPR1, **yPtr; Register direct:MOVE Reg1, Reg2; Register indirect:MOVE Reg1, *Reg2; Indexed (loops):MOVE Reg1, OPR2[REG2]; PC relative (loops,e.g.; offset can be negative): ADD PC, [Reg1]; Example: what is the difference between Y, *Y, **Y Indirect addressing— myVarPtr holds address or myVar

fig_01_21 Addressing examples:

fig_01_22

fig_01_23

fig_01_24

Control instructions Control can be: sequential (default) loop (pre or posttest) branch: go to conditional (if, if-else,, case, branch on condition) procedure or function call [interrupt or exception] change in control flow, e.g., I/O device ready Unusual event, e.g., overflow or undefined instruction

fig_01_31 Example of conditional statements: C / assembly language: fig_01_32

fig_01_34 Looping: example fig_01_35

fig_01_36 fig_01_37 Function or procedure call: Must store return address, pass information back and forth What are standard parameter passing methods?

fig_01_39 Stack: common way to handle procedure / function calls Q: what are two alternative methods for handling function / procedure calls? Which methods facilitate recursion?

fig_01_40 Function call: example: fig_01_41

LC-3 Data Path Filled arrow = info to be processed. Unfilled arrow = control signal.

Instruction Processing Cycle Decode instruction Evaluate address Fetch operands from memory Execute operation Store result Fetch instruction from memory Q: what about interrupts?

fig_01_46 Different viewpoint: RTL: register-transfer language level

fig_01_52 RTL VIEW fig_01_53

fig_01_57 Multiple levels--examples

fig_01_58

table_01_03

ALU M MA IRACCFMDIAIBPC ABUS OBUS BBUS ALU OUTPUT M: memory MA: memory address register MD: memory data register IR: instruction register AC: accumulator CF: carry flag IA, IB: index registers (13 bit) PC: program counter Instruction format: Op code (3) Addr Mode (2) Address (13) Functionality: 2's complement add, subtract, multiply, and divide, and, or, not jumps (conditional and unconditional), simple subroutine call and return Interrupts I/O Ex 2: Minimal hardware resources  high degree of functionality What should instructions be?