Bus Interface
12-4
Copyright © 2005-2008 ARM Limited. All rights reserved.
ARM DDI 0337G
Non-Confidential
Unrestricted Access
12.3
ICode bus interface
The ICode interface is a 32-bit AHB-Lite bus interface. Instruction fetches and vector
fetches from Code memory space (
0x00000000 - 0x1FFFFFFF
) are performed over this
bus.
Only the CM3Core instruction fetch bus can access the ICode interface, enabling
optimal code fetch performance. All fetches are word wide. The number of instructions
fetched per word depends on the code running and the alignment of the code in memory.
Table 12-1 describes this.
Note
It is strongly recommended that any external arbitration between the and DCode AHB
bus interfaces ensures that DCode has a higher priority than ICode.
All ICode instruction fetches are marked as cacheable and non-bufferable,
HPROTI[3:2]
= 2'b10, and as allocate and non-shareable,
MEMATTRI
= 2'b01.
These attributes are hard wired. If an MPU is fitted, the MPU region attributes are
ignored for the ICode bus.
Table 12-1 Instruction fetches
32-bit
instruction
fetch [31:16]
32-bit
instruction
fetch [15:0]
Description
Thumb16[15:0]
Thumb16[15:0]
All Thumb instructions are halfword aligned in memory, so two 16-bit Thumb
instructions are fetched at a time. For sequential code, an instruction fetch is
performed every second cycle. Instruction fetches can be performed on
back-to-back cycles if there is an interrupt or a branch.
Thumb32[31:16]
Thumb32[15:0]
If 32-bit Thumb instructions are word-aligned in memory, then a complete 32-bit
Thumb instruction is fetched each cycle.
Thumb32[15:0]
Thumb32[31:16]
If 32-bit Thumb instructions are halfword aligned, then the first 32-bit fetch only
returns the first halfword of the 32-bit Thumb instruction. A second fetch must
be performed to fetch the second halfword. This scenario creates a wait cycle (a
cycle where CM3Core is not able to execute an instruction) depending on the
instruction in play. The additional cycle of latency only occurs for the first
halfword aligned 32-bit Thumb instruction fetch. CM3Core contains a 3-entry
fetch buffer, and so the upper halfword of halfword aligned 32-bit Thumb
instructions exist in the fetch buffer for subsequent sequential 32-bit Thumb
instructions.