09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Embedded Flash memory interface <strong>RM0090</strong><br />

Figure 4. Sequential 32-bit instruction execution<br />

@<br />

1<br />

WAIT<br />

@<br />

F<br />

1<br />

D<br />

1<br />

F<br />

E<br />

1<br />

D E<br />

Without prefetch<br />

2 2 2 2<br />

@ F D E<br />

3 3 3 3<br />

@ F D E<br />

4 4 4 4<br />

@<br />

5<br />

WAIT<br />

F<br />

5<br />

D<br />

5<br />

E<br />

5<br />

@<br />

F D E<br />

6 6 6 6<br />

@ F D<br />

7 7 7<br />

@ F<br />

8 8<br />

ins 1<br />

fetch<br />

ins 2<br />

fetch<br />

ins 3<br />

fetch<br />

ins 4<br />

fetch<br />

Read ins 1, 2, 3, 4 Gives ins 1, 2, 3, 4 Read ins 5, 6, 7, 8 Gives ins 5, 6, 7, 8<br />

@<br />

1<br />

Wait data F<br />

1<br />

D<br />

1<br />

E<br />

1<br />

@<br />

F D E<br />

2 2 2 2<br />

@ F D<br />

3 3 3<br />

@ F<br />

4 4<br />

@<br />

5<br />

ins 1 ins 2<br />

fetch fetch<br />

When the code is not sequential (branch), the instruction may not be present in the currently<br />

used instruction line or in the prefetched instruction line. In this case (miss), the penalty in<br />

terms of number of cycles is at least equal to the number of wait states.<br />

65/1416 Doc ID 018909 Rev 3<br />

ins 5<br />

fetch<br />

E<br />

3<br />

D E<br />

4 4<br />

F D E<br />

5 5 5<br />

@ F D E<br />

6 6 6<br />

@ F D<br />

7 7 7<br />

@ F<br />

8 8<br />

Read ins 1, 2, 3, 4 Gives ins 1, 2, 3, 4 Gives ins 5, 6, 7, 8<br />

Read ins 5, 6, 7, 8 Read ins 9, 10, ...<br />

ins 6<br />

fetch<br />

ins 3 ins 4 ins 5 ins 6 ins 7 ins 8<br />

fetch fetch fetch fetch fetch fetch<br />

ins 7<br />

fetch<br />

With prefetch<br />

@<br />

ins 8<br />

fetch<br />

Cortex-M3 pipeline<br />

AHB protocol<br />

F D E<br />

@ : address requested<br />

F: Fetch stage<br />

D: Decode stage<br />

E: Execute stage<br />

ai16005

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

Saved successfully!

Ooh no, something went wrong!