



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The solutions to the final exam of the ece 2030 computer engineering course given in fall 2007. The solutions include problems on memory systems, mips assembly, microcode, numbers and k-maps, and implementation bonanza.
Typology: Exams
1 / 5
This page cannot be seen from the preview
Don't miss anything!




5 problems, 5 pages Final Exam Solutions 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 (^) Sqrt(2 30 ) = 2 15 = 32K number of words per column (^215) / 2^3 = 2^12 = 4K column decoder required ( n to m ) (^) 15 to 32K type of mux required ( n to m ) (^) 4K to 1
number of address lines in column number 15 number of address lines in column offset 12
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 (^) Log 2 (512M) = 29 chips needed in one bank (^) 4 bytes / 2 bytes = 2 chips/bank banks for memory system (^) 512M / 256M = 2 banks
memory decoder required ( n to m ) 1 to 2 DRAM chips required 2 x 2 = 4 chips
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.
D D D D
ADDR
CS D D D D
ADDR
CS D D D D
ADDR
CS
ADDR
27
MSEL
D D D D
64M x 4
D D D D
ADDR
CS
64M x 4
64M x 4
64M x 4
D D D D
A25:A0 26
In
Out
En
1 to 2
Out
A
5 problems, 5 pages Final Exam Solutions 11 December 2007
Problem 2 (8 parts, 36 points) “Break it down”
In this problem, you will write a subroutine that determines the maximum value in a 200 element integer array. To simplify the task, it is broken into several parts. Sometimes labels will be placed in code written for another part. Assume the array begins at address 5000. Return the array’s maximum value in $3.
reg content reg content reg content reg content $1 array pointer $2 array element $3 max value $4 predicate
Part A (6 points) Write a code fragment that initializes the array pointer and max value. label instruction comment Max: addi $1, $0, 5000 # init array pointer lw $3, ($1) # max = first array element
Part B (6 points) Write a code fragment that load the next array element. label instruction comment Loop: addi $1, $1, 4 # point to next element lw $2, ($1) # load next element
Part C (9 points) Write a fragment that adjusts the max value if necessary. label instruction comment slt $4, $3, $2 # if next value <= max beq $4, $0, Skip # then skip add $3, $2, $0 # else adjust max
Part D (6 points) Write a fragment that loops if all elements have not been tested. label instruction comment Skip: slti $4, $1, 5796 # if more elements remain bne $4, $0, Loop # then skip
Part E (3 points) Write a fragment that returns to caller. label instruction comment jr $31 # return to caller
Part F (6 points) Write a fragment that calls Max and then copies the result to register $5. label instruction comment jal Max # find maximum add $5, $3, $0 # copy max value to $
5 problems, 5 pages Final Exam Solutions 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) - 2
unsigned fixed-point (19 bits). (19 bits) - 2
signed fixed-point (23 bits). (15 bits) - 2
signed fixed-point (27 bits). (11 bits) - 2
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): (^0) to 1
largest represented value (power of two): (^2) 2K
approx. number of decimal significant figures: (^15)
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.
prime implicants
essential? yes no
simplified SOP expression (^) C ⋅ D + A ⋅ B ⋅ D + A ⋅ C ⋅ D
5 problems, 5 pages Final Exam Solutions 11 December 2007
Problem 5 (4 parts, 32 points) Implementation Bonanza
For each part implement the specified device. Label all inputs and outputs.
Part A (8 points) Implement the expression below using N and P type switches.
OUTX = A ⋅( B + C )+ D ⋅ E
A D
B C E
A
B
C
D E
OUTX
Part B (8 points) Implement the expression in mixed logic notation using NAND gates. OUTY =( A + B )⋅( C + D )
A B
C D
OUTY
Part B (8 points) Implement a 4 to 1 MUX using only pass gates and inverters.
IN 1
IN 0
S 0
IN 3
IN 2
S 1
OUT
Part D (8 points) Implement a divide by three counter using toggle cells and gates.
CEOut Clr Toggle
CEOut Clr Toggle
Ext CE
Ext CLR
O 0
O 1