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.

Design the <strong>for</strong>warding unit when one R type instruction is in Mem stage followed by<br />

another R-type instruction in X stage.<br />

Condition<br />

If D/X Reg.Src1 = M/W Reg.Dest<br />

Then FWDA=1<br />

If D/X Reg.Src2 = M/W Reg.Dest Then FWDB=1<br />

Page | 208<br />

D/XReg.Src1<br />

D/XReg.Src2<br />

M/W.Reg.Dest<br />

Control signal<br />

M/W .RegWrite<br />

FORWARDING UNIT<br />

Forward B<br />

Forward A<br />

Output from<br />

M/W D/X M/W D/X<br />

1 0<br />

MUX<br />

1 0<br />

MUX<br />

ALU<br />

Forward A:<br />

00 Source D/X<br />

10 Source M/W<br />

Forward B:<br />

00 D/X<br />

10 M/W

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

Saved successfully!

Ooh no, something went wrong!