Cda 3101 summer 2007 introduction to computer organization
Download
1 / 33

CDA 3101 Summer 2007 - PowerPoint PPT Presentation


  • 261 Views
  • Updated On :

CDA 3101 Summer 2007 Introduction to Computer Organization Processor Organization Datapath Design 21 June 2007 Review Construction of the ALU Building blocks (digital design gates) Modular design Multiplexor chooses operation

Related searches for CDA 3101 Summer 2007

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 'CDA 3101 Summer 2007' - Renfred


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
Cda 3101 summer 2007 introduction to computer organization l.jpg

CDA 3101 Summer 2007Introduction to Computer Organization

Processor Organization

Datapath Design

21 June 2007


Review l.jpg
Review Summer 2007

  • Construction of the ALU

    • Building blocks (digital design gates)

    • Modular design

      • Multiplexor chooses operation

      • All operations are performed in parallel

    • Carry lookahead adder

  • Computer arithmetic

    • Finite precision

    • Laws of algebra do not always hold

    • Integers: two’s complement representation

    • Floating point: IEEE 754 standard


Overview l.jpg
Overview Summer 2007

  • Computer organization (microarchitecture)

  • Processor organization

    • Datapath

    • Control

    • Register file

  • Processor implementation overview

  • Clocking methodologies

  • Sequential circuits

    • Latches

    • Registers


Processor performance l.jpg
Processor Performance Summer 2007

CPU time =IC* CPI *Cycle time

Program

Compiler

ISA

Microarchitecture

Hardware


Computer organization l.jpg
Computer Organization Summer 2007

Address Bus

Memory Subsystem

Data Bus

Processor

Control Bus

I/O device

I/O device

. . .

I/O Subsystem


The processor l.jpg
The Processor Summer 2007

  • Processor (CPU)

    • Active part of the computer

    • Does all the work

      • Data manipulation

      • Decision-making

  • Datapath

    • Hardware that perform all required operations

    • ALU + registers + internal buses

    • The brawn

  • Control

    • Hardware which tells the datapath what needs to be done

    • The brain


Processor organization l.jpg
Processor Organization Summer 2007

Address bus

Data bus

Control bus signals

Control signals

Control Unit

Data values

Registers

Control signals

Data values (operands)

ALU

Data values (results)


Implementation of mips l.jpg
Implementation of MIPS Summer 2007

  • ISA determines many aspects of implementation

  • Implementation strategies affect clock rate and CPI

  • MIPS subset to illustrate implementation

    • Memory-reference instructions

      • Load word (lw)

      • Save word (sw)

    • Integer arithmetic and logical instructions

      • add, sub, and, or, and slt

    • Branch instructions

      • Branch if equal (beq)

      • Jump (j)


Implementation overview l.jpg
Implementation Overview Summer 2007

Data

Instruction

memory

rd

Data

memory

rs

Address

Registers

PC

ALU

Address

rt

Instruction

+4

Data

imm

Opcode, funct

Controller

  • Datapath is based on register transfers required to execute instructions

  • Control causes the right transfers to happen


Logic and clocking l.jpg
Logic and Clocking Summer 2007

  • Combinational elements

    • Outputs depend only on current inputs

    • Example: ALU (adders, multiplexers, shifters)

  • Sequential elements

    • Contain state

    • Output depend on input and state

    • Inputs: data values and clock

    • Memory, registers

  • Asserted signal: logically high


Clocking methodology l.jpg
Clocking Methodology Summer 2007

  • Determines the order of (gate) events

    • Defines when signals can be read/written

  • Clock: circuit that emits a series of pulses

clock cycle

time

Timing diagrams

clock

Asymmetric clock

C

(C1 AND C2)

Rising edge

Falling edge


Edge triggered clocking l.jpg
Edge-Triggered Clocking Summer 2007

  • Either the rising edge or the falling edge is active

  • State changes only on the active clock edge

State

element

1

State

element

2

Combinational logic

clock

State

element

Combinational logic


Nor sr latch l.jpg
NOR SR Latch Summer 2007

State 0

State 1

S - set

Inputs

Outputs: Q and Q

R - reset


Clocked sr latch l.jpg
Clocked SR Latch Summer 2007


Clocked d latch l.jpg
Clocked D Latch Summer 2007

D

C

Q

Output is initially deasserted


D flip flop l.jpg
D flip-flop Summer 2007

D

D

Q

D

Q

Q

D latch

D latch

Q

C

C

Q

C

Setup time

D

hold time

C

Q

Falling-edge trigger, output is initially deasserted


Register file l.jpg
Register File Summer 2007

Read ports

Write port




Conclusions l.jpg
Conclusions Summer 2007

  • Datapath performs work of computation

  • Building blocks for datapath

    • ALU: Performs work of computation

    • Register File: Data I/O from registers

  • Register file implemented with D flipflops, multiplexers, and decoder

    • Clocked (synchronous) logic circuits

    • Write-enabled data transfer into registers

    • No need to protect data transfer from registers



Slide22 l.jpg

New Topic Summer 2007 –Datapath Design

  • Datapath implements fetch-decode-execute

  • Design Methodology

    • Determine instruction classes and formats

    • Build datapath sections for each instr.fmt.

    • Compose sections to yield MIPS datapath

  • Challenge #1: What are instruction classes?

  • Challenge #2: What components are useful?


Slide23 l.jpg

Simple Datapath Components Summer 2007

PC

Read Addr

Instruction

Instruction Memory

  • Memory stores the instruction

  • PC address of current instruction

  • ALU executes current instruction

Increment program counter

+

4

fetch


Slide24 l.jpg

R-format Datapath Summer 2007

ALU op

Register File

3

Read Reg 1

Read Reg 2

Write Register

Write Data

Read Data 1

Read Data 2

Instruction

ALU

Register Write

  • Format:opcode r1, r2, r3

Zero

Result


Slide25 l.jpg

Load/Store Datapath Issues Summer 2007

  • lw $t1, offset($t2)

    • Memory at base $t2 with offset

    • lw: Read memory, write into register $t1

    • sw: Read from register $t, write to memory

  • Address computation – ISA says:

    • Sign-extend 16-bit offset to 32-bit signed value

  • Hardware: Data memory for read/write


Slide26 l.jpg

Load/Store Datapath Components Summer 2007

16

32

Sign Extend

MemWrite

Address

Read data

Write data

Data Memory

1101 … 0011 

1111 1111 1111 11111101 … 0011

MemRead


Slide27 l.jpg

Load/Store Datapath Actions Summer 2007

  • Register AccessRegister File

    • --Instruction/Data/Address Fetch

  • Memory Address CalculationALU

    • -- Address Decode

  • Read/Write from MemoryData Memory

  • Write into Register FileRegister File

    • -- Load/Store Instruction Execute


Slide28 l.jpg

Load/Store Datapath Summer 2007

Fetch DecodeExecute


Slide29 l.jpg

Branch Datapath Issues Summer 2007

  • beq $t1, $t2, offset

    • Two registers ($t1, $t2) compared for equality

    • 16-bit offset to compute branch target address

  • Branch target address – ISA says:

    • Add sign-extended offset to PC

    • Base address is instruction after branch (PC+4)

    • Shift offset left 2 bits => word offset

  • Jump to target

    • Replace lower 26 bits of PC with lower 26 bits of instruction shifted left 2 bits


Slide30 l.jpg

Branch Datapath Actions Summer 2007

  • Register AccessRegister File

    • --Instruction/Data Fetch

  • Evaluate Branch ConditionALU #1

  • Calculate Branch TargetALU #2

    • --Branch Computation – similar to Decode

  • Jump to Branch TargetControl Logic

    • -- Branch Instruction Execute


Slide31 l.jpg

Branch Datapath Summer 2007

Fetch DecodeExecute


Slide32 l.jpg

Delayed Branch (MIPS) Summer 2007

  • MIPS ISA: Branches always delayed

    • Instr. Ib following branch is always executed

    • condition = false => Normal branch

    • condition = true => Ib executed

  • Why bother?

    • Improves efficiency of pipelining

    • Branch not taken (false condition) can be common case


Slide33 l.jpg

Conclusions Summer 2007

  • MIPS ISA: Three instruction formats (R,I,J)

  • Datapath designed for each instruction format

  • Datapath Components:

    • -- R-format:ALU, Register File

    • -- I-format:Sign Extender, Data Memory

    • -- J-format:ALU #2 for target address comp’n.

  • Trick: Delayed branch to make pipeline efficient

  • Have a safe Break Week! 


ad