


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



4 problems, 4 pages Exam Three Solutions 1 December 2010 Problem 1 (3 parts, 30 points) Memory Systems Part A (12 points) Consider a DRAM chip organized as 4 million addresses of 16 -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). total number of bits in address (^) log 2 (4M) = 22 number of columns (^) sqrt(2^22 x2^4 ) = sqrt(2^26 ) = 2^13 = 8K column decoder required ( n to m ) (^) 13 to 8K number of words per column (^) 8K / 16 = 512 type of mux required ( n to m ) (^) 512 to 1 number of address lines in column offset (^) 9 Part B (10 points) Consider a memory system with 256 million addresses of 128 -bit words using 4 million address by 16-bit word memory DRAM chips. word address lines for memory system log 2 (256M) = 28 chips needed in one bank 128/16 = 8 banks for memory system 256M / 4M = 64 memory decoder required ( n to m ) 6 to 64 DRAM chips required 8 x 64 = 512 Part C (8 points) Design a 16 million address by 8 bit memory system with 8 million x 4 bit memory chips. Label all busses and indicate bit width. Assume R/W is connected and not shown here. Use a bank decoder if necessary. Be sure to include the address bus, data bus, and MSEL. ADDR MSEL 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 8M x 4 D D D D ADDR CS D D D D D D D D 24 23 23 23 23 A22: A 1 to 2 decoder S EN O O
4 problems, 4 pages Exam Three Solutions 1 December 2010 Problem 2 (3 parts, 2 3 points) Datapath Elements and State Machines 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 0x00^10 BEAD2533^ 0000BEAD arithmetic 0x001^4 39317 ACE^^00000393 rotate 0xFFF^8 FADE^3650 DE3650FA Part B ( 9 points) Consider the following input and output values for a logical operation. Determine the logical function and function code (in hexadecimal) required for the operation. X Input Y Input Output Logical Function Function Code DCBA4321 FF00FF 00 FFBAFF21 (^) OR E DCBA4321 FF00FF 00 23FFBCFF (^) NAND 7 DCBA4321 FF00FF 00 00FF00FF (^) Y 3 Part C ( 8 points) Given the following finite state diagram, fill in the state table below. S 1 S 0 0 0
S 1 S 0 C/D NS 1 NS 0 Z S 1 S 0 C/D NS 1 NS 0 Z 0 0 0^1 0 0 1 0 0^0 0 0 0 1 0 1 0 1 0 1 1 1 0 0 1 0 1 1 0 1 1 0 0 1 0 0 1 1^1 0 0 1 1 1^0 0 Give the simplified Boolean expression for computing Z in terms of the current state and the input. Z = S 1 โS0โD + S 1 โS0โC = S 1 (S0โD + S0โC) = S1(S0 XOR C).
4 problems, 4 pages Exam Three Solutions 1 December 2010 Problem 4 ( 3 parts, 17 points) Assembly Programming For maximum credit in each of the following problems, use the fewest number of instructions. Part A ( 6 points) Write a MIPS code fragment that reads an integer value from memory location 1000 and puts it into register $6. Use only registers $0 and $6. label instruction comment addi $6, $0, 1000 # load address in R lw $6, ($6) # R6 โ mem[1000] Part B ( 7 points) Write a MIPS code fragment that branches to the label Target if register $3 โฅ $4. Use only registers $3, $4, $2, and $0. label instruction comment slt $2, $3, $4 # if R3 >= R beq $2, $0, Target # then branch to target Part C ( 4 points) Write a MIPS code fragment that divides the integer in register $7 by 32 and put the result in register $7. Use only register $7. label instruction comment sll $7, $7, 5 # R7 โ R7 >> 5