Docsity

ECE 2030 Fall 2007 Computer Engineering Final Exam, Exams of Computer Science

Toggle sidebar
bg1
ECE 2030 10:00am Computer Engineering Fall 2007
5 problems, 7 pages Final Exam 11 December 2007
1
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have
a question, raise your hand and I will come to you. Please work the exam in pencil and do not
separate the pages of the exam. For maximum credit, show your work.
Good Luck!
Your Name (please print) ________________________________________________
1 2 3 4 5 total
30 36 26 36 32 160
Select your favorite chips?
A B C
pf3
pf4
pf5

Partial preview of the text

Download ECE 2030 Fall 2007 Computer Engineering Final Exam and more Exams Computer Science in PDF only on Docsity!

5 problems, 7 pages Final Exam 11 December 2007

Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have

a question, raise your hand and I will come to you. Please work the exam in pencil and do not

separate the pages of the exam. For maximum credit, show your work.

Good Luck!

Your Name ( please print ) ________________________________________________

1 2 3 4 5 total

Select your favorite chips?

A B C

5 problems, 7 pages Final Exam 11 December 2007

Problem 1 (3 parts, 30 points) Memory Systems

Part A (12 points) Consider a 1 Gbit DRAM chip organized as 128 million addresses of one byte

words. Assume both the DRAM cell and the DRAM chips 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

number of words per column

column decoder required ( n to m )

type of mux required ( n to m )

number of address lines in column number

number of address lines in column offset

Part B (10 points) Consider a two gigabyte memory system with 512 million addresses of 4 byte words

using a 256 million address by 16 bit word memory DRAM chip.

word address lines for memory system

chips needed in one bank

banks for memory system

memory decoder required ( n to m )

DRAM chips required

Part C (8 points) Design a 128 million address by 8 bit memory system with four 64M 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.

64M x 4

D
D
D
D
ADDR
CS

64M x 4

D
D
D
D
ADDR
CS

64M x 4

D
D
D
D
ADDR
CS
ADDR
MSEL
D
D
D
D

64M x 4

D
D
D
D
ADDR
CS
D
D
D
D

5 problems, 7 pages Final Exam 11 December 2007

Problem 3 (3 parts, 26 points) Microcode

Using the supplied datapath, write microcode fragments to accomplish the following procedures.

Express all values in hexadecimal notation. Use ‘X’ when a value is don’t cared. For maximum

credit, complete the description field. ∩ means bitwise logical AND. Use only registers 1, 2,

and 3.

Part A (13 points) 3

1 2

R

R R

R − ×

# X Y Z rwe im en

im va au en

-a /s

lu en

lf su en

st ld en

st en

r/ -w

msel description

Part B (7 points) Copy mem[100] to mem[200]. Use only registers 1, 2

# X Y Z rwe im en

im va au en

-a /s

lu en

lf su en

st ld en

st en

r/ -w

msel description

Part C (6 points) Write a microcode sequence that places ten bits (bit 14 through bit 5) of R 1 into

the least significant ten bits of R 2. All other bits should be cleared. R 1 should not be modified.

# X Y Z rwe im en

im va au en

-a /s

lu en

lf su en

st ld en

st en

r/ -w

msel description

5 problems, 7 pages Final Exam 11 December 2007

Problem 4 (3 parts, 36 points) Numbers and K-Maps

Part A (15 points) For the 38 bit representations below, determine the most negative value, most

positive value, and step size (difference between sequential values). All answers should be

expressed in decimal notation. Fractions (e.g., 3/16ths) may be used.

representation most negative value most positive value step size

signed integer

(38 bits). (0 bits)

unsigned fixed-point

(19 bits). (19 bits)

signed fixed-point

(23 bits). (15 bits)

signed fixed-point

(27 bits). (11 bits)

Part B (9 points) Answer the following questions for a 64 double precision floating point

representation (1 sign bit, 51 mantissa bits, 12 exponent bits).

range of mantissa values (in decimal): to

largest represented value (power of two):

________

approx. number of decimal significant figures:

Part C (12 points) For the follow Karnaugh Map, derive a simplified sum of products

expression. Circle and list the prime implicants, indicating which are essential.

0 0 X 1

1 0 0 X

0 1 X 0

A

A

B B

C

C

C

D

D D

prime implicants

essential?

yes no

simplified SOP expression

5 problems, 7 pages Final Exam 11 December 2007

memory

register

file

32 x 32

5 5 5

rwe

X Y Z

au en

-a/s

arithmetic

unit

sign extender

im en im va

lu en

logical

unit

lf 4

addr

data

r/-w msel

st en

ld en

shift types 0 = logical 1 = arithmetic 2 = rotate

  • count shifts right
  • count shifts left

logical functions X Y out 0 0 lf (^0) 1 0 lf (^1) 0 1 lf (^2) 1 1 lf (^3)

cycle cycle number X register driven onto X bus Y register driven onto Y bus Z register written from Z bus rwe register write enable im en immediate enable on Y bus im va immediate value

au en arithmetic unit enable -a/s -add / sub (0 = add, 1 = subtract) lu en logical unit enable lf logical function su en shift unit enable st shift type ld en load enable st en store enable r/-w read/-write (0 = write, 1 = read) msel memory select description operation description

su en

shift

unit

st 2

count

16

32

instruction example meaning

add add^ $1,$2,$3^ $1^ =^ $2^ +^ $ subtract sub^ $1,$2,$3^ $1^ =^ $2^ -^ $ add immediate addi $1,$2,100 $1 = $2 + 100 multiply mul $1,$2,$3 $1 = $2 * $ divide div $1,$2,$3 $1 = $2 / $ and and $1,$2,$3 $1 = $2 & $ or or $1,$2,$3 $1 = $2 | $ xor xor $1,$2,$3 $1 = $2 xor $ and immediate andi $1,$2,100 $1 = $2 & 100 or immediate ori $1,$2,100 $1 = $2 | 100 xor immediate xori $1,$2,100 $1 = $2 xor 100 shift left logical sll $1,$2,5 $1 = $2 << 5 (logical) shift right logical srl $1,$2,5 $1 = $2 >> 5 (logical) shift left arithmetic sla $1,$2,5 $1 = $2 << 5 (arithmetic) shift right arithmetic sra $1,$2,5 $1 = $2 >> 5 (arithmetic) load word lw^ $1,^ ($2)^ $1^ =^ memory^ [$2] store word sw^ $1,^ ($2)^ memory^ [$2]^ =^ $ load upper immediate lui^ $1,100^ $1^ =^100 x^2 branch if equal beq^ $1,$2,100^ if^ ($1^ =^ $2),^ PC^ =^ PC^ +^4 +^ (1004) branch if not equal bne $1,$2,100 (^) if ($1 ≠ $2), PC = PC + 4 + (1004)

set if less than slt^ $1,^ $2,^ $3^ if^ ($2^ <^ $3),^ $1^ =^1 else^ $1^ =^0 set if less than immediate slti^ $1,^ $2,^100 if^ ($2^ <^ 100),^ $1^ =^1 else^ $1^ =^0 jump j^10000 PC^ =^ 10000* jump register jr^ $31^ PC^ =^ $ jump and link jal^10000 $31^ =^ PC^ +^ 4;^ PC^ =^ 10000*