EE457. Note: Parts of the solutions are extracted from the solutions manual accompanying the text book.
|
|
- Quentin Long
- 5 years ago
- Views:
Transcription
1 EE457 Instructor: G. Puvvada ======================================================================= Homework 5b, Solution ======================================================================= Note: Parts of the solutions are extracted from the solutions manual accompanying the text book. Part I (2nd Edition) addi: No change to datapath is needed. The existing datapath is sufficient. The execution steps for addi would be Instruction fetch (Unchanged) Instruction decode and register fetch (Unchanged) Execution: ALUOut = A + sign-extend ( IR[ 15-0 ] ); Instruction completion: Reg[ IR[ ] ] = ALUOut The first three steps are identical to those performed for memory access instructions, so we can use them (we must add Op = 'addi' to the transition from state 1 to state 2). The fourth step is different and it is not like any existing step; thus we must add a new state to our finite state machine (i.e. state 10). The changed state diagram is on the next page. 1/11
2 Op = addi or 10 Op = addi RegDst = 0 RegWrite = 1 MemtoReg = (3rd Edition) jal: The existing datapath is insufficient. We already have a way to change the PC based on the specified address (using the datapath for jump instruction), but we'll need a new way to put PC+4 into register $ra(31), and this will require changing the datapath. We'll need to expand the two multiplexors controlled by RegDst and MemtoReg. The execution steps would be Instruction fetch (Unchanged) Instruction decode and register fetch (Unchanged) jal: Reg[31] = PC; PC = PC[ ] ( IR[ 25-0 ] << 2 ); Note that in this case we are writing the PC after it has already been incremented by 4 ( in the instruction fetch step) into register $ra ( thus the datapath requires that PC be an input to the MemtoReg multiplexor and 31 needs to be an input to the RegDst multiplexor). We need to modify existing states to show proper values of RegDst and Memtoreg and add a new state that performs the jal instruction ( and then returns to state 0). 2/11
3 The above textbook solution is proposing to change the two 2-to-1 muxes previously controlled by RegDst and MemtoReg to two 3-to muxes to be controlled by new 2-bit control signals RegDst[1:0] and MemtoReg[1:0]. Instead of changing each of these 2-to-1 muxes to a 3-to-1 mux, we felt that it would be easier for students to understand the datapath if we cascaded another 2-to-1 mux (controlled by jal) after the existing 2-to-1 mux. This design is shown on the next page. The corresponding revised state diagram is shown here. (Op = jal ) 10 PCWrite = 1 PCSource=10 RegWrite=1 MemtoReg=X RegDst=X jal =1 jal =0 Note Note jal =0 Note 3/11
4 jal /11
5 5.43. (3rd Edition) wai: There are a variety of implementation options. In state 0 the PC is incremented by 4, so we must subtract 4 from the PC and put this value in a register. This requires two new states (10 and 11). There would be an arrow from state 1 to state 10 labeled Op = 'wai', and there should be unconditional arrows from state 10 to state 11 and from state 11 to state 0. State 10 accomplishes ALUOut = PC - 4 (ALUSrcA = 0, ALUSrcB = 01, and ALUOp = 01) and state 11 accomplishes Reg[IR[20-16]] = ALUout (RegDst = 0, MemtoReg = 0, and RegWrite = 1). An alternative solution relies on the format assumption that '-1' is put in the 16-bit immediate value, and the calculation of the branch address actually computes the PC. This clever solution reduces the number of needed states by 1. First Solution (Op= wai ) 10 ALUSrcA=0 ALUSrcB=01 ALUop = RegDst = 0 MemtoReg=0 regwrite = 1 5/11
6 5.44. (3rd Edition) jm: The existing datapath is insufficient. The jump memory instruction behaves much like a load word until the memory is read. We will add a new input to the multiplexor controlled by PCSource to take the memory contents to the PC. Two methods are covered here. 1. Not so efficient method: The data coming out of memory is deposited first into the MDR in state 3. We need to copy MDR into the PC in a new state coming off of state 3 that checks for Op = "jump memory" (and modify the transition to state 4 to ensure Op = 'lw'). The new state has PCWrite = 1, PCSource = 11. The transitions from (a) state 1 to state 2 and (b) state 2 to state 3 need to also include Op = 'jm'. 2. A more efficient method: Since PC is a stand-alone register and can be written at the end of a clock/state, the new state can be a branch-off from state 2 and can include reading of the memory as well as transferring the contents to the PC directly without having to go through MDR. This save one clock in executing the jm instruction. Method 1 state diagram or (Op = jm ) or (Op = jm ) (Op = jm ) PCwrite =1 \ PCSource=11 (Op = lw ) 6/11
7 Method 1 DPU Method 2 DPU 7/11
8 Method 2 state diagram or (Op = jm ) (Op = jm ) MemRead IorD =1 PCwrite =1 PCSource=11 8/11
9 ee457_homework_5b_sol.fm 10/10/ (3rd Edition) add3: The existing datapath is insufficient. The instruction will require using the ALU twice. A multiplexor should be added to permit the ALU to use the previous result produced by the ALU (stored in ALUOut) as an input for the second addition. Note that changes will also be needed for register read. The instruction can be implemented in 5 cycles by reading the third register source during the cycle in which the first addition is taking place. Clearly a multiplexor and a new control signal will be needed for the inputs to one of the register read ports. Please notice how cleverly the add3 control signal is used in the 6 states below. Note: add3 = X if it is not mentioned in a particular state. add3 = 0 (Op= add3 ) 10 add3 = 1 add3 = 1 add3 = 1 ALUSrcA=1 ALUSrcB=00 ALUop = 00 add3 = 1 11 ALUSrcA=1 ALUSrcB=00 ALUop = 00 add3 = 0 9/11
10 Please note the two new multiplexers under the control of the new control signal add3. ee457_homework_5b_sol.fm 10/10/05 10/11
11 5.45. (3rd Edition) add3: The existing datapath is insufficient. The instruction will require using the ALU twice. A multiplexor should be added to permit the ALU to use the previous result produced by the ALU (stored in ALUOut) as an input for the second addition. Note that changes will also be needed for register read. The instruction can be implemented in 5 cycles by reading the third register source during the cycle in which the first addition is taking place. Clearly a multiplexor and a new control signal will be needed for the inputs to one of the register read ports. Please notice how cleverly the add3 control signal is used in the 5 states below. Note: ADD3 = X if it is not mentioned in a particular state. ADD3 = 1 MUX#1 (Op= add3 ) 10 ALUSrcA=1 ALUSrcB=00 ALUop = 00 ADD3 = X MUX#1 11 ALUSrcA=1 ALUSrcB=00 ALUop = 00 ADD3 = 1 you need (rt) as mem data In state 1, ADD3=1 makes sure that the 5-bit Rs address is conveyed to the register file read address 1input. In states 6, 8, 10, ADD3=0 makes sure that the content of (rt) in the B register is conveyed to the ALU. In state 10, while (rt) is used in the ALU, the same ADD3=0 arranges the 3rd read register ID (Instr [4:0]) to be conveyed to the read address 1 input. In the state 11, ADD3 = 1 causes the previous partial sumto be returned to the B-leg of the ALU while the contents of the 3rd source reg. in the A register are simultaneously conveyed to the A-leg of the ALU. The ADD3 can be X in state 2 as B-leg of the ALU gets sign-extended offset and A-leg gets (rs) from A. In the next clock in state 5, we need (rt) for conveying it as write data for the memory for the sw instruction. ADD3 value interferes in no way with this aspect. 9/11
12 Please note the two new multiplexers under the control of the new control signal ADD3. MUX #2 MUX #1 10/11
13 A better (simpler and cleaner) design Mr. Aaron Black of Fall 2016 EE457 class, says, he understands the corrected solution in the previous pages but he does not like it! He does not like it because he has a simpler and cleaner solution! I agreed with him after going through his solution. I want all students to go through it in the next two pages. Basically the previous solution affects operation in two separate clocks: the clock to fetch the data from a register and the clock to utilize the data. Aaron has avoided this and made it easy to understand and easy to implement it! He deposited the result of the first partial sum (rs + rt) in the B register instead of the ALUOut Register by intercepting the input of register B with a 32-bit mux (Mux #2) under the control of ADD3. So ADD3 is arranging $R3 content in the A register and partial Sum in the B register, both in the same clock!
14 A Simpler and Cleaner Design by Mr. Aaron Black of Fall 2016 EE457 class Mux#1 can be moved to the Rt ID path and Mux#2 can be moved to the Rs content path and the state diagram on the next page does not have to be changed! ADD3 1 Mux#1 1 Mux#2
15 A Simpler and Cleaner Design by Mr. Aaron Black of Fall 2016 EE457 class Except in the three states, 1, 2, and 10, ADD3 can be a don t care in other states. ALUSrcA = 1 ALUSrcB = 00 ALUOp = 00 ADD3 = 1 10 ALUSrcA = 1 ALUSrcB = 00 ALUOp = 00 11
16 ee457_mt_fall2012.fm 2 ( 72 points) 50 min. "add3" instruction in HW#5b and Multicycle CPU design from the 1st and 2nd editions: 2.1 Reproduced below (and on next page) are state diagram and the datapath of the 2nd edition design as modified in HW#5b to support an "add3" instruction. Note: ADD3 = X if it is not mentioned in a particular state. ADD3 = 1 MUX#1 (Op= add3 ) 10 ALUSrcA=1 ALUSrcB=00 ALUop = 00 ADD3 = X MUX#1 11 ALUSrcA=1 ALUSrcB=00 ALUop = 00 ADD3 = 1 you need (rt) as mem data Your junior engineer, Miss Bruin, made a mistake in the datapath layout and made the tapping for the Write data for Memory from the downstream of MUX #2 as shown on the next page. You are the project manager and you need to make one of the following choices. (A) It does not matter if the tapping is upstream or downstream. (B) It matters and there is no fix for this error and hence Miss Bruin has to redo the layout. (C) It matters, but Miss Trojan can fix it in the above state diagram for the control unit. Your choice is:. Explain your choice if it (A) or (B). Carry-out the revision to the state diagram if your choice is (C). November 1, :03 pm EE457 Midterm Exam - Fall 2012 Page - 7 / 13 C Copyright 2012 Gandhi Puvvada
17 ee457_mt_fall2012.fm Our s Miss Bruin s MUX #2 MUX #2 MUX #1 MUX #1 November 1, :10 pm EE457 Midterm Exam - Fall 2012 Page - 8 / 13 C Copyright 2012 Gandhi Puvvada
18 ee457_mt_fall2012.fm Let us go back to our datapath. Someone modified our state diagram for "add3" as shown below and called his instruction "add4_sw" for "add4_storeword". Reverse engineer and find out what does this "add4_sw"actually does. Note: ADD3 = X if it is not mentioned in a particular state. ADD3 = 1 MUX#1 (Op= add4_sw ) 10 ALUSrcA=1 ALUSrcB=00 ALUop = 00 ADD3 = X MUX#1 11 ALUSrcA=1 ALUSrcB=00 ALUop = 00 ADD3 = 1 you need (rt) as mem data MUX#1 ALUSrcA=1 ALUSrcB=01 ALUop = 01 Note! ADD3 = Reproduced on the next two pages are the 1st edition state diagram and the datapath. The datapath was modified partially by a senior EE560 Trojan to support the "add3" instruction. Since there isn t any ALU_out register, he has used the Target register to hold the intermediate sum. He has added the A and B registers at the output of the Register file like in the 2nd edition. Notice that the two new muxes have separate controls: ADD3R to control register ID selection and ADD3A to select the ALU input selection. The datapath modification is complete. You need to complete the state diagram. Write ADD3R and ADD3A values for the 0 to 9 states and also complete states 10, 11, and 12. November 1, :03 pm EE457 Midterm Exam - Fall 2012 Page - 9 / 13 C Copyright 2012 Gandhi Puvvada
19 ee457_mt_fall2012.fm 1st edition state diagram to be modified by you. Fill-in values 0 or 1 or X (prefer X whenever possible). (Op= add3 ) 10 ALUSelA= ALUSelB= ALUop = TargetWrite = 1 11 ALUSelA= ALUSelB= ALUop = 12 ALUSelA= ALUSelB= ALUop = MemtoReg = 0 RegWrite November 1, :03 pm EE457 Midterm Exam - Fall 2012 Page - 10 / 13 C Copyright 2012 Gandhi Puvvada
20 ee457_mt_fall2012.fm Datapath modification to support "add3" is completed already. November 1, :03 pm EE457 Midterm Exam - Fall 2012 Page - 11 / 13 C Copyright 2012 Gandhi Puvvada
21 Part II (3rd Edition) stuck-at-0 fault: If RegDst = 0, all R-format instructions will be unable to write into the proper register (rd). If MemtoReg = 0, load (lw) will not work. If IorD = 0 load (lw) and store (sw) will not work. Further sw will write into (and corrupt) code area. If ALUSrcA = 0, none of the instructions needing rs register will work properly because we are now conveying (PC) in place of (rs) (3rd Edition) stuck-at-1 fault If RegDst = 1, load instructions will not work. If MemtoReg = 1, all R-format instructions will not work. If IorD = 1, no instruction will work because the PC will never be used to get an instruction. If ALUSrcA = 1, the program counter will not be properly incremented by 4 and essentially all instructions will not work. 11/11
Chapter 5 Solutions: For More Practice
Chapter 5 Solutions: For More Practice 1 Chapter 5 Solutions: For More Practice 5.4 Fetching, reading registers, and writing the destination register takes a total of 300ps for both floating point add/subtract
More informationCSE 2021: Computer Organization Fall 2010 Solution to Assignment # 3: Multicycle Implementation
CSE 2021: Computer Organization Fall 2010 Solution to Assignment # 3: Multicycle Implementation Note that these questions are taken from the previous final exmas of CSE2021 and should serve as practice
More informationProcessor: Multi- Cycle Datapath & Control
Processor: Multi- Cycle Datapath & Control (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann, 27) COURSE
More informationEE457 Lab 4 Part 4 Seven Questions From Previous Midterm Exams and Final Exams ee457_lab4_part4.fm 10/6/04
EE457 Lab 4 Part 4 Seven Questions From Previous Midterm Exams and Final Exams ee457_lab4_part4.fm 10/6/04 1 [Based on Question #7 of Summer 1993 Midterm] Remove TARGET register, add ZERO FF: Please refer
More informationCPE 335. Basic MIPS Architecture Part II
CPE 335 Computer Organization Basic MIPS Architecture Part II Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides http://www.abandah.com/gheith/courses/cpe335_s08/index.html CPE232 Basic MIPS Architecture
More informationCSE 2021 COMPUTER ORGANIZATION
CSE 22 COMPUTER ORGANIZATION HUGH CHESSER CHESSER HUGH CSEB 2U 2U CSEB Agenda Topics:. Sample Exam/Quiz Q - Review 2. Multiple cycle implementation Patterson: Section 4.5 Reminder: Quiz #2 Next Wednesday
More informationInf2C - Computer Systems Lecture 12 Processor Design Multi-Cycle
Inf2C - Computer Systems Lecture 12 Processor Design Multi-Cycle Boris Grot School of Informatics University of Edinburgh Previous lecture: single-cycle processor Inf2C Computer Systems - 2017-2018. Boris
More informationCSE 2021 COMPUTER ORGANIZATION
CSE 2021 COMPUTER ORGANIZATION HUGH LAS CHESSER 1012U HUGH CHESSER CSEB 1012U W10-M Agenda Topics: 1. Multiple cycle implementation review 2. State Machine 3. Control Unit implementation for Multi-cycle
More informationECE 313 Computer Organization FINAL EXAM December 14, This exam is open book and open notes. You have 2 hours.
This exam is open book and open notes. You have 2 hours. Problems 1-4 refer to a proposed MIPS instruction lwu (load word - update) which implements update addressing an addressing mode that is used in
More informationLecture 5 and 6. ICS 152 Computer Systems Architecture. Prof. Juan Luis Aragón
ICS 152 Computer Systems Architecture Prof. Juan Luis Aragón Lecture 5 and 6 Multicycle Implementation Introduction to Microprogramming Readings: Sections 5.4 and 5.5 1 Review of Last Lecture We have seen
More informationMulti-cycle Approach. Single cycle CPU. Multi-cycle CPU. Requires state elements to hold intermediate values. one clock cycle or instruction
Multi-cycle Approach Single cycle CPU State element Combinational logic State element clock one clock cycle or instruction Multi-cycle CPU Requires state elements to hold intermediate values State Element
More informationLECTURE 6. Multi-Cycle Datapath and Control
LECTURE 6 Multi-Cycle Datapath and Control SINGLE-CYCLE IMPLEMENTATION As we ve seen, single-cycle implementation, although easy to implement, could potentially be very inefficient. In single-cycle, we
More informationCC 311- Computer Architecture. The Processor - Control
CC 311- Computer Architecture The Processor - Control Control Unit Functions: Instruction code Control Unit Control Signals Select operations to be performed (ALU, read/write, etc.) Control data flow (multiplexor
More informationPoints available Your marks Total 100
CSSE 3 Computer Architecture I Rose-Hulman Institute of Technology Computer Science and Software Engineering Department Exam Name: Section: 3 This exam is closed book. You are allowed to use the reference
More informationRISC Processor Design
RISC Processor Design Single Cycle Implementation - MIPS Virendra Singh Indian Institute of Science Bangalore virendra@computer.org Lecture 13 SE-273: Processor Design Feb 07, 2011 SE-273@SERC 1 Courtesy:
More informationTopic #6. Processor Design
Topic #6 Processor Design Major Goals! To present the single-cycle implementation and to develop the student's understanding of combinational and clocked sequential circuits and the relationship between
More informationALUOut. Registers A. I + D Memory IR. combinatorial block. combinatorial block. combinatorial block MDR
Microprogramming Exceptions and interrupts 9 CMPE Fall 26 A. Di Blas Fall 26 CMPE CPU Multicycle From single-cycle to Multicycle CPU with sequential control: Finite State Machine Textbook Edition: 5.4,
More informationControl Unit for Multiple Cycle Implementation
Control Unit for Multiple Cycle Implementation Control is more complex than in single cycle since: Need to define control signals for each step Need to know which step we are on Two methods for designing
More informationSystems Architecture I
Systems Architecture I Topics A Simple Implementation of MIPS * A Multicycle Implementation of MIPS ** *This lecture was derived from material in the text (sec. 5.1-5.3). **This lecture was derived from
More informationProcessor (multi-cycle)
CS359: Computer Architecture Processor (multi-cycle) Yanyan Shen Department of Computer Science and Engineering Five Instruction Steps ) Instruction Fetch ) Instruction Decode and Register Fetch 3) R-type
More informationComputer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Data Paths and Microprogramming
Computer Science 324 Computer Architecture Mount Holyoke College Fall 2007 Topic Notes: Data Paths and Microprogramming We have spent time looking at the MIPS instruction set architecture and building
More informationECE 3056: Architecture, Concurrency and Energy of Computation. Single and Multi-Cycle Datapaths: Practice Problems
ECE 3056: Architecture, Concurrency and Energy of Computation Single and Multi-Cycle Datapaths: Practice Problems 1. Consider the single cycle SPIM datapath. a. Specify the values of the control signals
More informationRISC Architecture: Multi-Cycle Implementation
RISC Architecture: Multi-Cycle Implementation Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab Department of Electrical Engineering Indian Institute of Technology Bombay
More informationﻪﺘﻓﺮﺸﻴﭘ ﺮﺗﻮﻴﭙﻣﺎﻛ يرﺎﻤﻌﻣ MIPS يرﺎﻤﻌﻣ data path and ontrol control
معماري كامپيوتر پيشرفته معماري MIPS data path and control abbasi@basu.ac.ir Topics Building a datapath support a subset of the MIPS-I instruction-set A single cycle processor datapath all instruction actions
More informationSingle vs. Multi-cycle Implementation
Single vs. Multi-cycle Implementation Multicycle: Instructions take several faster cycles For this simple version, the multi-cycle implementation could be as much as 1.27 times faster (for a typical instruction
More informationAlternative to single cycle. Drawbacks of single cycle implementation. Multiple cycle implementation. Instruction fetch
Drawbacks of single cycle implementation Alternative to single cycle All instructions take the same time although some instructions are longer than others; e.g. load is longer than add since it has to
More informationECE369. Chapter 5 ECE369
Chapter 5 1 State Elements Unclocked vs. Clocked Clocks used in synchronous logic Clocks are needed in sequential logic to decide when an element that contains state should be updated. State element 1
More informationTHE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination
THE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination May 23, 2014 Name: Email: Student ID: Lab Section Number: Instructions: 1. This
More informationChapter 5: The Processor: Datapath and Control
Chapter 5: The Processor: Datapath and Control Overview Logic Design Conventions Building a Datapath and Control Unit Different Implementations of MIPS instruction set A simple implementation of a processor
More informationMajor CPU Design Steps
Datapath Major CPU Design Steps. Analyze instruction set operations using independent RTN ISA => RTN => datapath requirements. This provides the the required datapath components and how they are connected
More informationRISC Architecture: Multi-Cycle Implementation
RISC Architecture: Multi-Cycle Implementation Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab Department of Electrical Engineering Indian Institute of Technology Bombay
More informationENE 334 Microprocessors
ENE 334 Microprocessors Lecture 6: Datapath and Control : Dejwoot KHAWPARISUTH Adapted from Computer Organization and Design, 3 th & 4 th Edition, Patterson & Hennessy, 2005/2008, Elsevier (MK) http://webstaff.kmutt.ac.th/~dejwoot.kha/
More informationAdding Support for jal to Single Cycle Datapath (For More Practice Exercise 5.20)
Adding Support for jal to Single Cycle Datapath (For More Practice Exercise 5.20) The MIPS jump and link instruction, jal is used to support procedure calls by jumping to jump address (similar to j ) and
More informationECE Exam I - Solutions February 19 th, :00 pm 4:25pm
ECE 3056 Exam I - Solutions February 19 th, 2015 3:00 pm 4:25pm 1. (35 pts) Consider the following block of SPIM code. The text segment starts at 0x00400000 and the data segment starts at 0x10010000..data
More informationCSEN 601: Computer System Architecture Summer 2014
CSEN 601: Computer System Architecture Summer 2014 Practice Assignment 5 Solutions Exercise 5-1: (Midterm Spring 2013) a. What are the values of the control signals (except ALUOp) for each of the following
More informationEECE 417 Computer Systems Architecture
EECE 417 Computer Systems Architecture Department of Electrical and Computer Engineering Howard University Charles Kim Spring 2007 1 Computer Organization and Design (3 rd Ed) -The Hardware/Software Interface
More informationCS/COE0447: Computer Organization
CS/COE0447: Computer Organization and Assembly Language Datapath and Control Sangyeun Cho Dept. of Computer Science A simple MIPS We will design a simple MIPS processor that supports a small instruction
More informationCS/COE0447: Computer Organization
A simple MIPS CS/COE447: Computer Organization and Assembly Language Datapath and Control Sangyeun Cho Dept. of Computer Science We will design a simple MIPS processor that supports a small instruction
More informationThe Processor: Datapath & Control
Chapter Five 1 The Processor: Datapath & Control We're ready to look at an implementation of the MIPS Simplified to contain only: memory-reference instructions: lw, sw arithmetic-logical instructions:
More informationCO Computer Architecture and Programming Languages CAPL. Lecture 18 & 19
CO2-3224 Computer Architecture and Programming Languages CAPL Lecture 8 & 9 Dr. Kinga Lipskoch Fall 27 Single Cycle Disadvantages & Advantages Uses the clock cycle inefficiently the clock cycle must be
More informationMulticycle Approach. Designing MIPS Processor
CSE 675.2: Introduction to Computer Architecture Multicycle Approach 8/8/25 Designing MIPS Processor (Multi-Cycle) Presentation H Slides by Gojko Babić and Elsevier Publishing We will be reusing functional
More informationELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control
ELEC 52/62 Computer Architecture and Design Spring 217 Lecture 4: Datapath and Control Ujjwal Guin, Assistant Professor Department of Electrical and Computer Engineering Auburn University, Auburn, AL 36849
More informationUsing a Hardware Description Language to Design and Simulate a Processor 5.8
5.8 Using a Hardware Description Language to Design and Simulate a Processor 5.8 As mentioned in Appix B, Verilog can describe processors for simulation or with the intention that the Verilog specification
More informationMapping Control to Hardware
C A P P E N D I X A custom format such as this is slave to the architecture of the hardware and the instruction set it serves. The format must strike a proper compromise between ROM size, ROM-output decoding,
More informationCS232 Final Exam May 5, 2001
CS232 Final Exam May 5, 2 Name: This exam has 4 pages, including this cover. There are six questions, worth a total of 5 points. You have 3 hours. Budget your time! Write clearly and show your work. State
More informationNote- E~ S. \3 \S U\e. ~ ~s ~. 4. \\ o~ (fw' \i<.t. (~e., 3\0)
5.4 A Multicycle Implementation 377 Similarly, if we had a machine with more powerful operations and addressing modes, instructions could vary from three or four functional unit delays to tens or even
More informationReview: Abstract Implementation View
Review: Abstract Implementation View Split memory (Harvard) model - single cycle operation Simplified to contain only the instructions: memory-reference instructions: lw, sw arithmetic-logical instructions:
More informationDigital Design & Computer Architecture (E85) D. Money Harris Fall 2007
Digital Design & Computer Architecture (E85) D. Money Harris Fall 2007 Final Exam This is a closed-book take-home exam. You are permitted a calculator and two 8.5x sheets of paper with notes. The exam
More informationDesign of the MIPS Processor
Design of the MIPS Processor We will study the design of a simple version of MIPS that can support the following instructions: I-type instructions LW, SW R-type instructions, like ADD, SUB Conditional
More informationCOMPUTER ORGANIZATION AND DESIGN. The Hardware/Software Interface. Chapter 4. The Processor: A Based on P&H
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface Chapter 4 The Processor: A Based on P&H Introduction We will examine two MIPS implementations A simplified version A more realistic pipelined
More informationFor More Practice FMP
FMP 5.13-1 Single Cycle Datapaths with Floating Point 5.4 [5] < 5.4> Suppose we have a floating-point unit that requires 400 ps for a floating-point add and 600 ps for a floating-point multiply, not including
More informationMultiple Cycle Data Path
Multiple Cycle Data Path CS 365 Lecture 7 Prof. Yih Huang CS365 1 Multicycle Approach Break up the instructions into steps, each step takes a cycle balance the amount of work to be done restrict each cycle
More informationInitial Representation Finite State Diagram. Logic Representation Logic Equations
Control Implementation Alternatives Control may be designed using one of several initial representations. The choice of sequence control, and how logic is represented, can then be determined independently;
More informationLets Build a Processor
Lets Build a Processor Almost ready to move into chapter 5 and start building a processor First, let s review Boolean Logic and build the ALU we ll need (Material from Appendix B) operation a 32 ALU result
More informationChapter 4 The Processor (Part 2)
Department of Electr rical Eng ineering, Chapter 4 The Processor (Part 2) 王振傑 (Chen-Chieh Wang) ccwang@mail.ee.ncku.edu.tw ncku edu Feng-Chia Unive ersity Outline A Multicycle Implementation Mapping Control
More informationLecture 8: Control COS / ELE 375. Computer Architecture and Organization. Princeton University Fall Prof. David August
Lecture 8: Control COS / ELE 375 Computer Architecture and Organization Princeton University Fall 2015 Prof. David August 1 Datapath and Control Datapath The collection of state elements, computation elements,
More informationRISC Design: Multi-Cycle Implementation
RISC Design: Multi-Cycle Implementation Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab Department of Electrical Engineering Indian Institute of Technology Bombay http://www.ee.iitb.ac.in/~viren/
More informationComputer Science 141 Computing Hardware
Computer Science 4 Computing Hardware Fall 6 Harvard University Instructor: Prof. David Brooks dbrooks@eecs.harvard.edu Upcoming topics Mon, Nov th MIPS Basic Architecture (Part ) Wed, Nov th Basic Computer
More informationSystems Architecture
Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some or all figures from Computer Organization and Design: The Hardware/Software
More informationProcessor (I) - datapath & control. Hwansoo Han
Processor (I) - datapath & control Hwansoo Han Introduction CPU performance factors Instruction count - Determined by ISA and compiler CPI and Cycle time - Determined by CPU hardware We will examine two
More informationCOMP303 - Computer Architecture Lecture 10. Multi-Cycle Design & Exceptions
COP33 - Computer Architecture Lecture ulti-cycle Design & Exceptions Single Cycle Datapath We designed a processor that requires one cycle per instruction RegDst busw 32 Clk RegWr Rd ux imm6 Rt 5 5 Rs
More informationThe MIPS Processor Datapath
The MIPS Processor Datapath Module Outline MIPS datapath implementation Register File, Instruction memory, Data memory Instruction interpretation and execution. Combinational control Assignment: Datapath
More informationInitial Representation Finite State Diagram Microprogram. Sequencing Control Explicit Next State Microprogram counter
Control Implementation Alternatives Control may be designed using one of several initial representations. The choice of sequence control, and how logic is represented, can then be determined independently;
More informationECS 154B Computer Architecture II Spring 2009
ECS 154B Computer Architecture II Spring 2009 Pipelining Datapath and Control 6.2-6.3 Partially adapted from slides by Mary Jane Irwin, Penn State And Kurtis Kredo, UCD Pipelined CPU Break execution into
More informationLecture 5: The Processor
Lecture 5: The Processor CSCE 26 Computer Organization Instructor: Saraju P. ohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed from various books, websites, authors pages, and
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 informationCS232 Final Exam May 5, 2001
CS232 Final Exam May 5, 2 Name: Spiderman This exam has 4 pages, including this cover. There are six questions, worth a total of 5 points. You have 3 hours. Budget your time! Write clearly and show your
More informationCPU Design Steps. EECC550 - Shaaban
CPU Design Steps 1. Analyze instruction set operations using independent RTN => datapath requirements. 2. Select set of datapath components & establish clock methodology. 3. Assemble datapath meeting the
More informationECE 313 Computer Organization FINAL EXAM December 11, Multicycle Processor Design 30 Points
This exam is open book and open notes. Credit for problems requiring calculation will be given only if you show your work. 1. Multicycle Processor Design 0 Points In our discussion of exceptions in the
More informationLECTURE 5. Single-Cycle Datapath and Control
LECTURE 5 Single-Cycle Datapath and Control PROCESSORS In lecture 1, we reminded ourselves that the datapath and control are the two components that come together to be collectively known as the processor.
More informationECE 313 Computer Organization EXAM 2 November 9, 2001
ECE 33 Computer Organization EA 2 November 9, 2 This exam is open book and open notes. You have 5 minutes. Credit for problems requiring calculation will be given only if you show your work. Choose and
More informationWinter 2006 FINAL EXAMINATION Auxiliary Gymnasium Tuesday, April 18 7:00pm to 10:00pm
University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Lecture Instructor for L01 and L02: Dr. S. A. Norman Winter 2006 FINAL EXAMINATION Auxiliary Gymnasium
More informationECE 30, Lab #8 Spring 2014
ECE 30, Lab #8 Spring 20 Shown above is a multi-cycle CPU. There are six special registers in this datapath: PC, IR, MDR, A, B, and ALUOut. Of these, PC and IR are enabled to change when PCWr and IRWr
More informationCPU Organization (Design)
ISA Requirements CPU Organization (Design) Datapath Design: Capabilities & performance characteristics of principal Functional Units (FUs) needed by ISA instructions (e.g., Registers, ALU, Shifters, Logic
More informationECE232: Hardware Organization and Design
ECE232: Hardware Organization and Design Lecture 14: One Cycle MIPs Datapath Adapted from Computer Organization and Design, Patterson & Hennessy, UCB R-Format Instructions Read two register operands Perform
More informationCSE 2021 Computer Organization. Hugh Chesser, CSEB 1012U W10-M
CSE 22 Computer Organization Hugh Chesser, CSEB 2U Agenda Topics:. ultiple cycle implementation - complete Patterson: Appendix C, D 2 Breaking the Execution into Clock Cycles Execution of each instruction
More informationMicroprogramming. Microprogramming
Microprogramming Alternative way of specifying control FSM State -- bubble control signals in bubble next state given by signals on arc not a great language to specify when things are complex Treat as
More informationLab 8: Multicycle Processor (Part 1) 0.0
Lab 8: ulticycle Processor (Part ). Introduction In this lab and the next, you will design and build your own multicycle IPS processor! Your processor should match the design from the text reprinted below
More information1 ( pipeline 89 + single cycle 20 + multicycle 44 = 153 points) 100 min.
ee57_mt_sp23.fm Spring 23 EE57 Instructor: Gandhi Puvvada Midterm Exam (2%) Date: /5/23, Friday Time: 9:5M - :5M in THH2 Name: Total points: 2 Perfect score: 22 / 2 ( pipeline 89 + single cycle 2 + multicycle
More informationCOMP303 - Computer Architecture Lecture 8. Designing a Single Cycle Datapath
COMP33 - Computer Architecture Lecture 8 Designing a Single Cycle Datapath The Big Picture The Five Classic Components of a Computer Processor Input Control Memory Datapath Output The Big Picture: The
More informationImplementing the Control. Simple Questions
Simple Questions How many cycles will it take to execute this code? lw $t2, 0($t3) lw $t3, 4($t3) beq $t2, $t3, Label add $t5, $t2, $t3 sw $t5, 8($t3) Label:... #assume not What is going on during the
More informationMidterm. Sticker winners: if you got >= 50 / 67
CSC258 Week 8 Midterm Class average: 4.2 / 67 (6%) Highest mark: 64.5 / 67 Tests will be return in office hours. Make sure your midterm mark is correct on MarkUs Solution posted on the course website.
More informationMark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control
EE 37 Unit Single-Cycle CPU path and Control CPU Organization Scope We will build a CPU to implement our subset of the MIPS ISA Memory Reference Instructions: Load Word (LW) Store Word (SW) Arithmetic
More informationMulticycle conclusion
Multicycle conclusion The last few lectures covered a lot of material! We introduced a multicycle datapath, where different instructions take different numbers of cycles to execute. A multicycle unit is
More informationComputer Architecture Chapter 5. Fall 2005 Department of Computer Science Kent State University
Compter Architectre Chapter 5 Fall 25 Department of Compter Science Kent State University The Processor: Datapath & Control Or implementation of the MIPS is simplified memory-reference instrctions: lw,
More informationEE 457 Midterm Summer 14 Redekopp Name: Closed Book / 105 minutes No CALCULATORS Score: / 100
EE 47 Midterm Summer 4 Redekopp Name: Closed Book / minutes No CALCULATORS Score: /. (7 pts.) Short Answer [Fill in the blanks or select the correct answer] a. If a control signal must be valid during
More informationSingle Cycle CPU Design. Mehran Rezaei
Single Cycle CPU Design Mehran Rezaei What does it mean? Instruction Fetch Instruction Memory clk pc 32 32 address add $t,$t,$t2 instruction Next Logic to generate the address of next instruction The Branch
More informationFinal Project: MIPS-like Microprocessor
Final Project: MIPS-like Microprocessor Objective: The objective of this project is to design, simulate, and implement a simple 32-bit microprocessor with an instruction set that is similar to a MIPS.
More informationLaboratory 5 Processor Datapath
Laboratory 5 Processor Datapath Description of HW Instruction Set Architecture 16 bit data bus 8 bit address bus Starting address of every program = 0 (PC initialized to 0 by a reset to begin execution)
More informationEE 357 Project Multicycle CPU 1
EE 357 Project Multicycle CPU Introduction You will work in teams of one or two to implement a basic multicycle CPU that can execute five MIPS instruction types (LW/SW, R-Type, BEQ, J, and ADDI). You will
More informationThe Processor. Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut. CSE3666: Introduction to Computer Architecture
The Processor Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut CSE3666: Introduction to Computer Architecture Introduction CPU performance factors Instruction count
More informationENGR 3410: Midterm. Mark L. Chang. November 7, 2005
ENGR 3410: Midterm Mark L. Chang November 7, 2005 Instructions This is a test. This is only a test. You have 3 hours to complete this exam. You should take this exam in one sitting. You should not need
More informationMidterm I October 6, 1999 CS152 Computer Architecture and Engineering
University of California, Berkeley College of Engineering Computer Science Division EECS Fall 1999 John Kubiatowicz Midterm I October 6, 1999 CS152 Computer Architecture and Engineering Your Name: SID
More informationEE 457 Midterm Summer 14 Redekopp Name: Closed Book / 105 minutes No CALCULATORS Score: / 100
EE 47 Midterm Summer 4 Redekopp Name: Closed Book / minutes No CALCULATORS Score: /. (7 pts.) Short Answer [Fill in the blanks or select the correct answer] a. If a control signal must be valid during
More informationThe Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University
The Processor (1) Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu EEE3050: Theory on Computer Architectures, Spring 2017, Jinkyu Jeong (jinkyu@skku.edu)
More informationInf2C - Computer Systems Lecture Processor Design Single Cycle
Inf2C - Computer Systems Lecture 10-11 Processor Design Single Cycle Boris Grot School of Informatics University of Edinburgh Previous lectures Combinational circuits Combinations of gates (INV, AND, OR,
More informationChapter 4. The Processor. Computer Architecture and IC Design Lab
Chapter 4 The Processor Introduction CPU performance factors CPI Clock Cycle Time Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS
More informationEECS150 - Digital Design Lecture 10- CPU Microarchitecture. Processor Microarchitecture Introduction
EECS150 - Digital Design Lecture 10- CPU Microarchitecture Feb 18, 2010 John Wawrzynek Spring 2010 EECS150 - Lec10-cpu Page 1 Processor Microarchitecture Introduction Microarchitecture: how to implement
More informationCS152 Computer Architecture and Engineering. Lecture 8 Multicycle Design and Microcode John Lazzaro (www.cs.berkeley.
CS152 Computer Architecture and Engineering Lecture 8 Multicycle Design and Microcode 2004-09-23 John Lazzaro (www.cs.berkeley.edu/~lazzaro) Dave Patterson (www.cs.berkeley.edu/~patterson) www-inst.eecs.berkeley.edu/~cs152/
More informationProcessor Implementation in VHDL. University of Ulster at Jordanstown University of Applied Sciences, Augsburg
University of Ulster at Jordanstown University of Applied Sciences, Augsburg Master of Engineering VLSI Design Project Report Processor Implementation in VHDL According to Computer Organisation & Design
More information