Unlock access to all the studying documents.
View Full Document
Problem Solutions – Chapter 10
1
CHAPTER 10
© 2016 Pearson Education, Inc.
10–1.
a) Maximum frequency = 1/pipe stage delay = 1/0.8 ns = 1.25 GHz.
10-2.*
a) The latency time = 0.5 ns × 8 = 4.0 ns.
10–3.
10–4.
Register Indirect: Load, Store, JMR
10–5.
Problem Solutions – Chapter 10
2
10-6.*
Cycle 1: PC = 10F
10–7.
Cycle 1: IF PC = 10F
10–8.
Cycle 1: PC = 10F
10–9.
Cycle 1: PC = 10F
10-10.+
Answer not given; varies depending on synthesis software used.
10–11.*
Problem Solutions – Chapter 10
3
10-12.
SUB R7, R7, R2
BNZ R7, 000F
10–13*
a)
IF DOF EX WB
1 2 3 4 5 6 7
AND R8,R8,R7
1 2 3 4 5 6 7
b)
a)
IF DOF EX WB
1 2 3 4 5 6 7
MOV R7,R6
IF DOF EX WB
1 2 3 4 5 6 7
SUB R7,R7,R2
b)
10–14.
IF DOF EX WB
1 2 3 4 5 6 7
IF DOF EX WB
1 2 3 4 5 6
MOV R7,R6
IF
DOF
EX
WB
OR R4, R8, R2
AND
R8, R7, R4
IF
EX
WB
Data Hazards
Problem Solutions – Chapter 10
4
10–15.
PC−2: XXXXXXXX
A: XXXXXXXX
B: XXXXXXXX
RW: X
DA: XX
MD: X
BS: X
PS: X
MW: X
FS: X
MB: X
CS: X
D0: XXXXXXXX
D1: XXXXXXXX
D2: XXXXXXXX
RW: X
DA: XX
MD: X
Time Cycle 2
Problem Solutions – Chapter 10
5
10–16.*
exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher.
IR: XXXXXXXX
WB
D0: XXXXXXXX
D1:XXXXXXXX
D2:XXXXXXXX
RW:X
DA:XX
MD:X
Problem Solutions – Chapter 10
6
10–17.
10–18.
D0
0
C31
D0
C14
D0
C9
IM9
0
D0
C7
D0
C0
IM0
IM7
10–19.*
D0
AA3:0
FAA3:0
D0
DA3:0
FBA3:0
D0
BA3:0
FDA3:0
DOF
DOF
DOF
Problem Solutions – Chapter 10
7
10–20.
MZ0
MZ1
MZ-10
MZ-1
1MI PS Z
Problem Solutions – Chapter 10
10–21.
(a) Branch if overflow
(b) Branch if greater than zero
(c) Compare Less Than
RSA– RSB
CC L Z N C V
CGT2
01
18
1
1F
0
00
0
0
8
0
10
1
00
00
11
MCMC + 1 (NOP)
CGT3
01
00
0
00
0
00
0
0
0
0
00
0
00
00
00
MCMC + 1 (NOP)
CGT5
01
00
0
00
0
00
0
0
0
0
00
0
00
00
00
CGT6
01
00
0
00
0
11
0
0
0
0
01
1
00
00
10
CGT7
10
IDLE
0
00
0
00
0
0
0
0
00
0
00
00
00
Problem Solutions – Chapter 10
9
10–22.
(a) Push
(b) Pop
10–23.*
(a) Add with carry
(a) Subtract with borrow
PUSH1
01
00
0
00
0
00
0
0
0
0
00
0
00
00
00
PUSH2
01
00
0
01
0
00
0
1
0
0
00
0
00
00
00
PUSH3
00
0
00
0
00
0
0
0
0
00
0
00
00
00
Problem Solutions – Chapter 10
10
10–24.
(a) Add Memory Indirect
(b) Add to memory
10–25.*
Memory Scalar Add (Assume R[SB] > 0 to simplify coding)
AMI1
01
00
0
00
0
00
0
0
0
0
00
0
00
00
00
AMI2
01
00
1
10
1
00
0
0
0
0
00
0
10
00
00
AMI3
01
00
0
00
0
00
0
0
0
0
00
0
00
00
00
AMI4
01
00
1
01
0
00
0
0
2
0
00
0
00
10
00
AMI5
00
0
00
0
00
0
0
0
0
00
0
00
00
00
Problem Solutions – Chapter 10
11
10–26.
Memory Vector Add (Assume R[SB] > 0 to simplify coding)
10–27.
(a)
RDR(RSA31:24+ RSB31:24,
10–28.
(a) For 16-bit words, the operation can produce a 128-bit result containing 128/16 = 8 minimum words.
R18 R16 + RDR
MVA5
01
00
1
12
0
00
0
0
2
0
00
0
10
00
00
R19 MR17
MVA6
01
00
1
13
1
00
0
0
0
0
00
0
11
00
00
MVA7
01
00
1
14
1
00
0
0
0
0
00
0
12
00
00
R21 R19 + R20
MVA9
01
00
1
15
0
00
0
0
2
0
00
0
13
14
00
MVA11
01
00
0
01
0
00
0
1
0
0
00
0
12
15
00
00
0
00
0
00
0
0
0
0
00
0
00
00
00