SPRZ342O January 2011 – April 2021 TMS320F28062 , TMS320F28062-Q1 , TMS320F28062F , TMS320F28062F-Q1 , TMS320F28063 , TMS320F28064 , TMS320F28065 , TMS320F28066 , TMS320F28066-Q1 , TMS320F28067 , TMS320F28067-Q1 , TMS320F28068F , TMS320F28068M , TMS320F28069 , TMS320F28069-Q1 , TMS320F28069F , TMS320F28069F-Q1 , TMS320F28069M , TMS320F28069M-Q1
Revision(s) Affected: 0, A, B
This usage note applies when a VCU memory access and an FPU memory access occur back-to-back. There are three cases:
Case 1. Back-to-back memory reads: one read performed by a VCU instruction (VMOV32) and one read performed by an FPU32 instruction (MOV32).
If an R1 pipeline phase stall occurs during the first read, then the second read will latch the wrong data. If the first instruction is not stalled during the R1 pipeline phase, then the second read will occur properly.
The order of the instructions—FPU followed by VCU or VCU followed by FPU—does not matter. The address of the memory location accessed by either read does not matter.
Case 1 Workaround: Insert one instruction between the two back-to-back read instructions. Any instruction, except a VCU or FPU memory read, can be used.
Case 1, Example 1:
VMOV32 VR1,mem32 ; VCU memory read
NOP ; Not a FPU/ VCU memory read
MOV32 R0H,mem32 ; FPU memory read
Case 1, Example 2:
VMOV32 VR1,mem32 ; VCU memory read
VMOV32 mem32, VR2 ; VCU memory write
MOV32 R0H,mem32 ; FPU memory read
Case 2. Back-to-back memory writes: one write performed by a VCU instruction (VMOV32) and one write performed by an FPU instruction (MOV32).
If a pipeline stall occurs during the first write, then the second write can corrupt the data. If the first instruction is not stalled in the write phase, then no corruption will occur.
The order of the instructions—FPU followed by VCU or VCU followed by FPU—does not matter. The address of the memory location accessed by either write does not matter.
Case 2 Workaround: Insert two instructions between the back-to-back VCU and FPU writes. Any instructions, except VCU or FPU memory writes, can be used.
Case 2, Example 1:
VMOV32 mem32,VR0 ; VCU memory write
NOP ; Not a FPU/VCU memory write
NOP ; Not a FPU/VCU memory write
MOV32 mem32,R3H ; FPU memory write
Case 2, Example 2:
VMOV32 mem32,VR0 ; VCU memory write
VMOV32 VR1, mem32 ; VCU memory read
NOP
MOV32 mem32,R3H ; FPU memory write
Case 3. Back-to-back memory writes followed by a read or a memory read followed by a write. In this case, there is no interaction between the two instructions. No action is required.
Workaround: See Case 1 Workaround and Case 2 Workaround.