Docsity

Module #10B - Computer Architecture II | ECE 332, Assignments of Computer Architecture and Organization

Toggle sidebar
bg1
ec332 Name_______________________
Date________________________
Module 10b Due the next class meeting after the 2nd half of Module 10 is done in class.
Each of the sample code segments below has a MII>1. Why? Show your work for full credit.
loopA: ldh *a_m++, a
ldh *b_m++, b
add a,5,c
mpy a,c,d
[b0] sub b0,1,b0
[b0] b loopA
loopB: ldw *a_m++, a
ldw *b_m++, b
mpysp a,b,prod
addsp sum,prod,sum
[b0] sub b0,1,b0
[b0] b loopB
loopC: ldh *a_m++, a
ldh *b_m++, b
mpy a,c,c
add b,c,d
[b0] sub b0,1,b0
[b0] b loopC
Note: addsp and mpysp are floating-point instructions that are like their integer counter parts,
except their results don’t appear until 3 cycles later.

Partial preview of the text

Download Module #10B - Computer Architecture II | ECE 332 and more Assignments Computer Architecture and Organization in PDF only on Docsity!

ec332 Name_______________________ Date________________________

Module 10b Due the next class meeting after the 2nd^ half of Module 10 is done in class.

Each of the sample code segments below has a MII>1. Why? Show your work for full credit.

loopA: ldh *a_m++, a ldh *b_m++, b add a,5,c mpy a,c,d

[b0] sub b0,1,b [b0] b loopA

loopB: ldw *a_m++, a ldw *b_m++, b mpysp a,b,prod addsp sum,prod,sum

[b0] sub b0,1,b [b0] b loopB

loopC: ldh *a_m++, a ldh *b_m++, b mpy a,c,c add b,c,d

[b0] sub b0,1,b [b0] b loopC

Note: addsp and mpysp are floating-point instructions that are like their integer counter parts, except their results don’t appear until 3 cycles later.