Sample Midterm Test
First-page document preview for Sample Midterm Test in COE 818: Advanced Computer Architecture at Toronto Metropolitan University (TMU). Inspect the first page below or request the complete PDF study document for free.
Independent study archive Learn more
Materials are uploaded by users for self-study purposes. PwnHero is an independent platform, not affiliated with, sponsored by, or endorsed by any university or institution.
University
Toronto Metropolitan University (TMU)
Course
COE 818: Advanced Computer Architecture
Format
Practice Midterm
Year
Recent Term
📄 Page 1 Preview
Page 1 Key Topics & Excerpt
🔍 Text Transcript
First page excerpt for quick study reference. Complete formulas, diagrams, and subsequent pages are available in the full document.
PwnHero
ELE 818 * ADVANCED COMPUTER ARCHITECTURES * MIDTERM TEST *
SAMPLE
1 Section: Simple pipeline for integer operations
For all following questions we assume that:
a) Pipeline contains 5 stages: IF, ID, EX, M and W;
b) Each stage requires one clock cycle;
c) All memory references hit in cache;
d) Following program segment should be processed:
// ADD TWO INTEGER ARRAYS
LW R4 # 400
L1: LW R1, 0 (R4) ; Load first operand
LW R2, 400 (R4) ; Load second operand
ADDI R3, R1, R2 ; Add operands
SW R3, 0 (R4) ; Store result
SUB R4, R4, #4 ; Calculate address of next element
BNEZ R4, L1 ; Loop if (R4) != 0
Question # 1.1
Calculate how many clock cycles will take execution of this segment on the regular (non-
pipelined) architecture. Show calculations:
Number of cycles = (2)
Question # 1.2
Calculate how many clock cycles will take execution of this segment on the simple
pipeline without forwarding or bypassing when result of branch instruction (new PC
content) is available after WB stage. Show timing of one loop turn on Fig 1.1:
Instruction
Clock cycle number .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
LW R1, 0 (R4)
LW R2, 400 (R4)
ADDI R3,R1,R2
SW R3, 0 (R4)
SUB R4, R4, #4
BNEZ R4, L1
Fig 1.1
Number of cycles = (2)
PwnHero.com
More Popular Resources in COE 818: Advanced Computer Architecture
Final Examination Solutions Winter 1999
Final Exam • Page 1 Preview
Final Examination Solutions Winter 2006
Final Exam • Page 1 Preview
Final Examination Solutions Winter 2012
Final Exam • Page 1 Preview
Final Examination Winter 1999
Final Exam • Page 1 Preview
Final Examination Winter 2006
Final Exam • Page 1 Preview
Midterm Test Solutions Winter 2012
Midterm Exam • Page 1 Preview
Midterm Test Solutions Winter 2013
Midterm Exam • Page 1 Preview
Sample Midterm Test Solutions
Practice Midterm • Page 1 Preview