More Intel machine language and one more look at other architectures.

Slides:



Advertisements
Similar presentations
CPU Structure and Function
Advertisements

8086 Ahad.
Execution Cycle. Outline (Brief) Review of MIPS Microarchitecture Execution Cycle Pipelining Big vs. Little Endian-ness CPU Execution Time 1 IF ID EX.
Instruction Set Design
RISC and Pipelining Prof. Sin-Min Lee Department of Computer Science.
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
Computer Architecture Lecture 2 Abhinav Agarwal Veeramani V.
Lecture Objectives: 1)Define pipelining 2)Calculate the speedup achieved by pipelining for a given number of instructions. 3)Define how pipelining improves.
ELEN 468 Advanced Logic Design
Processor Technology and Architecture
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
Vacuum tubes Transistor 1948 –Smaller, Cheaper, Less heat dissipation, Made from Silicon (Sand) –Invented at Bell Labs –Shockley, Brittain, Bardeen ICs.
RISC. Rational Behind RISC Few of the complex instructions were used –data movement – 45% –ALU ops – 25% –branching – 30% Cheaper memory VLSI technology.
Overview The von Neumann Machine - the programmable digital computer Introducing the LC-3 Computer - A “toy” computer for us to learn from Computer machine.
A Closer Look at Instruction Set Architectures
(6.1) Central Processing Unit Architecture  Architecture overview  Machine organization – von Neumann  Speeding up CPU operations – multiple registers.
Chapter 5: ISAs In MARIE, we had simple instructions –4 bit op code followed by either 12 bit address for load, store, add, subt, jump 2 bit condition.
Operand Addressing and Instruction Representation
Computer Science 210 Computer Organization The Instruction Execution Cycle.
Computer Organization
Part 1.  Intel x86/Pentium family  32-bit CISC processor  SUN SPARC and UltraSPARC  32- and 64-bit RISC processors  Java  C  C++  Java  Why Java?
Instruction Sets and Pipelining Cover basics of instruction set types and fundamental ideas of pipelining Later in the course we will go into more depth.
Computer Organization and Architecture Reduced Instruction Set Computers (RISC) Chapter 13.
Basic Microcomputer Design. Inside the CPU Registers – storage locations Control Unit (CU) – coordinates the sequencing of steps involved in executing.
Instruction Set Architecture
1 4.2 MARIE This is the MARIE architecture shown graphically.
What have mr aldred’s dirty clothes got to do with the cpu
CS 147 June 13, 2001 Levels of Programming Languages Svetlana Velyutina.
Chapter 5 A Closer Look at Instruction Set Architectures.
Computer architecture Lecture 11: Reduced Instruction Set Computers Piotr Bilski.
RISC By Ryan Aldana. Agenda Brief Overview of RISC and CISC Features of RISC Instruction Pipeline Register Windowing and renaming Data Conflicts Branch.
RISC Architecture RISC vs CISC Sherwin Chan.
Part 1.  Intel x86/Pentium family  32-bit CISC processor  SUN SPARC and UltraSPARC  32- and 64-bit RISC processors  Java  C  C++  Java  Why Java?
Instruction Set Architecture The portion of the machine visible to the programmer Issues: Internal storage model Addressing modes Operations Operands Encoding.
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
Ted Pedersen – CS 3011 – Chapter 10 1 A brief history of computer architectures CISC – complex instruction set computing –Intel x86, VAX –Evolved from.
ECEG-3202 Computer Architecture and Organization Chapter 7 Reduced Instruction Set Computers.
8086 Internal Architecture
CS61C L20 Datapath © UC Regents 1 Microprocessor James Tan Adapted from D. Patterson’s CS61C Copyright 2000.
Fundamentals of Programming Languages-II
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
RISC / CISC Architecture by Derek Ng. Overview CISC Architecture RISC Architecture  Pipelining RISC vs CISC.
BASIC COMPUTER ARCHITECTURE HOW COMPUTER SYSTEMS WORK.
Instruction Set Architectures Continued. Expanding Opcodes & Instructions.
Electrical and Computer Engineering University of Cyprus
A Closer Look at Instruction Set Architectures
Assembly language.
Central Processing Unit Architecture
A Closer Look at Instruction Set Architectures
A Closer Look at Instruction Set Architectures
ELEN 468 Advanced Logic Design
Advanced Topic: Alternative Architectures Chapter 9 Objectives
Computer Science 210 Computer Organization
MIPS Assembly.
Computer Science 210 Computer Organization
CS170 Computer Organization and Architecture I
CISC AND RISC SYSTEM Based on instruction set, we broadly classify Computer/microprocessor/microcontroller into CISC and RISC. CISC SYSTEM: COMPLEX INSTRUCTION.
CSCI206 - Computer Organization & Programming
5.6 Real-World Examples of ISAs
PZ01C - Machine architecture
Introduction to Microprocessor Programming
Addressing mode summary
Computer Architecture
A Level Computer Science Topic 5: Computer Architecture and Assembly
Chapter 4 The Von Neumann Model
Presentation transcript:

More Intel machine language and one more look at other architectures

Data manipulation instructions Includes: add, sub, cmp, and, or, not First operand is a register; second may require memory fetch Takes 8-17 clock cycles, as described on next slide

Data manipulation instructions 1.Fetch instruction (1) 2.Update IP (1) 3.Decode (1) 4.If required fetch operand from memory if [BX] mode: (0) if [xxxx], [xxxx+ BX] or xxxx & address is even: (1) if xxxx & address odd: (2) 5.If required, update IP to point beyond operand (0-1)

Data manipulation instructions 6.Compute address of operand if not [BX] or [xxxx+BX]: (0) if [BX]: (1) if [xxxx+BX]: (2) 7.Get value of operand & send to ALU if constant: (0) if register: (1) if word-aligned RAM: (2) if odd-addressed RAM: (3)

Data manipulation instructions 8.Fetch value of first operand (register) & send to ALU (1) 9.Perform operation (1) 10.Store result in 1 st operand (register) (1)

Data movement operation with RAM destination Takes 5-11 clock cycles As with most instructions, the variation is due to the number of memory fetches that may be required during execution

MOV memory location, register 1.Fetch instruction (1) 2.Update IP to point to next byte (1) 3.Decode instruction 4.If required, fetch operand from memory (0-2) 5.If required, update IP to point beyond operand (0-1: 0 if no operand) 6.Compute opened address, if necessary (0-2) 7.Get value (of register) to store (1) 8.Store fetched value into destination (1-3)

Fetch/execute cycle & pipelining In the examples weve looked at this far, an underlying theme has been the use of one or more clock cycles per instruction, with additional cycles necessary to control details within certain steps Modern CPUs break the fetch/execute cycle into smaller steps, some of which can be performed in parallel, speeding up execution This method of overlapping instructions is called pipelining

Pipelining We can break the fetch/execute cycle into 6 general steps: –Fetch instruction –Decode –Calculate operand address(es) –Fetch operands –Execute instruction –Store result Each step can be considered a pipeline stage; goal is to balance time taken by each stage, so that slower ports of process dont bog down faster parts

Standard von Neumann model vs. pipelining Source:

Pipelining issues Although not all instructions require every stage of pipeline (e.g. no operand) all instructions proceed through all stages Pipeline conflicts: –resource conflicts –data dependencies –conditional branch statements

Intel & pipelining were single-stage pipeline architectures Pentium: 2 five-stage pipelines –Pentium II increased to 12 (mostly for MMX) –Pentium III: 14 –Pentium IV: 24

MIPS: a RISC architecture Little-endian Word-addressable Fixed-length instructions Load-store architecture: –only LOAD & store operations have RAM access –all other instructions must have register operands –requires large register set 5 or 8 stage pipelining

One more architecture: the Java Virtual Machine Java compiler is platform-independent: makes no assumptions about characteristics of underlying hardware JVM required to run Java byte code Works as a wrapper around a real machines architecture– so the JVM itself is extremely platform dependent

How it works Java compiler translates source code into JBC JVM acts as interpreter - translates specific byte codes into machine instructions specific to the harbor platform its running on Acts like giant switch/case structure: each bytecode instruction triggers jump to a specific block of code that implements the instruction in the architectures native machine language

Characteristics of JVM and JBC Stack-based language & machine Instructions consist of one-byte opcode followed by 0 or more operands 4 registers

Characteristics of JVM and JBC All memory references based on register offsets - neither pointers nor absolute addresses are used No general-purpose registers –means more memory fetches, detrimental to performance –tradeoff is high degree of portability