Creating a Data Path - Computer Organization - Lecture Slides | CS 0447, Study notes of Computer Science

Material Type: Notes; Professor: Childers; Class: COMPUTR ORGZTN & ASSMBLY LANG; Subject: Computer Science; University: University of Pittsburgh; Term: Unknown 1989;

Typology: Study notes

Pre 2010

Uploaded on 09/02/2009

koofers-user-anb
koofers-user-anb 🇺🇸

9 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
26
Creating a Single Datapath
Data path segments for
Fetch
Execution
Arithmetic operations (R-type instructions)
Register file (read), ALU, register file (write)
Load/store
Register file (read), ALU (effective address), data
memory (read/write), register file (write on load)
Branches
Register file (read), ALU (comparison), Adder
(branch target address), PC (update)
Can we combine these segments so they are shared?
27
Creating a Single Datapath
Yes!
A simple datapath
Execute instructions in a single cycle
Hence, no datapath element used more than once
by an instruction in a single cycle
Any element needed more than once: must be duplicated
Share datapath elements among different
instruction classes
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Creating a Data Path - Computer Organization - Lecture Slides | CS 0447 and more Study notes Computer Science in PDF only on Docsity!

Creating a Single Datapath

  • Data path segments for
    • Fetch
    • Execution
      • Arithmetic operations (R-type instructions)
        • Register file (read), ALU, register file (write)
      • Load/store
        • Register file (read), ALU (effective address), data memory (read/write), register file (write on load)
      • Branches
        • Register file (read), ALU (comparison), Adder (branch target address), PC (update)
  • Can we combine these segments so they are shared?

Creating a Single Datapath

  • Yes!
  • A simple datapath
    • Execute instructions in a single cycle
    • Hence, no datapath element used more than once by an instruction in a single cycle - Any element needed more than once: must be duplicated
    • Share datapath elements among different instruction classes

Sharing Datapath Elements

  • Share datapath element among instruction classes
    • E.g., ALU between arithmetic, branch, load/store

Sharing Datapath Elements

  • Share datapath element among instruction classes
    • E.g., ALU between arithmetic, branch, load/store

Load/store datapath elements

Arithmetic datapath elements

Selecting Among Inputs

  • To select among inputs - use a multiplexor
  • Multiplexor
    • Several inputs
    • One output
    • Control lines to select among different inputs

Inputs (I0-I3)

Control (C0, C1)

Output (O)

C0 C1 O

0 0 I

0 1 I

1 0 I

1 1 I

M

U

X

Selecting Among Inputs

  • To select among inputs - use a multiplexor
  • Multiplexor
    • Several inputs
    • One output
    • Control lines to select among different inputs

Inputs (I0-I3)

Control (C0, C1)

Output (O)

C0 C1 O

0 0 I

0 1 I

1 0 I

1 1 I

M

U

X

Composing Datapaths

  • Let’s compose the arithmetic instruction datapath with the load/store (memory) instruction datapath

What datapath elements are shared?

Composing Datapaths

  • Let’s compose the arithmetic instruction datapath with the load/store (memory) instruction datapath

Two: (1) input to ALU (2) input to RF Write Data

Composing Datapaths

  • Let’s compose the arithmetic instruction datapath with the load/store (memory) instruction datapath

Composing Datapaths

  • Let’s compose the arithmetic instruction datapath with the load/store (memory) instruction datapath

Shared Muxed input Not shared

Composed Arithmetic and L/S Datapath

  • Two muxes -
    • 1. select among register or sign-extend
    • 2. select input to RF from ALU or data memory
  • Need control signals for muxes, ALU, RF, Memory

Composed Arithmetic and L/S Datapath

  • Two muxes -
    • 1. select among register or sign-extend
    • 2. select input to RF from ALU or data memory
  • Need control signals for muxes, ALU, RF, Memory

Activity for a R-type (arithmetic) instruction

Datapath with Fetch

  • Composed fetch with arithmetic and load/store datapath
  • Separate adder for PC increment

Datapath with Branches

  • Separate ALU for computing branch target
  • Shifter (by 2) for 16-bit offset constant
  • Mux to select among next address (PC+4) or target address from branch ALU