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> 23 Processor Design - Data path <strong>for</strong> Lw/Sw instructions<br />

Example<br />

Implement SW/LW<br />

2 units needed <strong>for</strong> sw/1w<br />

- Data memory<br />

- Sign extension unit<br />

Page | 143<br />

Data Memory<br />

Write<br />

data<br />

Address<br />

Data Memory<br />

Memory write<br />

Memory read<br />

Read data<br />

SW<br />

<strong>St</strong>ore word - write data in the data memory<br />

Memory write signal = 1 when writing data provided by the write data in the<br />

address provided by the address<br />

No outputs<br />

Lw<br />

Load word - reads data from memory<br />

Memory read is = 1 when reading data from the address<br />

Output - read data<br />

Sign extension unit<br />

16 bit<br />

sign<br />

extension<br />

unit<br />

32 bit<br />

Data path <strong>for</strong> 1w/sw<br />

- need register access<br />

- calculate memory address<br />

- read from memory<br />

- write into register file <strong>for</strong> lw instruction<br />

- write into data memory <strong>for</strong> sw instruction

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

Saved successfully!

Ooh no, something went wrong!