When Code Analysis Succeeds

When analysis completes successfully, one or more routes are created and can be seen in the GUI in the top pane of the Routes View or by typing:

print summary

Multiple Route Creation

In many cases, for a single analysis, only a single route will be created. However, in the general case, for a single analysis, multiple routes can be created. This can occur in a number of different situations.

Endpoints Exist On Multiple xCORE Tiles

Consider the code in Routes on multiple tiles.. Analyzing from a to b produces two routes, one for each tile it is found on.

Routes on multiple tiles.
port p = XS1_PORT_1A ;
void f() {
    int value ;

    # pragma endpoint "a"
    p :> value ;

    # pragma endpoint "b"
    p :> value ;
}

int main () {
    par {
        on tile [0] : f();
        on tile [1] : f();
    }
    return 0;
}

From Endpoint Can Be Reached In Multiple Ways

Consider the code in Multiple instances of a function.. Analyzing from a to b in the following code will produce two routes because there are two instances of the function f.

Multiple instances of a function.
port p = XS1_PORT_1A ;
void f() {
    # pragma endpoint "a"
    p :> value ;
    }

int main () {
    f ();
    f ();

    # pragma endpoint "b"
    p :> value ;
    return 0;
}

Route Specific Exclusions Exist

Consider the code in Route specific exclusions.. Setting an exclusion on a1,excl and analyzing function a causes two routes to be created. This is because there are two calls to function a, but the exclusion is only relevant for one of the calls so the two routes are different.

Route specific exclusions.
int a( int i) {
    if (i == 6) {
        # pragma xta label " excl "
        ++i;
    }
    return i;
}

int main () {
    # pragma xta call "a1"
    a (4);
    # pragma xta call "a2"
    a (5);
    return 0;
}

Route Specific Branches Exist

Consider the code in Route specific branches. Setting a branch from CALL:calltest1,source1 to target1 and analyzing function test will cause two routes to be created. This is because there are two calls to function test, but the branch is only relevant for one of the calls thus the two routes will be different.

Route specific branches
. type main , @function
. globl main
main :
    entsp 1
calltest1 :
    bl test
calltest2 :
    bl test
    retsp 1

. type test , @function
. globl test
test :
source1 :
    bau r1
target1 :
    retsp 0

Looppoint Within Multiple Loops

Consider the code in Looppoint within multiple loops.. Analyzing a loop using the looppoint as a reference will cause two routes to be created. This is because the reference exists within two different loops.

Looppoint within multiple loops.
int g() {
    # pragma xta label " looppoint "
    return 1;
}

void a( int loopCount ) {
    int i = 0;
    while (i < loopCount ) {
        i += g ();
    }
}

void b( int loopCount ) {
    int i = 0;
    while (i < loopCount ) {
        i += g ();
    }
}

See Also