Winter 2009 FINAL EXAMINATION Location: Engineering A Block, Room 201 Saturday, April 25 noon to 3:00pm
|
|
- Eustacia Bell
- 5 years ago
- Views:
Transcription
1 University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Lecture Instructors: S. A. Norman (L01), N. R. Bartley (L02) Winter 2009 FINAL EXAMINATION Location: Engineering A Block, Room 201 Saturday, April 25 noon to 3:00pm NAME (printed): Please don t write anything within this box. 1 / 9 U of C ID NUMBER: 2 / 7 3 / 12 4 / 10 LECTURE SECTION (L01 was TuTh at 9:30am, L02 was TuTh at 12:30pm): 5 / 12 6 / 6 7 / 15 8 / 11 SIGNATURE: 9 / / 15 TOTAL / 110 Instructions Please note that the official University of Calgary examination regulations are printed on page 1 of the Examination Regulations and Reference Material booklet that accompanies this examination paper. All of those regulations are in effect for this examination, except that you must write your answers on the question paper, not in the examination booklet. You may not use electronic calculators or computers during the examination. The examination is closed-book. You may not refer to books or notes during the examination, with one exception: you may refer to the Examination Regulations and Reference Material booklet that accompanies this examination paper. You are not required to add comments to assembly language code you write, but you are strongly encouraged to do so, because writing good comments will improve the probability that your code is correct and will help you to check your code after it is finished. Some problems are relatively easy and some are relatively difficult. Go after the easy marks first. Write all answers on the question paper and hand in the question paper when you are done. Please do not hand in the Examination Regulations and Reference Material booklet. Please print or write your answers legibly. What cannot be read cannot be marked. If you write anything you do not want marked, put a large X through it and write rough work beside it. You may use the backs of pages for rough work.
2 ENCM 369 Winter 2009 Final Examination page 2 of 10 PROBLEM 1 (total of 9 marks) Part a. (4 marks.) Suppose that before the instructions to the right are run, $t0 = 0xffff_fffe, $t1 = 0x0000_0001, $t2 = 17 (base ten), and $t3 = 3 (base ten). What will be the contents of $t4-$t7 after the instructions run? mult $t0, $t1 mfhi $t4 multu $t0, $t1 mfhi $t5 div $t2, $t3 mflo $t6 mfhi $t7 $t4 $t5 $t6 $t7 Part b. (5 marks.) Write a SPIM translation of the C function quux listed to the right of this text. Use only instructions from the Final Examination Instruction Subset described in the Examination Regulations and Reference Material booklet. Assume that an int multiplication result is taken as the least-significant 32 bits of a 64-bit product. Follow the calling conventions used in lectures and labs. int quux(int j, int k) { return j * (k % 251); }
3 ENCM 369 Winter 2009 Final Examination page 3 of 10 PROBLEM 2 (7 marks). Complete the SPIM translation of the C function myfunc, using only instructions from the Final Examination Instruction Subset described in the Examination Regulations and Reference Material booklet. Follow the calling conventions used in lectures and labs, and observe the following additional conventions regarding floating-point registers: myfunc returns a value in the double-precision register $f0; arguments x, a, and b arrive in double-precision registers $f12, $f14, and $f16, in that order; double-precision registers $f2, $f4,..., $f10 may be used like $t0 $t9; double myfunc(double x, double a, double b) { double r; r = a * x + b; if (r > 10.0) r = 10.0; else if (r < -10.0) r = -10.0; return r; } double-precision registers $f20, $f22,..., $f30 may be used like $s0 $s7..data c10pt0:.double 10.0.text.globl myfunc myfunc:
4 ENCM 369 Winter 2009 Final Examination page 4 of 10 PROBLEM 3 (total of 12 marks) Part a. (2 marks.) Suppose $a0 contains 0x9000_0000 and $a1 contains 0x2000_0000. What will be the value in $t0 after subu $t0, $a0, $a1 is run? Express your answer in base sixteen. Part b. (2 marks.) Did overflow occur in the subtraction of part a? Did wraparound occur? Give reasons to support both of your answers. Part c. (3 marks.) In the IEEE 754 single-precision format, what number does the following bit pattern represent? 0xc1dc_0000 Show the intermediate steps used to obtain your answer. Part d. (3 marks.) What is the IEEE 754 double-precision representation of 8.75? Show intermediate steps, and express your answer in base sixteen. Part e. (2 marks.) An ENCM 339 student writes the code to the right as part of a small C program to test his understanding of if/else statements, and is surprised to find that the output from his if/else statement is NOT EQUAL double d = 0.3; if (3.0 * d == 0.9) printf("equal\n"); else printf("not EQUAL\n"); Explain carefully (but without actually working out bit patterns for 0.3, 3.0, or 0.9) how the expression involving == could be false.
5 ENCM 369 Winter 2009 Final Examination page 5 of 10 PROBLEM 4 (10 marks). Write a SPIM translation of the C function foo, using only instructions from the Final Examination Instruction Subset described in the Examination Regulations and Reference Material booklet. Follow the calling conventions used in lectures and labs, and observe the following additional conventions regarding floating-point registers: bar returns a value in the single-precision register $f0; double-precision registers $f2, $f4,..., $f10 may be used like $t0 $t9; double-precision registers $f20, $f22,..., $f30 may be used like $s0 $s7. Remember also that double-precision precision registers share storage with single-precision registers. For example, the 64-bit $f2 shares storage with the 32-bit $f2 and the 32-bit $f3. float bar(float a); void foo(double *z, float *x, float *y, int n) { double *p; p = z + n; while (z!= p) { *z = bar(*x) * bar(*y); z++; x++; y++; } }
6 ENCM 369 Winter 2009 Final Examination page 6 of 10 PROBLEM 5 (12 marks) Consider the single-cycle processor of Figure 4.17 from your textbook, in which each instruction is fetched and completed within a single processor clock cycle. A copy of that figure can be found on page 6 of the Reference Material booklet. Note that the ALUOp signal works as follows: 00 requests addition, 01 requests subtraction, and 10 tells the ALU Control Unit to decide based on bits 5 0 of the instruction. Suppose the following sequence of instructions is run: lw $t0, 0($sp) add $t1, $t0, $s0 sw $t1, 12($sp) beq $t0, $s1, L42 Note that in both the add instruction and the beq instruction, $t0 is encoded as bits of the instruction. Suppose also that before the lw instruction starts, $sp = 0x7fff_fe40, $s0 = 0x1000_0000, $s1 = 0x0000_2468, and the memory word at address 0x7fff_fe40 has a value of 0x0000_2482. Fill in the following table to show what values are attained by control signals, the Read data 1 output of the Register File, and the ALU Result signal, in cycles 2, 3 and 4. Use an X to indicate that a control signal is a don t care in a particular clock cycle. cycle RegDst Branch MemRead MemtoReg ALUOp instruction Read data 1 ALU Result 1 lw $t0, 0($sp) x7fff_fe40 0x7fff_fe40 MemWrite ALUSrc RegWrite 2 add $t1, $t0, $s0 3 sw $t1, 12($sp) 4 beq $t0, $s1, L42 PROBLEM 6 (total of 6 marks) Part a. (2 marks.) The fragment of C code below counts how many characters in a string match a character code in c1. Beside the C code are two different MIPS assembly language translations of the loop, for a real MIPS processor that has delayed branch instructions. do { c2 = *p; p++; if (c1 == c2) count++; } while (c2!= \0 ); L1: lbu $t9, ($a0) bne $a1, $t9, L2 addiu $a0, $a0, 1 addiu $t8, $t8, 1 L2: bne $t9, $zero, L1 nop L3: lbu $t9, ($a0) addiu $a0, $a0, 1 subu $t0, $t9, $a1 sltiu $t1, $t0, 1 bne $t9, $zero, L3 addu $t8, $t8, $t1 Write register names in the boxes below to show the correspondences between C variables or arguments and MIPS registers. (The correspondences are the same in the two different fragments of assembly language.) c1: c2: count: p: Part b. (2 marks.) The use of subu and sltiu in part a to make $t1 equal to 1 if c1 == c2 and equal to 0 otherwise is a somewhat non-obvious trick. Explain why the combination of subu and sltiu does the right thing in the code above. Part c. (2 marks.) Each of the assembly language loops in part a has six instructions. Explain why the loop that starts with L3 is likely to run faster than the loop that starts with L1, in a pipelined processor that correctly implements the MIPS instruction set.
7 ENCM 369 Winter 2009 Final Examination page 7 of 10 PROBLEM 7 (total of 15 marks). This problem concerns the pipelined computer of Figure 4.51 from your textbook. There is a copy of this figure on page 7 of the Reference Material booklet. Suppose that the clock period for this processor is 1.0 ns, and that clock edges that cause updates to the PC and the pipeline registers occur at t = 0.0ns, t = 1.0ns, t = 2.0ns, and so on. Suppose also that clock edges that cause updates to the Register File occur at t = 0.5ns, t = 1.5ns, and so on. Parts a f are concerned with the following sequence of instructions: address instruction disassembly 0x0040_0024 0x0000_0000 nop 0x0040_0028 0x0000_0000 nop 0x0040_002c 0x0000_0000 nop 0x0040_0030 0x8fa8_0008 lw $8, 8($29) 0x0040_0034 0x0109_5025 or $10, $8, $9 # Instruction format note: bits encode $8 0x0040_0038 0x0000_0000 nop 0x0040_003c 0x0000_0000 nop 0x0040_0040 0x0000_0000 nop Suppose that at t = 10.0ns the IF phase of the lw instruction begins, that at that time, GPR contents are as follows... $8: 0x1234_0000 $9: 0x0001_2345 $10: 0x0101_0101 $29: 0x7fff_ and that the value of the Data Memory word at address 0x7fff_0008 is 0xfff0_0000. For each of your answers to parts b f, give a brief explanation of your answer. Use the answer to part a as a model. Part a. (0 marks.) What bit pattern is written into IF/ID.Instruction at t = 11.0ns? 0x8fa8_0008 this is the bit pattern for the lw instruction, copied out of the Instruction Memory. Part b. (2 marks.) What bit patterns are written into ID/EX.A and ID/EX.B at t = 12.0ns? Part c. (2 marks.) What bit patterns are written into ID/EX.A and ID/EX.B at t = 13.0ns? Part d. (2 marks.) What bit pattern is written into ID/EX.RegisterRt at t = 13.0ns? Part e. (2 marks.) What bit pattern is written into EX/MEM.Result at t = 13.0ns? Part f. (2 marks.) At what time does the update to $10 in the Register File occur, and what value is written to $10? Part g. (3 marks.) The instruction sequence used for parts a f has a kind of pipeline hazard. What kind of hazard is it? Does the computer of Figure 4.51 manage this hazard correctly? Briefly give a reason for your answer. Part h. (2 marks.) This part is about the computer of Figure 4.51, but it is not related to the instruction sequence used in parts a g. The outputs of the Main Control Unit are all written to the ID/EX pipeline register. It would be incorrect to send these outputs directly to functional units such as the Register File and the Data Memory. Using the MemWrite signal as an example, explain why it would be wrong to send the Main Control Unit outputs directly to functional units.
8 ENCM 369 Winter 2009 Final Examination page 8 of 10 PROBLEM 8 (total of 11 marks). Parts a e concern a D-cache (data cache) for a computer with 32-bit words. The cache is 2-way set-associative with 2-word blocks. There is no virtual memory, so the processor core sends physical data addresses directly to the D-cache. Cache indexes are 9 bits wide and cache tags are 20 bits wide. Each line of the cache has an lru bit, which is 0 if the entry to the left of the lru bit has been accessed more recently than the entry to the right of the lru bit and is 1 otherwise. Part a. (2 marks.) Suppose a load-word instruction is attempted using 0x1122_396c as a data address. The index from this address will be two. Suppose that just before the load is attempted, line two of the D-cache looks like this: data for data for data for data for V tag block offset 0 block offset 1 lru V tag block offset 0 block offset 1 1 0x x0000 0xffff 1 1 0x x1122 0x1122 _0001 _ffff _3400 _341c The attempt read data from the cache will be a miss. Explain exactly how the miss is detected. Part b. (3 marks.) Suppose that when the load of part a is attempted, some of the words in main memory are as follows: address data word 0x1122_3964 0x3333_3333 0x1122_3968 0x4444_4444 0x1122_396c 0x5555_5555 0x1122_3970 0x6666_6666 0x1122_3974 0x7777_7777 Assuming that the cache uses an LRU replacement strategy, fill in the table below to show the contents of line two just after the D-cache has finished taking care of the miss. data for data for data for data for V tag block offset 0 block offset 1 lru V tag block offset 0 block offset 1 Part c. (2 marks.) Now suppose a store-word instruction is attempted, using 0x1133_7800 as the address and 0x8888_8888 as the data. The index from the address will be two. Suppose just before the store is attempted, line two of the cache looks like this: data for data for data for data for V tag block offset 0 block offset 1 lru V tag block offset 0 block offset 1 1 0x x0000 0x x1133a 0x0000 0x0000 _0001 _0002 _002a _0033 There will be a cache hit. Fill in the following table to show how the write hit will change the contents of line two. data for data for data for data for V tag block offset 0 block offset 1 lru V tag block offset 0 block offset 1 Part d. (2 marks.) Suppose the D-cache is a write-through cache. In addition to updating line two of the cache, what other action will occur within the memory system as a result of the store of part c? Part e. (2 marks.) What is the data capacity of the cache, in bytes?
9 ENCM 369 Winter 2009 Final Examination page 9 of 10 PROBLEM 9 (total of 11 marks) Parts a c are about a process running on a MIPS-like computer with virtual memory. The page size in this system is 4096 bytes. The TLBs for instruction and data address translations have room for only six translations each. Just before the instruction at virtual address 0x0040_28a8 is fetched, the page table for the process and the TLBs contain the following information: Page Table PPN or VPN V-bit disk info 0x x x x x x x x x x x [disk info] 0x x x7fffe 1 0x208a2 0x7ffff 1 0x203fc Instruction TLB VPN V-bit PPN 0x x x x x x x x x x x x20600 Data TLB VPN V-bit PPN 0x7fffe 1 0x208a2 0x7ffff 0 0x x x x x x x x7ffff 1 0x203fc Part a. (3 marks.) Giving a reason to support your answer, state whether the instruction fetch results in a hit or a miss in the instruction TLB. What physical address will be used to fetch the instruction? Part b. (3 marks.) The instruction at virtual address 0x0040_28a8 is 0x8fa8_0008 lw $t0, 8($sp). Suppose that $sp = 0x7fff_effc. Giving a reason to support your answer, state whether the data memory access results in a hit or a miss in the data TLB. What physical address will be used to access the data? Part c. (3 marks.) Suppose the instruction following the one in parts a and b is 0x8c89_0000 lw $t1, ($a0). Suppose that $a0 = 0x1001_1804. Give as much information as you can about the physical address that will be used to read data into $t1. If you were able to completely specify the physical address, explain how you found it. If you were not able to completely specify the physical address, explain why it is not possible to do so. Parts d and e are also about virtual memory, but not specifically the system of parts a c. Part d. (2 marks.) Process 100 and process 101 are running on a system with virtual memory. The range of word addresses process 100 uses to access its stack is 0xbfff_f000 to 0xbfff_fffc. The range of word addresses used by process 101 to access its stack is also 0xbfff_f000 to 0xbfff_fffc. Explain why when process 101 writes to its stack, it is impossible that such writes will overwrite data in the stack of process 100. Part e. (2 marks.) Suppose there is a page fault in a computer with virtual memory. Explain why in some cases this will result in a disk write followed by a disk read, and in other cases the only disk activity required is a disk read.
10 ENCM 369 Winter 2009 Final Examination page 10 of 10 PROBLEM 10 (total of 15 marks) These are questions on miscellaneous course topics. Question a. (3 marks.) Consider a direct-mapped data cache for a computer with 64-bit data words and 44-bit physical addresses. The cache has a block size of 8 words, and the capacity of the cache is 65,536 bytes. Show how addresses would be broken into index, tag, byte offset, and block offset. Question b. (2 marks.) Suppose the computers of textbook Figures 4.17 and 4.51 (copied on pages 6 7 of the Reference Material) are implemented with similar latencies for functional units such as the memories, register file, and ALU. Explain briefly why the processor of Figure 4.51 could run reliably at a much higher clock speed than that of Figure Question c. (2 marks.) Briefly give a definition of the term exception as it was used in ENCM 369. Question d. (2 marks.) Briefly explain why enhancing the processor of Figure 4.51 to support exception handling is a more complex design task than adding exception support for the processor of Figure Question e. (2 marks.) Briefly state two reasons why an 80GB disk drive is a much better choice than 80GB of DRAM for file storage on a mid-priced laptop computer. Question f. (3 marks.) Suppose a is of type int* in the following code fragment, and that a, i and sum are in registers. for (i = 0; i < 65536; i++) sum += a[i]; The loop runs on a computer with 32-bit ints, 32-bit words, and one level of data cache. The D-cache has a capacity of 128KB and has 8-word blocks. If the loop runs from beginning to end without any exceptions occurring, give estimates for the minimum and maximum number of D-cache misses that occur while the loop runs. Question g. (1 mark.) Why does the assumption of no exceptions matter in question f?
Winter 2002 FINAL EXAMINATION
University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Instructors: Dr. S. A. Norman (L01) and Dr. S. Yanushkevich (L02) Note for Winter 2005 students Winter
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 informationUniversity of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Instructor: Steve Norman
page of 9 University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Instructor: Steve Norman Winter 26 FINAL EXAMINATION (with corrections) Location: ICT 2
More informationWinter 2012 MID-SESSION TEST Tuesday, March 6 6:30pm to 8:15pm. Please do not write your U of C ID number on this cover page.
University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Lecture Instructors: S. A. Norman and N. R. Bartley Winter 2012 MID-SESSION TEST Tuesday, March 6
More information#1 #2 with corrections Monday, March 12 7:00pm to 8:30pm. Please do not write your U of C ID number on this cover page.
page 1 of 6 University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Lecture Instructors: Steve Norman and Norm Bartley Winter 2018 MIDTERM TEST #1 #2 with
More informationWinter 2003 MID-SESSION TEST Monday, March 10 6:30 to 8:00pm
University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Instructors: Dr. S. A. Norman (L01) and Dr. S. Yanushkevich (L02) Winter 2003 MID-SESSION TEST Monday,
More informationWinter 2017 MIDTERM TEST #1 Wednesday, February 8 7:00pm to 8:30pm. Please do not write your U of C ID number on this cover page.
page 1 of 5 University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Lecture Instructors: Steve Norman and Norm Bartley Winter 2017 MIDTERM TEST #1 Wednesday,
More informationENCM 369 Winter 2016 Lab 11 for the Week of April 4
page 1 of 13 ENCM 369 Winter 2016 Lab 11 for the Week of April 4 Steve Norman Department of Electrical & Computer Engineering University of Calgary April 2016 Lab instructions and other documents for ENCM
More informationENCM 369 Winter 2013: Reference Material for Midterm #2 page 1 of 5
ENCM 369 Winter 2013: Reference Material for Midterm #2 page 1 of 5 MIPS/SPIM General Purpose Registers Powers of Two 0 $zero all bits are zero 16 $s0 local variable 1 $at assembler temporary 17 $s1 local
More informationECE Exam I February 19 th, :00 pm 4:25pm
ECE 3056 Exam I February 19 th, 2015 3:00 pm 4:25pm 1. The exam is closed, notes, closed text, and no calculators. 2. The Georgia Tech Honor Code governs this examination. 3. There are 4 questions and
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 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 informationENCM 369 Winter 2018 Lab 9 for the Week of March 19
page 1 of 9 ENCM 369 Winter 2018 Lab 9 for the Week of March 19 Steve Norman Department of Electrical & Computer Engineering University of Calgary March 2018 Lab instructions and other documents for ENCM
More informationSlides for Lecture 15
Slides for Lecture 15 ENCM 501: Principles of Computer Architecture Winter 2014 Term Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary 6 March,
More informationSlide Set 5. for ENCM 369 Winter 2014 Lecture Section 01. Steve Norman, PhD, PEng
Slide Set 5 for ENCM 369 Winter 2014 Lecture Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 2014 ENCM 369 W14 Section
More informationFaculty of Science FINAL EXAMINATION
Faculty of Science FINAL EXAMINATION COMPUTER SCIENCE COMP 273 INTRODUCTION TO COMPUTER SYSTEMS Examiner: Prof. Michael Langer April 18, 2012 Associate Examiner: Mr. Joseph Vybihal 2 P.M. 5 P.M. STUDENT
More informationCS 351 Exam 2 Mon. 11/2/2015
CS 351 Exam 2 Mon. 11/2/2015 Name: Rules and Hints The MIPS cheat sheet and datapath diagram are attached at the end of this exam for your reference. You may use one handwritten 8.5 11 cheat sheet (front
More informationProblem 1 (logic design)
Problem 1 (logic design) For this problem, you are to design and implement a sequential multiplexor that works as follows. On each clock cycle, interpret the current input as a selector from the most recent
More informationSlide Set 5. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng
Slide Set 5 for ENCM 369 Winter 2018 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary February 2018 ENCM 369 Winter 2018 Section
More informationMachine Organization & Assembly Language
Name: 1 CSE 378 Fall 2010 Machine Organization & Assembly Language Final Exam Solution Write your answers on these pages. Additional pages may be attached (with staple) if necessary. Please ensure that
More informationNATIONAL UNIVERSITY OF SINGAPORE
NATIONAL UNIVERSITY OF SINGAPORE SCHOOL OF COMPUTING EXAMINATION FOR Semester 1 AY2013/14 CS2100 COMPUTER ORGANISATION ANSWER SCRIPT Nov 2013 Time allowed: 2 hours Caveat on the grading scheme: I have
More informationCSEE W3827 Fundamentals of Computer Systems Homework Assignment 3 Solutions
CSEE W3827 Fundamentals of Computer Systems Homework Assignment 3 Solutions 2 3 4 5 Prof. Stephen A. Edwards Columbia University Due June 26, 207 at :00 PM ame: Solutions Uni: Show your work for each problem;
More informationSlide Set 9. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng
Slide Set 9 for ENCM 369 Winter 2018 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary March 2018 ENCM 369 Winter 2018 Section 01
More informationCSc 256 Midterm 2 Fall 2011
CSc 256 Midterm 2 Fall 2011 NAME: 1a) You are given a MIPS branch instruction: x: beq $12, $0, y The address of the label "y" is 0x400468. The memory location at "x" contains: address contents 0x40049c
More informationcs470 - Computer Architecture 1 Spring 2002 Final Exam open books, open notes
1 of 7 ay 13, 2002 v2 Spring 2002 Final Exam open books, open notes Starts: 7:30 pm Ends: 9:30 pm Name: (please print) ID: Problem ax points Your mark Comments 1 10 5+5 2 40 10+5+5+10+10 3 15 5+10 4 10
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 informationLab 4 Report. Single Cycle Design BAOTUNG C. TRAN EEL4713C
Lab 4 Report Single Cycle Design BAOTUNG C. TRAN EEL4713C Added Hardware : Andi and Ori : For this instruction, I had to add a zero extender into my design. Which therefore required me to add a mux that
More informationInteger Multiplication and Division
Integer Multiplication and Division for ENCM 369: Computer Organization Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 208 Integer
More informationENCM 369 Winter 2019 Lab 6 for the Week of February 25
page of ENCM 369 Winter 29 Lab 6 for the Week of February 25 Steve Norman Department of Electrical & Computer Engineering University of Calgary February 29 Lab instructions and other documents for ENCM
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 informationComputer Architecture I Midterm I
Computer Architecture I Midterm I April 11 2017 Computer Architecture I Midterm I Chinese Name: Pinyin Name: E-Mail... @shanghaitech.edu.cn: Question Points Score 1 1 2 12 3 16 4 14 5 18 6 17 7 22 Total:
More informationECE 2035 Programming HW/SW Systems Fall problems, 7 pages Exam Two 23 October 2013
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate
More informationCSc 256 Midterm 2 Spring 2012
CSc 256 Midterm 2 Spring 2012 NAME: 1a) You are given this MIPS assembly language instruction (i.e., pseudo- instruction): ble $12, 0x20004880, there Translate this MIPS instruction to an efficient sequence
More informationDepartment of Electrical Engineering and Computer Sciences Fall 2003 Instructor: Dave Patterson CS 152 Exam #1. Personal Information
University of California, Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences Fall 2003 Instructor: Dave Patterson 2003-10-8 CS 152 Exam #1 Personal Information First
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 informationCache Architectures Design of Digital Circuits 217 Srdjan Capkun Onur Mutlu http://www.syssec.ethz.ch/education/digitaltechnik_17 Adapted from Digital Design and Computer Architecture, David Money Harris
More informationEECS 151/251A Fall 2017 Digital Design and Integrated Circuits. Instructor: John Wawrzynek and Nicholas Weaver. Lecture 13 EE141
EECS 151/251A Fall 2017 Digital Design and Integrated Circuits Instructor: John Wawrzynek and Nicholas Weaver Lecture 13 Project Introduction You will design and optimize a RISC-V processor Phase 1: Design
More information200 points total. Start early! Update March 27: Problem 2 updated, Problem 8 is now a study problem.
CS3410 Spring 2014 Problem Set 2, due Saturday, April 19, 11:59 PM NetID: Name: 200 points total. Start early! Update March 27: Problem 2 updated, Problem 8 is now a study problem. Problem 1 Data Hazards
More informationOPEN BOOK, OPEN NOTES. NO COMPUTERS, OR SOLVING PROBLEMS DIRECTLY USING CALCULATORS.
CS/ECE472 Midterm #2 Fall 2008 NAME: Student ID#: OPEN BOOK, OPEN NOTES. NO COMPUTERS, OR SOLVING PROBLEMS DIRECTLY USING CALCULATORS. Your signature is your promise that you have not cheated and will
More informationCS305, Computer Architecture, End Sem, Sat 21/11/09, 2:30 05:30pm, Max marks: 45
CS305, Computer Architecture, End Sem, Sat 21/11/09, 2:30 05:30pm, Max marks: 45 Declaration (write by hand and sign): I hereby declare that I hold copying as an act as shameful as stealing, or bribery,
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 informationCSE 378 Final Exam 3/14/11 Sample Solution
Name There are 8 questions worth a total of 100 points. Please budget your time so you get to all of the questions don t miss the short questions at the end. Keep your answers brief and to the point. Copies
More informationCSc 256 Final Fall 2016
CSc 256 Final Fall 2016 NAME: Problem 1 (25 points) Translate the C/C++ function func() into MIPS assembly language. The prototype is: void func(int arg0, int *arg1); arg0-arg1 are in $a0- $a1 respectively.
More informationDigital Logic & Computer Design CS Professor Dan Moldovan Spring Copyright 2007 Elsevier 8-<1>
Digital Logic & Computer Design CS 4341 Professor Dan Moldovan Spring 21 Copyright 27 Elsevier 8- Chapter 8 :: Memory Systems Digital Design and Computer Architecture David Money Harris and Sarah L.
More informationCOMP2611: Computer Organization. The Pipelined Processor
COMP2611: Computer Organization The 1 2 Background 2 High-Performance Processors 3 Two techniques for designing high-performance processors by exploiting parallelism: Multiprocessing: parallelism among
More informationSlide Set 7. for ENCM 501 in Winter Term, Steve Norman, PhD, PEng
Slide Set 7 for ENCM 501 in Winter Term, 2017 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 2017 ENCM 501 W17 Lectures: Slide
More informationECE Sample Final Examination
ECE 3056 Sample Final Examination 1 Overview The following applies to all problems unless otherwise explicitly stated. Consider a 2 GHz MIPS processor with a canonical 5-stage pipeline and 32 general-purpose
More informationChapter 8 :: Topics. Chapter 8 :: Memory Systems. Introduction Memory System Performance Analysis Caches Virtual Memory Memory-Mapped I/O Summary
Chapter 8 :: Systems Chapter 8 :: Topics Digital Design and Computer Architecture David Money Harris and Sarah L. Harris Introduction System Performance Analysis Caches Virtual -Mapped I/O Summary Copyright
More informationDirect Mapped Cache Hardware. Direct Mapped Cache. Direct Mapped Cache Performance. Direct Mapped Cache Performance. Miss Rate = 3/15 = 20%
Direct Mapped Cache Direct Mapped Cache Hardware........................ mem[xff...fc] mem[xff...f8] mem[xff...f4] mem[xff...f] mem[xff...ec] mem[xff...e8] mem[xff...e4] mem[xff...e] 27 8-entry x (+27+)-bit
More informationMIPS Assembly Programming
COMP 212 Computer Organization & Architecture COMP 212 Fall 2008 Lecture 8 Cache & Disk System Review MIPS Assembly Programming Comp 212 Computer Org & Arch 1 Z. Li, 2008 Comp 212 Computer Org & Arch 2
More informationThe University of Alabama in Huntsville Electrical & Computer Engineering Department CPE Test II November 14, 2000
The University of Alabama in Huntsville Electrical & Computer Engineering Department CPE 513 01 Test II November 14, 2000 Name: 1. (5 points) For an eight-stage pipeline, how many cycles does it take to
More information1. Truthiness /8. 2. Branch prediction /5. 3. Choices, choices /6. 5. Pipeline diagrams / Multi-cycle datapath performance /11
The University of Michigan - Department of EECS EECS 370 Introduction to Computer Architecture Midterm Exam 2 ANSWER KEY November 23 rd, 2010 Name: University of Michigan uniqname: (NOT your student ID
More informationEE557--FALL 1999 MAKE-UP MIDTERM 1. Closed books, closed notes
NAME: STUDENT NUMBER: EE557--FALL 1999 MAKE-UP MIDTERM 1 Closed books, closed notes Q1: /1 Q2: /1 Q3: /1 Q4: /1 Q5: /15 Q6: /1 TOTAL: /65 Grade: /25 1 QUESTION 1(Performance evaluation) 1 points We are
More informationReduced Instruction Set Computer (RISC)
Reduced Instruction Set Computer (RISC) Reduced Instruction Set Computer (RISC) Focuses on reducing the number and complexity of instructions of the machine. Reduced number of cycles needed per instruction.
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 informationCPS 104 Final Exam. 2pm to 5pm Open book exam. Answer all questions, state all your assumptions, clearly mark your final answer. 1.
CPS 104 Final Exam 2pm to 5pm Open book exam Answer all questions, state all your assumptions, clearly mark your final answer. Be sure you have all eight (8) pages of the exam. Write your name on each
More informationCISC 662 Graduate Computer Architecture. Lecture 4 - ISA
CISC 662 Graduate Computer Architecture Lecture 4 - ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,
More informationReduced Instruction Set Computer (RISC)
Reduced Instruction Set Computer (RISC) Focuses on reducing the number and complexity of instructions of the ISA. RISC Goals RISC: Simplify ISA Simplify CPU Design Better CPU Performance Motivated by simplifying
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 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 informationFinal Exam Spring 2017
COE 3 / ICS 233 Computer Organization Final Exam Spring 27 Friday, May 9, 27 7:3 AM Computer Engineering Department College of Computer Sciences & Engineering King Fahd University of Petroleum & Minerals
More informationQ1: /30 Q2: /25 Q3: /45. Total: /100
ECE 2035(A) Programming for Hardware/Software Systems Fall 2013 Exam One September 19 th 2013 This is a closed book, closed note texam. Calculators are not permitted. Please work the exam in pencil and
More informationDo not start the test until instructed to do so!
Instructions: Print your name in the space provided below. This examination is closed book and closed notes, aside from the permitted one-page formula sheet and the MIPS reference card. No calculators
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 informationCENG 3420 Lecture 06: Datapath
CENG 342 Lecture 6: Datapath Bei Yu byu@cse.cuhk.edu.hk CENG342 L6. Spring 27 The Processor: Datapath & Control q We're ready to look at an implementation of the MIPS q Simplified to contain only: memory-reference
More informationArithmetic for Computers
MIPS Arithmetic Instructions Cptr280 Dr Curtis Nelson Arithmetic for Computers Operations on integers Addition and subtraction; Multiplication and division; Dealing with overflow; Signed vs. unsigned numbers.
More informationComputer and Information Sciences College / Computer Science Department Enhancing Performance with Pipelining
Computer and Information Sciences College / Computer Science Department Enhancing Performance with Pipelining Single-Cycle Design Problems Assuming fixed-period clock every instruction datapath uses one
More informationContents. Slide Set 1. About these slides. Outline of Slide Set 1. Typographical conventions: Italics. Typographical conventions. About these slides
Slide Set 1 for ENCM 369 Winter 2014 Lecture Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 2014 ENCM 369 W14 Section
More informationECE 2035 Programming HW/SW Systems Spring problems, 6 pages Exam Two 11 March Your Name (please print) total
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate
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 informationProgramming the processor
CSC258 Week 9 Logistics This week: Lab 7 is the last Logisim DE2 lab. Next week: Lab 8 will be assembly. For assembly labs you can work individually or in pairs. No matter how you do it, the important
More informationLecture 4: Review of MIPS. Instruction formats, impl. of control and datapath, pipelined impl.
Lecture 4: Review of MIPS Instruction formats, impl. of control and datapath, pipelined impl. 1 MIPS Instruction Types Data transfer: Load and store Integer arithmetic/logic Floating point arithmetic Control
More informationSolution printed. Do not start the test until instructed to do so! CS 2504 Intro Computer Organization Test 2 Spring 2006.
VIRG INIA POLYTECHNIC INSTITUTE AND STATE U T PROSI M UNI VERSI TY Instructions: Print your name in the space provided below. This examination is closed book and closed notes, aside from the permitted
More informationComputer Architecture CS372 Exam 3
Name: Computer Architecture CS372 Exam 3 This exam has 7 pages. Please make sure you have all of them. Write your name on this page and initials on every other page now. You may only use the green card
More informationOverview. Introduction to the MIPS ISA. MIPS ISA Overview. Overview (2)
Introduction to the MIPS ISA Overview Remember that the machine only understands very basic instructions (machine instructions) It is the compiler s job to translate your high-level (e.g. C program) into
More informationENCM 369 Winter 2015 Lab 6 for the Week of March 2
page of 2 ENCM 369 Winter 25 Lab 6 for the Week of March 2 Steve Norman Department of Electrical & Computer Engineering University of Calgary February 25 Lab instructions and other documents for ENCM 369
More informationc. What are the machine cycle times (in nanoseconds) of the non-pipelined and the pipelined implementations?
Brown University School of Engineering ENGN 164 Design of Computing Systems Professor Sherief Reda Homework 07. 140 points. Due Date: Monday May 12th in B&H 349 1. [30 points] Consider the non-pipelined
More informationSarah L. Harris and David Money Harris. Digital Design and Computer Architecture: ARM Edition Chapter 8 <1>
Chapter 8 Digital Design and Computer Architecture: ARM Edition Sarah L. Harris and David Money Harris Digital Design and Computer Architecture: ARM Edition 215 Chapter 8 Chapter 8 :: Topics Introduction
More informationENCM 369 Winter 2017 Lab 3 for the Week of January 30
page 1 of 11 ENCM 369 Winter 2017 Lab 3 for the Week of January 30 Steve Norman Department of Electrical & Computer Engineering University of Calgary January 2017 Lab instructions and other documents for
More informationSlide Set 4. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng
Slide Set 4 for ENCM 369 Winter 2018 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary January 2018 ENCM 369 Winter 2018 Section
More informationICS DEPARTMENT ICS 233 COMPUTER ARCHITECTURE & ASSEMBLY LANGUAGE. Midterm Exam. First Semester (141) Time: 1:00-3:30 PM. Student Name : _KEY
Page 1 of 14 Nov. 22, 2014 ICS DEPARTMENT ICS 233 COMPUTER ARCHITECTURE & ASSEMBLY LANGUAGE Midterm Exam First Semester (141) Time: 1:00-3:30 PM Student Name : _KEY Student ID. : Question Max Points Score
More information101 Assembly. ENGR 3410 Computer Architecture Mark L. Chang Fall 2009
101 Assembly ENGR 3410 Computer Architecture Mark L. Chang Fall 2009 What is assembly? 79 Why are we learning assembly now? 80 Assembly Language Readings: Chapter 2 (2.1-2.6, 2.8, 2.9, 2.13, 2.15), Appendix
More informationEN2910A: Advanced Computer Architecture Topic 02: Review of classical concepts
EN2910A: Advanced Computer Architecture Topic 02: Review of classical concepts Prof. Sherief Reda School of Engineering Brown University S. Reda EN2910A FALL'15 1 Classical concepts (prerequisite) 1. Instruction
More informationSlide Set 7 for Lecture Section 01
Slide Set 7 for Lecture Section 01 for ENCM 369 Winter 2017 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary February 2017 ENCM 369 Winter
More informationMIPS Instruction Reference
Page 1 of 9 MIPS Instruction Reference This is a description of the MIPS instruction set, their meanings, syntax, semantics, and bit encodings. The syntax given for each instruction refers to the assembly
More informationUCB CS61C : Machine Structures
inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Guest Lecturer Alan Christopher Lecture 08 MIPS Instruction Representation I 2014-02-07 BOINC MORE THAN JUST SETI@HOME BOINC (developed here
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 informationECE 2035 Programming HW/SW Systems Fall problems, 6 pages Exam Two 21 October 2016
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate
More informationECE 2035 Programming HW/SW Systems Spring problems, 6 pages Exam One 4 February Your Name (please print clearly)
Your Name (please print clearly) This exam will be conducted according to the Georgia Tech Honor Code. I pledge to neither give nor receive unauthorized assistance on this exam and to abide by all provisions
More informationPerfect Student CS 343 Final Exam May 19, 2011 Student ID: 9999 Exam ID: 9636 Instructions Use pencil, if you have one. For multiple choice
Instructions Page 1 of 7 Use pencil, if you have one. For multiple choice questions, circle the letter of the one best choice unless the question specifically says to select all correct choices. There
More informationSOLUTION. Midterm #1 February 26th, 2018 Professor Krste Asanovic Name:
SOLUTION Notes: CS 152 Computer Architecture and Engineering CS 252 Graduate Computer Architecture Midterm #1 February 26th, 2018 Professor Krste Asanovic Name: I am taking CS152 / CS252 This is a closed
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 informationCS61C : Machine Structures
inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures $2M 3D camera Lecture 8 MIPS Instruction Representation I Instructor: Miki Lustig 2014-09-17 August 25: The final ISA showdown: Is ARM, x86, or
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 informationProject Description EEC 483 Computer Organization, Spring 2019
Project Description EEC 483 Computer Organization, Spring 2019 Title: Implement a (single-cycle) MIPS processor on Altera DE10-Lite using Quartus and VHDL Goal: This project is designed to help understand
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 informationCS 251, Winter 2019, Assignment % of course mark
CS 251, Winter 2019, Assignment 5.1.1 3% of course mark Due Wednesday, March 27th, 5:30PM Lates accepted until 1:00pm March 28th with a 15% penalty 1. (10 points) The code sequence below executes on a
More informationCS3350B Computer Architecture Quiz 3 March 15, 2018
CS3350B Computer Architecture Quiz 3 March 15, 2018 Student ID number: Student Last Name: Question 1.1 1.2 1.3 2.1 2.2 2.3 Total Marks The quiz consists of two exercises. The expected duration is 30 minutes.
More informationECE 3056: Architecture, Concurrency, and Energy of Computation. Sample Problem Sets: Pipelining
ECE 3056: Architecture, Concurrency, and Energy of Computation Sample Problem Sets: Pipelining 1. Consider the following code sequence used often in block copies. This produces a special form of the load
More information