Docsity

Exam Three for Computer Engineering Fall 2007 - Problem Set, Exams of Computer Science

Toggle sidebar
bg1
ECE 2030 12:00pm Computer Engineering Fall 2007
4 problems, 6 pages Exam Three 28 November 2007
1
Problem 1 (3 parts, 30 points) Memory Systems
Part A (12 points) Consider a 64Mbit DRAM chip organized as 2 million addresses of 32-bit words.
Assume both the DRAM cell and the DRAM chip are square. The column number and offset concatenate
to form the memory address. Using the organization approach discussed in class, answer the following
questions about the chip. Express all answers in decimal (not powers of two).
number of columns K822 1326 ==
number of words per column 25622/2 8513 ==
column decoder required (n to m) 13 to 213 = 13 to 8K decoder
type of mux required (n to m) 256 to 1
number of address lines in column number 13
number of address lines in column offset log(256) = 8
Part B (10 points) Consider an two gigabyte memory system with 1 billion addresses of 16-bit words
using a 16 million address by 8-bit word memory DRAM chip.
word address lines for memory system 30
chips needed in one bank 22/2 34 =chips
banks for memory system 6422/2 62430 ==
memory decoder required (n to m) 6 to 64 decoder
DRAM chips required 2x64 = 128
Part C (8 points) Design a 16 million address by 8 bit memory system with four 8M x 4 memory chips.
Label all busses and indicate bit width. Assume R/W is connected and not shown here. Use a bank
decoder if necessary.
8M x 4
D0
D1
D2
D3
ADDR
CS
8M x 4
D0
D1
D2
D3
ADDR
CS
8M x 4
D0
D1
D2
D3
ADDR
CS
ADDR
24
MSEL
D0
D1
D2
D3
8M x 4
D0
D1
D2
D3
ADDR
CS
D4
D5
D6
D7
23 A22:0
1 to 2
decoder
EN
O0
O1
S
A23
23
23
23
23
pf3
pf4

Partial preview of the text

Download Exam Three for Computer Engineering Fall 2007 - Problem Set and more Exams Computer Science in PDF only on Docsity!

4 problems, 6 pages Exam Three 28 November 2007

Problem 1 (3 parts, 30 points) Memory Systems

Part A (12 points) Consider a 64Mbit DRAM chip organized as 2 million addresses of 32-bit words. Assume both the DRAM cell and the DRAM chip are square. The column number and offset concatenate to form the memory address. Using the organization approach discussed in class, answer the following questions about the chip. Express all answers in decimal (not powers of two).

number of columns (^2 26) = 213 = 8 K

number of words per column (^2 13) / 25 = 28 = 256

column decoder required ( n to m ) 13 to 2 13 = 13 to 8K decoder type of mux required ( n to m ) (^) 256 to 1

number of address lines in column number 13 number of address lines in column offset log(256) = 8

Part B (10 points) Consider an two gigabyte memory system with 1 billion addresses of 16-bit words using a 16 million address by 8-bit word memory DRAM chip.

word address lines for memory system 30

chips needed in one bank (^2 4) / 23 = 2 chips

banks for memory system (^2 30) / 224 = 26 = 64

memory decoder required ( n to m ) 6 to 64 decoder DRAM chips required 2x64 = 128

Part C (8 points) Design a 16 million address by 8 bit memory system with four 8M x 4 memory chips. Label all busses and indicate bit width. Assume R/W is connected and not shown here. Use a bank decoder if necessary.

8M x 4

D D D D

ADDR

CS

8M x 4

D D D D

ADDR

CS

8M x 4

D D D D

ADDR

CS

ADDR

24

MSEL

D D D D

8M x 4

D D D D

ADDR

CS

D D D D

23 A22:

1 to 2 decoder EN

O O

S

A

23

23

23

23

4 problems, 6 pages Exam Three 28 November 2007

Problem 2 (3 parts, 24 points) Datapath Elements

Part A (6 points) Suppose the following inputs (in hexadecimal) are applied to the 32-bit barrel shifter used in the datapath. Determine the output (in hexadecimal). Assume the shift amount is drawn from the 16-bit immediate value.

Shift Type Shift Amount Input Value Output Value logical 0xFFFC^12345678^23456780

arithmetic 0x000C^ 8125C203^ FFF8125C

rotate 0x0008^ FEDCBA98^ 98FEDCBA

Part B (8 points) For each bitwise logical function specification below, determine the LF code (in hexadecimal) to correctly program the logical unit.

X Y Out logical function LF

0 0 LF (^0) X ⋅ Y 7

1 0 LF (^1) X ⋅ Y 2

0 1 LF 2 X + Y 7

1 1 LF 3 X + Y E

Part C (10 points) Suppose a datapath has three operand busses (two source, one destination), 128 operation types, and 64 registers where each register is 16 bits wide. Immediate operands can be in the range of ±32K. Determine the following values for the resulting instruction format. For the last two questions, assume the same operand number and types used in the MIPS format.

bits needed to specify an opcode (^7)

bits needed to specify a register operand (^6)

bits needed to specify an immediate operand (^16)

minimum # bits needed to specify an R-format instruction 7+6+6+6 = 25

minimum # bits needed to specify an I-format instruction (^) 7+ 6 + 6 + 16 = 35

4 problems, 6 pages Exam Three 28 November 2007

Problem 4 (2 parts, 20 points) Sonny State Machine

Suppose you are designing a drought advisory state machine for the governor. It has two input signals:

S / R (which is 1 if the state of GA has had more mostly sunny days than rainy or cloudy days) and U / C (which is 1 if average water usage is above 100 gallons/person). There are three outputs:

  • W=1 if water restrictions are recommended
  • E=1 if a state of emergency should be declared
  • L=1 if lake water should be released (e.g., to ease flooding). There are four states: State number (S 1 S 0 ) Mnemonic Name Lake Lanier Water Level 0 0 Flood level > 1085 ft 0 1 Summer level 1071 – 1085 ft 1 0 Moderate Drought 1060 – 1070 ft 1 1 Severe Drought < 1060 ft The following state machine diagram describes the drought advisory machine’s behavior. Recall that the notation “A;B” means “A OR B.”

flood

summer

mod.

drought

severe

drought

CR/L U;S/ U;S/ US/EW US/W

CR/EL C;R/ C;R/

Part A (14 points) Based on this state diagram, complete the state table below. S 1 S (^0) S / R U / C NS 1 NS 0 W E L (^0 0 0 0 0 0 0 0 ) 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 1 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 0 1 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 Part B (6 points) Give simplified Boolean expressions for the three outputs. Use the non-negated form of signals if they are available (e.g., use “R” instead of “not S” and “C” instead of “not U”).

W = S 1 S U. E = S 1 S 0 SU + S 1 S 0 CR L = S 1 RC