Memory Banks
6-119
Optimizing Assembly Code via Linear Assembly
Figure 6–23. 4-Bank Interleaved Memory With Two Memory Blocks
8M + 7
6
7
14
15
8N + 6 8N + 7
Bank 3
Bank 2
8N + 5
8N + 4
13
12
5
4
2
3
10
11
8N + 2 8N + 3
Bank 1
Bank 0
8N + 1
8N
9
8
1
0
8M + 6
8M + 5
8M + 4
8M + 2 8M + 3
8M + 1
8M
Memory
block 0
Memory
block 1
Bank 3
Bank 2
Bank 1
Bank 0
If each array in a loop resides in a separate memory block, the 2-cycle loop
in Example 6–61 on page 6-111 is sufficient. This section describes a solution
when two arrays must reside in the same memory block.