5 rule detection across cof boundaries, 1 cycle-based cof rules, Rule detection across cof boundaries -44 – Freescale Semiconductor StarCore SC140 User Manual

Page 294: Cycle-based cof rules -44, Sr.2 across a cof boundary -44, A.2 from a delay slot to a cof destination -44

Advertising
background image

7-44

SC140 DSP Core Reference Manual

Dynamic Programming Rules

7.6.5 Rule Detection Across COF Boundaries

Some sequencing rules may be violated across COF boundaries — between instructions that are before the
COF instruction or grouped in a VLES with the COF instruction (or its delay slot), and instructions at or
after the COF destination. The assembler does not analyze this control flow and lacks the run-time
execution trace to detect these cases. In addition, the code segments containing the COF instruction and the
COF destination may be in two independently assembled source files, thus outside the visibility of the
assembler. However, the simulator can detect most rule violations across COF boundaries by examining
the simulation trace.

For example, the assembler cannot detect SR.2 across a COF boundary, but the simulator can detect it from
the simulation trace.

Example 7-82. SR.2 Across a COF Boundary

pop sr
bra fred
...

fred

add d1,d2,d3

;not allowed by SR.2

The assembler cannot detect the A.2 violation between the delay slot and the COF destination shown
below, but the simulator can detect it from the simulation trace.

Example 7-83. A.2 from a Delay Slot to a COF Destination

jmpd _dest
bmset #3,r0.l

;2-cycle instruction

...

_dest

move.l (r0),d0

;not allowed by A.2

7.6.5.1 Cycle-Based COF Rules

Cycle-based COF rules calculate the COF cycle count to determine if the sequence is allowed or not.
Cycle-based rule violations across COF boundaries are relatively rare because the COF instruction, taking
multiple cycles, creates a “cycle barrier” between the VLES having the COF instruction and the VLES at
the COF destination. However, this cycle barrier is reduced when the instructions are grouped in a VLES
with the COF instruction (or its delay slot).

The relevant cycle-based rules that the simulator detects across COF boundaries are:

A.1

A.2

A.2a

Advertising