



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
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Main points of this past exam are: Memory Chips, Closed Book, Closed Notes, Sram Cell, Memory Chips, Access Memory, Static Random, Random Access, Cycle Datapath, Rotational Shift
Typology: Exams
1 / 5
This page cannot be seen from the preview
Don't miss anything!
4 problems Exam Three December 3, 1999
Name: ____________________________________
Student ID# ________________________________
This exam is closed notes, closed book, and CALCULATORS ARE NOT PERMITTED. Show all work and place answers in the space provided. If more work space is needed, please use the back of the test sheet and make a note of this next to the problem number. Partial credit will only be given to work that is presented in a clear and structured manner.
Problem Number (Total Points) Points Awarded Problem #1 (25pts) Problem #2 (25pts) Problem #3 (25pts) Problem #4 (25pts)
Total Points: ________________
4 problems Exam Three December 3, 1999
Problem 1 (25points)
(a) (10 points) What does the implementation of a simple SRAM cell look like? Be sure you label the bit line and the word (or select) line. What does the acronym SRAM stand for?
(b) (15 point) Design a 4Mx8 memory system using four 1Mx8 memory chips. Be sure you indicate how many address lines you need for each chip. (Hint: you will need to add an extra decoder in this design to resolve the extra address lines needed for the 4Mx8 memory system.)
addr
cs we
1Mx d d d d d d d d
addr
cs we
1Mx d d d d d d d d
addr
cs we
1Mx d d d d d d d d
addr
cs we
1Mx d d d d d d d d
addr
cs we
1Mx d d d d d d d d
addr
cs we
1Mx d d d d d d d d
addr
cs we
1Mx d d d d d d d d
20
20
20
20
D D D D D D D D
D D D D D D D D
D D D D D D D D
D D D D D D D D
D D D D D D D D
D D D D D D D D
D D D D D D D D
D D D D D D D D
Enable
4 problems Exam Three December 3, 1999
Problem 3 (25pts) Microcode
The datapath below incorporates an adder/subtractor and a one bit logical shifter. The arithmetic operation is specified by add/sub control line. The subtraction is X-Y. The shift direction is controlled by the right /leftcontrol line. The enable signals determine which functional unit drives the Z bus. The datapath also contains a register file with 32, 32 bit registers. On each cycle, one add /subor shift operation can occur in the datapath.
Given this simplified datapath, write the corresponding microcode for the following operation
add / sub SU EN^ right / left
1 2 3 2 1 1 0 0 x 2 2 4 2 1 1 1 0 x 3 2 x 1 1 0 x 1 0 4 1 2 1 1 1 0 0 x 5 6 7 8 9 10 11
AU Shifter
Register File 32x
Z X Y 5 5 5
x out
y out
Write Z
we
au en
add/sub
32
32
32
4 problems Exam Three December 3, 1999
0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x1001000A 0x1001000B 0x1001000C
Problem 4 (25 points) Assembly Language
(a) (15 points) Show the values in the data segment for the following assembler directives? Assume that the machine is little endian ( HINT1: This means the “little” or least significant end of a word goes first in memory. HINT 2: This will only effect how you put the contents in memory with .word directive!) The ASCII for ‘y’ in decimal is (121) (^) 10, ‘2’ is (50) 10 , ‘k’ is (107) 10.
.data .byte 0x45,0x .asciiz “y2k” .byte 0x .align 2 .word 0x
(b) (10 points) Write the assembly language code for the following if-then-else statement in pseudocode.
$R3 = 25; //load 25 into register $R if ($R1== $R2) //if the value in register $R1 is equal to register $R2 then add 1 to $R {$R1 = $R1+1;} else //else add five to $R {$R1 = $R1+5;} $R4 = $R1 + $R3 //add $R1 and $R3 and put result in $R
addi $R3, $zero, 25 bne $R1, $R2, ELSE addi $R1, $R1, 1 j END ELSE: addi $R1, $R1, 5 END: add $R4, $R1, $R