Docsity

Notes on Digital Design - Datapath Control | ECE 368, Exams of Electrical and Electronics Engineering

Toggle sidebar
bg1
1
ECE 368, Fall 2006,Instructor: Prof. Shantanu Dutt
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.
pf3
pf4

Partial preview of the text

Download Notes on Digital Design - Datapath Control | ECE 368 and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

ECE 368, Fall 2006 , Instructor: Prof. Shantanu Dutt

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.

  1. Digital Design – Datapath Control

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

  1. VHDL Coding

A 1-to-  demultiplexor (demux) has one input  (of say,  bits) and   outputs       

(each of  bits). It has a -bit select input  , and an enable input en. Its functionality is that if !

then #"$% if the integer value represented by  is & and all other $'%  for (*)+&. Otherwise, if

,- , then all '  , /.^ (.  0 .

Give the entity and behavioral architectural description of this demux with generic parameters  and

 (of type natural). Assume the inputs  and  are bit vectors. Also assume the availability of a

function bitvec2int(X, t) that converts a 1 -bit bit vector 2 to an integer. Finally, note that if

2 and  are two vectors of the same type and length, you can do assignments like 2 *345 if 2 is a

variable and 2 76* if 2 is a signal.

Write your code clearly and with appropriate comments to aid understanding. 25

  1. Division Algorithms

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-

ing and (ii) non-restoring division algorithms when the resulting quotient 8 will be