05.08.2014 Views

Lecture Notes for Computer Architecture II - St. Cloud State University

Lecture Notes for Computer Architecture II - St. Cloud State University

Lecture Notes for Computer Architecture II - St. Cloud State University

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Lecture</strong> 24 Processor Design - Data path <strong>for</strong> Beq instructions<br />

Example :<br />

Design DP <strong>for</strong> branch instruction<br />

PC+4<br />

beq $1 $2 offset 4 1 2 pc+4+offset<br />

branch target<br />

branch<br />

compare relative to branch inst target address<br />

address<br />

Page | 146<br />

- need to compare<br />

- need to compute branch target address<br />

Adder<br />

Should do 2 things<br />

- condition true<br />

1 0<br />

- go to branch target address control sg<br />

MUX<br />

- condition false<br />

- next inst to Program counter<br />

- also need a word offset<br />

shift offset field 2 bits left<br />

beq $1 $2 offset<br />

ALU OP<br />

5bit Read 5 bit 16 bit offset<br />

Reg 2 Read Reg 1<br />

Reg file<br />

Read Read 32 bit<br />

Data 2 Data 1<br />

SL-2<br />

ALU<br />

zero<br />

Sign<br />

extension<br />

Adder<br />

Branch PC + 4<br />

0 1<br />

MUX<br />

to PC<br />

PC + 4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!