EE108b Review Session February 2nd, 2007 Daxia Ge.

Slides:



Advertisements
Similar presentations
CSC 4181 Compiler Construction Code Generation & Optimization.
Advertisements

Machine cycle.
CPU Review and Programming Models CT101 – Computing Systems.
Computer Architecture Lecture 7 Compiler Considerations and Optimizations.
Chapter 2 Instructions: Language of the Computer
Computer Architecture I - Class 9
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
Computer Structure - Datapath and Control Goal: Design a Datapath  We will design the datapath of a processor that includes a subset of the MIPS instruction.
Shift Instructions (1/4)
Processor I CPSC 321 Andreas Klappenecker. Midterm 1 Thursday, October 7, during the regular class time Covers all material up to that point History MIPS.
S. Barua – CPSC 440 CHAPTER 5 THE PROCESSOR: DATAPATH AND CONTROL Goals – Understand how the various.
Computer Science 210 Computer Organization The Instruction Execution Cycle.
ITEC 352 Lecture 20 JVM Intro. Functions + Assembly Review Questions? Project due today Activation record –How is it used?
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 12 Overview and Concluding Remarks.
Processor: Datapath and Control
The Central Processing Unit (CPU) and the Machine Cycle.
Computer Organization and Architecture Instructions: Language of the Machine Hennessy Patterson 2/E chapter 3. Notes are available with photocopier 24.
EE472 – Spring 2007P. Chiang, with Slide Help from C. Kozyrakis (Stanford) ECE472 Computer Architecture Lecture #3—Oct. 2, 2007 Patrick Chiang TA: Kang-Min.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
CS61C L20 Datapath © UC Regents 1 Microprocessor James Tan Adapted from D. Patterson’s CS61C Copyright 2000.
Elements of Datapath for the fetch and increment The first element we need: a memory unit to store the instructions of a program and supply instructions.
Lecture 2: Instruction Set Architecture part 1 (Introduction) Mehran Rezaei.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
CS161 – Design and Architecture of Computer Systems
Assembly language.
CS 230: Computer Organization and Assembly Language
MIPS Instruction Set Advantages
CS2100 Computer Organisation
Control Unit Lecture 6.
ARM Organization and Implementation
Gunjeet Kaur Dronacharya Group of institutions
Instruction Set Architecture
Morgan Kaufmann Publishers
ELEN 468 Advanced Logic Design
Morgan Kaufmann Publishers The Processor
Morgan Kaufmann Publishers
RISC Concepts, MIPS ISA Logic Design Tutorial 8.
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Morgan Kaufmann Publishers The Processor
CDA 3101 Spring 2016 Introduction to Computer Organization
Computer Science 210 Computer Organization
CS/COE0447 Computer Organization & Assembly Language
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Figure 8.1 Architecture of a Simple Computer System.
Instructions - Type and Format
Computer Science 210 Computer Organization
Single-Cycle CPU DataPath.
The University of Adelaide, School of Computer Science
CSCE Fall 2013 Prof. Jennifer L. Welch.
CSC 3210 Computer Organization and Programming
Figure 8.1 Architecture of a Simple Computer System.
Topic 5: Processor Architecture Implementation Methodology
Rocky K. C. Chang 6 November 2017
The Processor Lecture 3.2: Building a Datapath with Control
Guest Lecturer TA: Shreyas Chand
Topic 5: Processor Architecture
Unit 12 CPU Design & Programming
Daxia Ge Friday February 9th, 2007
Instruction Execution Cycle
COMS 361 Computer Organization
MARIE: An Introduction to a Simple Computer
Lecture 14: Single Cycle MIPS Processor
CSCE Fall 2012 Prof. Jennifer L. Welch.
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
ARM ORGANISATION.
Chapter 7 Microarchitecture
Chapter 7 Microarchitecture
Guest Lecturer: Justin Hsia
9/27: Lecture Topics Memory Data transfer instructions
Presentation transcript:

EE108b Review Session February 2nd, 2007 Daxia Ge

Admin Quiz #1 Office hours Tuesday, 7 – 9 pm Bldg 420-041 (look on website for map and directions) Covers lectures 1-7 (no pipelining) One page of notes, green card, calculator Office hours No lecture Tuesday! Professor Kozyrakis will have office hours during that time Sunday 4:00pm (Daxia), Monday 3:00pm (Drew), Tuesday 1:00pm (Yi)

Quiz #1 (lectures 1-7) MIPS assembly language Performance Software Execution time Amdahl’s Law Benchmarks Software Compiling process Optimizations and common techniques Processor Single cycle building blocks

Translation hierarchy Compiler: High-level language in, assembly out Performs assembly code optimization Assembler: Assembly in, machine code out Expands macros and pseudoinstructions Outputs object file (machine code) Linker: Resolves references Libraries Loader: initializes the program CPU: execution

Optimizations High Level -close to the source -loop inversion / loop unrolling -> why useful? Local - Constant folding (combining constants and arithmetic operations) - Constant propagation - Strength reduction - Common sub-expression elimination - Induction variable elimination - Leaf procedures – no need for stack - Registers! Global - Much the same as local, but not confined to basic blocks Processor dependent - knowledge of specific architecture (cache line size, L1, L2) - ie AMD Opteron flag for gcc

MIPS processor The basic ALU Combinational blocks Gate delays 5 steps in carrying out an instruction: Instruction fetch - Execution Instruction decode - Data write back Data load Strongly tied to instruction format in machine code

Pipelining Improve resource utilization Increases throughput Data and control signals have to be propagated

Example Problem: Processor Design It happens quite often that we wish to index through and access each element of an array. Absent from MIPS, but present in other assembly languages/instruction sets are load/store commands which also increment the indexing register. For example, lwinc $rt, offset($rs) would perform the normal load and subsequently increment $rs by 4. Please either describe in words, or show in the figure below, all necessary modifications needed to support these instructions in the single-cycle MIPS processor discussed in lecture. Remember the load/store instruction format (unchanged for lwinc): load / store Rs Rt Offset 31:26 25:21 20:16 15:0

Example problem: Solution The datapath requires an additional ALU to increment the content of the $ rs register (Read data 1) by 4. The output of this is fed back to the register file, which needs a second write port because two writes to the register are required in a single cycle. The new write port will be controlled by a new signal, "Write 2." We assume that the destination register for the second write is always the same as Read register 1 ($ rs). This way "Write 2" indicates that there is second write to register file to the register identified by "Read register1," and the data is fed through Write data 2. Incorrect answers include adding a second register file since then the contents of the two would have to be kept consistent.