You are on page 1of 2

CS 5375 Homework No.

4
Due date: October 28
th
at midnight

Note: all homework will be graded based on your work and rationale used to reach
your solution
1. Recall that !"# neeus a compaiison that is peifoimeu at the EX stage, while the taiget
auuiess is calculateu in "uata access" stage. Consiuei the numbei of uelays intiouuceu to
iesolve the conuition, anu calculate the taiget auuiess. 1) Biaw a time-space uiagiam foi the
coue given below, b) inuicate the numbei of uelays neeueu intiouuceu by !"# , anu c) ueiive
the total numbei of cycles iequiieu to execute the coue sequence:
auu $4, $2, $6
beq $1, $2, L
sw $4, 1uu($su)
..
L:
oi $7, $8, $9

2. Examine the following time-space uiagiam that shows a possible execution of the sequence
in pioblem 1. It shows in this case, that the bianch is taken.
a. Compaie the numbei of bubbles (uelays) intiouuceu in pioblem 1 anu explain why
only one bubble is neeueu in the solution below.

b. Note fiom the uiagiam that ! = 2uu ps. Beiive the execution time fiom the time-
space uiagiams in pioblem 1 anu pioblem 2. What is the speeuup.




S. This exeicise is intenueu to ieinfoice a goou unueistanuing of exceptions.
a. Biiefly explain how NIPS is uesigneu to hanule exceptions.
b. The sliue 111 shows a piece of coue useu in illustiating exception hanuling. 0se this
coue anu iepoit the contents of the iegistei EPC, anu the contents of the Cause
iegistei when the hanulei takes ovei.
c. What initial auuiess of the hanulei woulu be loaueu into PC anu what woulu the
contents of the PC be if the hanulei ietuins contiol to the inteiiupteu piogiam.

4. Biiefly explain the following teiminology:
a. Bynamic bianch pieuiction
b. Supei pipeline machines
c. Supeiscalai machines
u. Nultiple issue
e. Bynamic scheuuling

S. Consiuei the following lines of coue useu to uo matiix opeiations:
Foi (i=u, i<8, i++)
Foi (j=u; j<1uuuu; j++)
A|ij|jj = B|ij|uj + A|jj|ij
a. Suppose each element is a S2-bit integei. Bow many integeis can be stoieu in a S2-
byte block. Show youi woik.
b. Examine the coue anu iuentify which iefeiences exhibit tempoial locality anu which
exhibit spatial locality. }ustify youi answei.

6. A uiiect-mappeu cache uesign with a S2-bit auuiess has the following auuiess fielus: a S-bit
byte-offset fielu, a S-bit inuex fielu, anu a 22-bit tag fielu.
a. Inuicate the size of each block fiame in woius.
b. Inuicate the numbei of block fiames in the cache.

7. Besign a 64KB uiiect-mappeu uata cache that uses a S2-bit auuiess anu 16 bytes pei block.
Calculate the following:
a. Bow many bits aie useu foi the byte offset.
b. Bow many bits aie useu foi the inuex fielu.
c. Bow many bits aie useu foi the tag fielu.

You might also like