3.4.1 RAW Dependency Detection

During the Read-After-Write (RAW) instruction predecode, the core determines if any address register dependency is imminent across an instruction boundary. The stall detection logic compares the W register (if any) used for the destination EA of the instruction currently being executed with the W register to be used by the source EA (if any) of the prefetched instruction. When a match between the destination and source registers is identified, a set of rules is applied to decide whether or not to stall the instruction by one cycle. Table 3-6 lists various RAW conditions that cause an instruction execution stall.

Table 3-6. Raw Dependency Rules (Detection By Hardware)
Destination

Addressing Mode Using Wn

Source 
Addressing Mode

Using Wn

Stall Required?Examples(2)(Wn = W2)
DirectDirectNo StallADD.W W0, W1, W2

MOV.W W2, W3

IndirectDirectNo StallADD.W W0, W1, [W2]

MOV.W W2, W3

IndirectIndirectNo StallADD.W W0, W1, [W2]

MOV.W [W2], W3

IndirectIndirect with Pre/Post-ModificationNo StallADD.W W0, W1, [W2]

MOV.W [W2++], W3

Indirect with Pre/Post-ModificationDirectNo StallADD.W W0, W1, [W2++]

MOV.W W2, W3

DirectIndirectStall(1)ADD.W W0, W1, W2

MOV.W [W2], W3

DirectIndirect with Pre/Post-ModificationStall(1)ADD.W W0, W1, W2

MOV.W [W2++], W3

IndirectIndirectStall(1)ADD.W W0, W1, [W2](2)

MOV.W [W2], W3(2)

IndirectIndirect with Pre/Post-ModificationStall(1)ADD.W W0, W1, [W2](2)

MOV.W [W2++], W3(2)

Indirect with Pre/Post-ModificationIndirectStall(1)ADD.W W0, W1, [W2++]

MOV.W [W2], W3

Indirect with Pre/Post-ModificationIndirect with Pre/Post-ModificationStall(1)ADD.W W0, W1, [W2++]

MOV.W [W2++], W3

When stalls are detected, one cycle is added to the instruction execution time.

For these examples, the contents of W2 = the mapped address of W2 (0x0004).

Note: When Register Indirect with Offset Addressing is used to specify the destination for an instruction, and Ws is the same register as Wd, the old value of Ws is used for Wd (i.e., the address offset is ignored).