Exam-like questions.

Slides:



Advertisements
Similar presentations
1 Datapath and Control (Multicycle datapath) CDA 3101 Discussion Section 11.
Advertisements

331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
The Processor: Datapath & Control
Lec 17 Nov 2 Chapter 4 – CPU design data path design control logic design single-cycle CPU performance limitations of single cycle CPU multi-cycle CPU.
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.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
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.
The Processor Andreas Klappenecker CPSC321 Computer Architecture.
Computer Organization CS224 Fall 2012 Lesson 26. Summary of Control Signals addsuborilwswbeqj RegDst ALUSrc MemtoReg RegWrite MemWrite Branch Jump ExtOp.
Chapter 4 CSF 2009 The processor: Building the datapath.
Processor: Datapath and Control
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
Computer Architecture
ECE 445 – Computer Organization
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /19/2013 Lecture 17: The Processor - Overview Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
Datapath Design Computer Organization I 1 August 2009 © McQuain, Feng & Ribbens Composing the Elements First-cut data path does an instruction.
W.S Computer System Design Lecture 4 Wannarat Suntiamorntut.
MIPS processor continued. In Class Exercise Question Show the datapath of a processor that supports only R-type and jr reg instructions.
1  2004 Morgan Kaufmann Publishers Chapter Five.
By Wannarat Computer System Design Lecture 4 Wannarat Suntiamorntut.
1  1998 Morgan Kaufmann Publishers Simple Implementation Include the functional units we need for each instruction Why do we need this stuff?
COM181 Computer Hardware Lecture 6: The MIPs CPU.
MIPS processor continued. Performance Assume that – Memory access: 200ps – ALU and adders: 100 ps – Register file read: 50ps – Register file write: 10ps.
MIPS Processor.
MIPS processor continued. Review Different parts in the processor should be connected appropriately to be able to carry out the functions. Connections.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
CS161 – Design and Architecture of Computer Systems
CS161 – Design and Architecture of Computer Systems
Single-Cycle Datapath and Control
CSCI206 - Computer Organization & Programming
Morgan Kaufmann Publishers
Morgan Kaufmann Publishers The Processor
Morgan Kaufmann Publishers
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Morgan Kaufmann Publishers The Processor
MIPS Processor.
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
Design of the Control Unit for Single-Cycle Instruction Execution
MIPS processor continued
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Single-Cycle CPU DataPath.
Design of the Control Unit for One-cycle Instruction Execution
CSCI206 - Computer Organization & Programming
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
MIPS Processor.
CSCI206 - Computer Organization & Programming
Topic 5: Processor Architecture Implementation Methodology
Rocky K. C. Chang 6 November 2017
Composing the Elements
Composing the Elements
The Processor Lecture 3.2: Building a Datapath with Control
The Processor Lecture 3.1: Introduction & Logic Design Conventions
Topic 5: Processor Architecture
Systems Architecture I
COMS 361 Computer Organization
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Pipelining: Basic Concepts
Counters.
Data Path Diagrams.
MIPS processor continued
Instructors: Randy H. Katz David A. Patterson
The Processor: Datapath & Control.
COMS 361 Computer Organization
Problem ??: (?? marks) Consider executing the following code on the MIPS pipelined datapath: add $t5, $t6, $t8 add $t9, $t5, $t4 lw $t3, 100($t9) sub $t2,
MIPS Processor.
Processor: Datapath and Control
CS161 – Design and Architecture of Computer Systems
Presentation transcript:

Exam-like questions

Write the machine code for the following assembly code L0:add $0, $1, $2 sub $3, $3, $1 lw $3, 12($0) beq $3, $0, L1 add $3, $3, $1 sw $3, 0($3) L1:beq $0, $0, L0 Opcode -- add: 000000, sub: 000000, lw: 100011, sw: 101011, beq: 000100 Funct -- add: 100000, sub: 100010 000000 00001 00010 00000 00000 100000 000000 00011 00001 00011 00000 100010 100011 00000 00011 0000000000001100 000100 00011 00000 0000000000001000 000000 00011 00001 00011 00000 100000 101011 00011 00011 0000000000000000 000100 00000 00000 1111111111100100 Remember, labels are relative to PC+4 in a branch instruction

(a). Watch the ordering on questions like this

The sequence generated is 0,2,2,2,2,2,…

Problem (d).

Problem (d). Our datapath can do this, and we can fit it into an instruction. Putting this into a pseudo-instruction can be done in 2 instructions. (address calculation, then load)

Sample written #1 Design a circuit that has two inputs, clk and X, and produces one output O. X may change every clock cycle, and the change happens at the falling edge. The circuit samples the input at every rising edge of the clock. If the input is 1, consider as read a 1, else read a 0. O is 1 (for one clock cycle, from positive edge to positive edge) if the last three bits read are 110, with 0 as the most recent bit. Draw the state diagram. Close to an arc, show X=1 or X=0 to indicate whether the change of state happens when X=1 or when X=0. Draw the next-state table, and derive the functions for D1 and D0 from the table Simplify functions D1 and D0 Derive the output function O. Draw the circuit See HW6 part 2 for most of this (except drawing circuit)

Assume that How fast is Memory access: 200ps ALU and adders: 100 ps What should the clock be set to, assuming the following timings: Assume that Memory access: 200ps ALU and adders: 100 ps Register file read: 50ps Register file write: 50ps (the clk-to-q delay) PC update: 10ps (the clk-to-q delay) The setup time of DFFs: 10ps Other parts do not have delay What is the critical path? How fast is An R-type instruction? A jmemi instruction?