Computer Engineering Exam 3, Spring 2004 - Memory Systems, Datapath, Instruction Formats, Exams of Electrical and Electronics Engineering

The instructions and problems for exam three of the computer engineering course offered in spring 2004. The exam covers various topics including memory systems, datapath elements, instruction formats, and microcode. Students are required to solve four problems, each with multiple parts, and show their work for maximum credit. The exam is a closed-book, closed-notes exam and calculators are not permitted.

Typology: Exams

Pre 2010

Uploaded on 08/04/2009

koofers-user-6qs
koofers-user-6qs 🇺🇸

7 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE 2030 H Computer Engineering Spring 2004
4 problems, 5 pages Exam Three 15 April 2004
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. If you finish early, please check your work
until the bell rings so as not to disturb others that are still working. 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 total
35 35 9 21 100
pf3
pf4
pf5

Partial preview of the text

Download Computer Engineering Exam 3, Spring 2004 - Memory Systems, Datapath, Instruction Formats and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

4 problems, 5 pages Exam Three 15 April 2004

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. If you finish early, please check your work

until the bell rings so as not to disturb others that are still working. 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 total

4 problems, 5 pages Exam Three 15 April 2004

Problem 1 (3 parts, 35 points) Memory Systems

The following three parts consider memory systems built using a 1MByte DRAM organized as 2 million

addresses of 4-bit words.

Part A (8 points) Consider a memory system organized as 16 million addresses of 64-bit words.

number of chips needed in one bank

number of banks for memory system

number of memory system address bits

memory decoder required ( n to m )

number of DRAM chips required

memory system capacity (in MBytes )

Part B (8 points) Consider a memory system with 32 DRAM chips total and a 2-to-4 memory decoder.

number of banks

number of chips used in one bank

number of addresses

word size (in bits )

memory system capacity (in MBytes )

Part C (19 points) Design a 4 million address by 8 bit memory system with four 2M x 4 memory chips.

Label all busses and indicate bit width. Assume R/W is connected and not shown here. Use a decoder if

necessary.

2M x 4

D

D

D

D

ADDR

CS

2M x 4

D

D

D

D

ADDR

CS

2M x 4

D

D

D

D

ADDR

CS

ADDR

MSEL

D

D

D

D

2M x 4

D

D

D

D

ADDR

CS

D

D

D

D

4 problems, 5 pages Exam Three 15 April 2004

Problem 3 (3 parts, 9 points) Instruction Formats

An instruction format has the following field lengths for R-type and I-type instructions.

opcode RD RS1 RS

7 bits 6 bits 6 bits 6 bits

opcode RD RS1 immediate value

7 bits 6 bits 6 bits 24 bits

Part A (3 points) How many registers are there?

Part B (3 points) How many instruction types are there?

Part C (3 points) What is the range of immediate values?

Problem 4 (4 parts, 21 points) Microcode

Use the data path attached to the exam to answer the following. For maximum credit, use the minimum

number of microinstructions to code the answer. Put an “x” in fields that are “don’t cares”. Express any

immediate values in hexadecimal.

Part A (5 points) Suppose register 3 holds the variable X and register 6 holds the variable Y. Write a

microinstruction to compute the boolean expression X + Y and store it in register 9.

# X Y Z rwe im en

im va au en

-a /s

lu en

lf su en

st ld en

st en

r/ -w

m sel

description

1

Part B (5 points) Write a microinstruction to clear register 5 using only the logical unit.

# X Y Z rwe im en

im va au en

-a /s

lu en

lf su en

st ld en

st en

r/ -w

m sel

description

2

Part C (6 points) Write a microcode fragment (1 or more microinstructions) that writes the value that is

in register 15 to memory location 0xBAC. You may not need to use all the rows in the table. You may

use other registers as needed.

# X Y Z rwe im en

im va au en

-a /s

lu en

lf su en

st ld en

st en

r/ -w

m sel

description

3

4

5

6

Part D (5 points) Suppose register 1 holds the variable A which represents a signed integer. What

algebraic expression is computed by the following microcode and stored in register 2? Express your

answer in terms of A (e.g., 8-2A ) not as a Boolean expression. Unfortunately, don’t care values (X) have

been converted to zeros.

# X Y Z rwe im en

im va au en

-a /s

lu en

lf su en

st ld en

st en

r/ -w

m sel

description

7 1 0 2 1 0 0 0 0 1 0x5 0 0 0 0 0 0

8 2 0 2 1 1 1 1 0 0 0 0 0 0 0 0 0

This microcode computes the expression:

4 problems, 5 pages Exam Three 15 April 2004

memory

register

file

32 x 32

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