f13_3300_e1.pdf
f13_3300_e1.pdf
<answers>
+18, +9, +3, +6
-6, -3, -9, +15
<suggested answer>
A program used to measure performance on a computer system, e.g., Dhrystone
3.
a. _________________
b. _________________
c. _________________
d. _________________
e. _________________
f. _________________
datapath
transistor
wafer
yield
throughput
CPU time
CPI
workload
arithmetic mean
harmonic mean
geometric mean
speedup
Linpack
Whetstone
Dhrystone
SPEC
<answers>
supercomputer, server, wafer, speedup, geometric mean, SPEC
4. Give the CPU time equation and define the terms you use. (6 pts.)
<answer>
CPU time = IC * CPI * CCT
IC * CPI
or CPU time = -------CR
IC is instruction count
CPI is cycles per instruction
CCT is clock cycle time (which is equal to 1/CR)
CR is clock rate
5. Find the execution time for a program that executes 10 billion instructions on
a processor with an avg. CPI of 2.5 and a clock frequency of 2 GHz. (6 pts.)
<answer>
( 10 * 10^9 instructions ) * ( 2.5 cycles/instruction )
------------------------------------------------------- = 12.5 seconds
2 * 10^9 cycles/second
6. For the following workload and cycle values, find the average CPI. (3 pts.)
type
| freq cycles
-------+-------------alu
| 0.2
1
ld/st | 0.2
2
branch | 0.6
4
CPI = _____________________________
<answer>
CPI = .2*1 + .2*2 + .6*4 = 3
7. If a new compiler for the computer in question 6 could reduce the number of
instructions to 1/2 of the original total and alter the instruction frequencies
in the following manner, what would be the total speedup? (8 pts.)
type
| freq cycles
-------+-------------alu
| 0.5
1
ld/st | 0.25
2
branch | 0.25
4
<answer>
Note that there is a change in IC and CPI but not CCT.
New IC = 0.5 * original IC
New CPI = 0.5*1 + .25*2 + .25*4 = 2
IC * CPI * CCT
IC * 3 * CCT
Speedup = ------------------------ = ----------------- = 3
IC_new * CPI_new * CCT
.5*IC * 2 * CCT
(note that IC and CCT cancel out, so you did not need to know their values)
<answer>
1
1
Overall speedup = ----------------- = ----------- -> simplifies to 40/19
f
.4 + .6/8
( 1 f ) + --s
9. Matching -- logic terms. Write the correct term into each blank. (1.5 pts. each)
minterm
sum of products
don't care
glitch
a. _________________
b. _________________
c. _________________
d. _________________
e. _________________
f. _________________
g. _________________
h. _________________
race condition
circuit depth
fan-in
fan-out
half adder
full adder
decoder
multiplexer
ALU
PLA
latch
flip-flop
register
shift register
RS latch
JK flip-flop
<answers>
dont care, glitch, sum of products, race condition,
circuit depth, multiplexer, flip-flop, shift register
F = fn(A,B,C) = _________________________
F = fn(A,B,C,D) = _______________________
d = don't care
<answers>
\ BC
A \ 00
01
11
10
+----+----+----+----+
0 | 1 | 0 | 1 | 1 |
+----+----+----+----+
1 | 0 | 0 | 1 | 0 |
+----+----+----+----+
\ CD
AB \ 00
01
11
10
+----+----+----+----+
00 | 1 | 0 | 0 | 0 |
+----+----+----+----+
01 | 1 | 1 | d | 1 |
+----+----+----+----+
11 | 1 | d | d | 0 |
+----+----+----+----+
10 | 1 | 0 | d | 0 |
+----+----+----+----+
F =
_ _
A*C
B*C
F =
_
A*B
_ _
C*D
11. Design a two-bit counter with the following repeated sequence: 0,1,3,2
(a) Give the state diagram. (3 pts.)
(b) Give the state transition table with current states QA(t) and QB(t), and
next states QA(t+1) and QB(t+1). (3 pts.)
(c) Give the simplified logic expressions for QA(t+1) and QB(t+1). (3 pts.)
<answers>
00
10
01
11
QA(t+1) = QB(t)
_____
QB(t+1) = QA(t)
12. Design a three-bit counter with the following repeated sequence: 0,1,3,7,6,4
(a) Give the
(b) Give the
and next
(c) Give the
(6 pts.)
<answers>
000
(unused states)
100
001
010
110
011
111
\ QB*QC
QA \ 00
01
11
10
+----+----+----+----+
0 | 0 | 0 | 1 | d |
+----+----+----+----+
1 | 0 | d | 1 | 1 |
+----+----+----+----+
QA(t+1) = QB(t)
\ QB*QC
QA \ 00
01
11
10
+----+----+----+----+
0 | 0 | 1 | 1 | d |
+----+----+----+----+
1 | 0 | d | 1 | 0 |
+----+----+----+----+
QB(t+1) = QC(t)
101
\ QB*QC
QA \ 00
01
11
10
+----+----+----+----+
0 | 1 | 1 | 1 | d |
+----+----+----+----+
1 | 0 | d | 0 | 0 |
+----+----+----+----+
_____
QC(t+1) = QA(t)