IC220: Set #13: Building a real processor! ( Chapter 5) 1 The - - PDF document

ic220 set 13 building a real processor
SMART_READER_LITE
LIVE PREVIEW

IC220: Set #13: Building a real processor! ( Chapter 5) 1 The - - PDF document

IC220: Set #13: Building a real processor! ( Chapter 5) 1 The Processor: Datapath & Control READING: 5.1 5.4 We're ready to look at an implementation of the MIPS Simplified to contain only: memory-reference


slide-1
SLIDE 1

1

IC220: Set #13: Building a real processor! (Chapter 5)

2

  • READING: 5.1 – 5.4
  • We're ready to look at an implementation of the MIPS
  • Simplified to contain only:

– memory-reference instructions: lw, sw – arithmetic-logical instructions: add, sub, and, or, slt – control flow instructions: beq, j

  • Generic Implementation:

– use the program counter (PC) to supply instruction address – get the instruction from memory – read registers – use the instruction to decide exactly what to do

  • All instructions use an ALU after reading the registers – why?

memory-reference? arithmetic? control flow?

The Processor: Datapath & Control

slide-2
SLIDE 2

3

Our Timing Methodology

  • An edge triggered methodology
  • Typical execution:

– read contents of some state elements, – send values through some combinational logic – write results to one or more state elements

C lo ck cycle S ta te

  • elem

e nt 1 C

  • m

b in ation al log ic S ta te

  • e

le m e nt 2

4 Single Cycle Implementation First, Datapath Later, Control

slide-3
SLIDE 3

5

Simplified View of Datapath

6

Our Simple Implementation

  • Let’s start putting our pieces together to form our single-cycle

implementation.

  • Our pieces include:

– 1. Fetching the instruction – 2. Performing an operation (R-type) – 3. Loading and storing data – 4. Branching

  • We will discuss one piece at a time.
slide-4
SLIDE 4

7

Partial Datapath #1 – for fetching

8

Partial Datapath #2 – for R-type instructions

slide-5
SLIDE 5

9

Partial Datapath #3 – for load and store (#1)

10

Partial Datapath #3 – for load and store (#2)

slide-6
SLIDE 6

11

Partial Datapath #4 – for branch

12

How do we tie them together?

  • Strategy:
slide-7
SLIDE 7

13

Unified Datapath – copy #1

14

Unified Datapath – copy #2

slide-8
SLIDE 8

15

Unified Datapath – copy #3

16

Unified Datapath – copy #4