


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!



Final Exam: Tue, Dec. 12, Time: 1-3 pm Exam Format: Open book with only text and 2 pages of notes Total Points: 100
Important Note : (1) Write your name on the top of this question sheet and submit along with your answer book (2) You need to show all your work clearly in deriving the answers. Just writing down the final answers is not enough.
Suggestion : Begin by reading all questions and do those first that you think you know best.
shl_b =1 means contents of B are shifted left by 1 bit
selb
(Cntr) value =
shl_b
reset_a reset_b
reset_a =1 means A <− 0 reset_b =1 means B <− 0
selinp
reset_areset_bshl_b selinp
selop
selop
cntrzero
= 0 means I0 inp. conn. to A= 1 means I1 inp. conn. to A selb, selinp, selop also control Muxes and have similar interpret− ation of their 0/1 values
16
16 16
I1 I 2:1 mux
16 (^161616)
ldr (^) R
16 Description of status signals: cntrzero = 1 means counter
16
16
X Y
(^16 )
A B
s
Description of control signals:
NOTE: All write/cnt up operations complete only at the +ve edge of the next cc (since they all load new values into regs) NOTE: Signal lines without any specified width are 1−bit wide
I1 I 2:1 mux
lda = 1 means load/write A
sela
ldb = 1 means load/write B
lda ldb reset_cnt
cnt_dn^ cnt_up
Cntr
2:1 muxI1^ I
16 16
16
16−bit multiplier
Controller (C.U.)
ldaldbselaldrldq
ldcntr
I1 I 2:1 mux
cnt_up = 1 means Cntr <− Cntr + cnt_dn = 1 means Cntr <− Cntr − reset_cnt = 1 means Cntr <− 0
ldcntr
sela controls i/p conn. Mux to reg. A
ldr = 1 means load/write R
ldcntr = 1 means load/write Cntr
16
Write your code clearly and with appropriate comments to aid understanding. 25
Assume that add/sub takes 3 cc’s and shift-left takes 1 cc. Also assume that besides add/sub and shift-left both restoring and non-restoring division require 1 cc for initialization (outside the iteration loop) and that non-restoring division requires a shift-left and at most one subtract operation after the iteration loop. Restoring division does not require any step after the iteration loop.
For 16-bit division, determine showing clear derivation steps the number of cc’s required by (i) restor-