slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Controllers and Datapaths PowerPoint Presentation
Download Presentation
Controllers and Datapaths

Loading in 2 Seconds...

play fullscreen
1 / 9

Controllers and Datapaths - PowerPoint PPT Presentation


  • 97 Views
  • Uploaded on

Controllers and Datapaths. CS 153, Spring 2007 Ian G. Harris Department of Computer Science University of California Irvine. load. Control bits. Register. reset. Datapath. Controller. Status bits. Implementing Complex Behaviors.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Controllers and Datapaths' - chesna


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

Controllers and Datapaths

CS 153, Spring 2007

Ian G. Harris

Department of Computer Science

University of California Irvine

slide2

load

Control bits

Register

reset

Datapath

Controller

Status bits

Implementing Complex Behaviors

  • A Datapath is needed to perform arithmetic/boolean operations on data
    • +, -, *, /, mod, AND, OR, <<, <, >>, >, etc.
  • A Controller is needed to tell datapath components what to do and when to do it
    • Status information from the datapath may be needed
  • A controller drives the control inputs of the datapath components
    • load, reset, shiftleft, ALUOp, etc.
slide3

in1

in2

ldA

ldB

load

load

load

load

load

D

D

D

D

D

Reg B

Reg A

Reg C

Reg E

Reg D

+

Q

Q

Q

Q

Q

ldC

ldD

ldA=1

ldC=1

ldB=1

ldD=1

+

ldE

ldE=1

Simple Controller/Datapath

in3

A = in1;

B = in2;

D = in3;

C = A + B;

E = C + D;

Controller

Datapath

Behavior

  • One-to-one mapping from behavior to datapath components
    • var-reg, op-op
slide4

ldA=1

ldB=1

ldD=1

ldC=1

ldE=1

ldA=1

ldC=1

ldB=1

ldD=1

ldE=1

Alternate Controller, Same Datapath

A = in1;

B = in2;

D = in3;

C = A + B;

E = C + D;

Behavior

Optimized Controller

Controller

  • Optimize performance by merging many operations into one state
  • Merging continues until a data dependency (or conditional) is reached
slide5

Reg D

ld

ld

ld

ld

ld

Reg B

Reg A

Reg C

Reg E

Algorithm to Make Datapath and Controller

  • Determine all datapath components needed by looking at each step of the behavior
    • Assume no hardware sharing
  • 5 Registers - one for each variable
  • 2 adders - one for each addition

A = in1;

B = in2;

D = in3;

C = A + B;

E = C + D;

+

+

slide6

ldA

ldB

+

Reg D

ld

ld

ld

ld

ld

ldC

Reg B

ldD

Reg A

Reg C

+

Reg E

ldE

Datapath/Controller Algorithm Continued

  • 2. Connect datapath components by identifying connections needed for each step in the behavior.
    • Be sure to label control inputs, status outputs

in1

in2

in3

A = in1;

B = in2;

D = in3;

C = A + B;

E = C + D;

slide7

A = B + C;

If (A > 2) then

X = Y + Z;

Else

P = Q + R;

Result = X + P;

A = in1;

B = in2;

D = in3;

C = A + B;

E = C + D;

Datapath/Controller Algorithm Controller Definition

  • 3. Group steps of the behavior into states
    • Pack as many steps as possible into a state
    • No data dependency can exist in a state
    • No conditional can exist in a state - all ops in state MUST occur together

st1

st2

st3

No conditional

With Conditional

slide8

A = B + C;

If (A > 2) then

X = Y + Z;

Else

P = Q + R;

Result = X + P;

A = in1;

B = in2;

D = in3;

C = A + B;

E = C + D;

Controller Definition Continued

4. Draw FSM edges based on control flow

A>2

!A>2

No conditional

With Conditional

slide9

A = in1;

B = in2;

D = in3;

C = A + B;

E = C + D;

Controller Definition Continued

5. Label controller states with outputs

ldA=1

ldB=1

ldD=1

ldC=1

ldE=1