Page 1 of 1

Combinable task with port select causes ET_ILLEGAL_PC

Posted: Fri Jul 06, 2018 5:21 pm
by MyKeys
Why does the below code cause an ET_ILLEGAL_PC?

Note switching the tasks around with timer_task first or removing the [combine] stops the exception.
Am I missing something obvious?

Code: Select all


#include <platform.h>

on tile[0] : in port p_enc = XS1_PORT_4C;

[[combinable]]
void timer_task ()
{
    timer tmr_test;
    unsigned testValue;

    tmr_test :> testValue;

    while (1)
    {
        select
        {
            case tmr_test when timerafter (testValue) :> void:
                testValue += 100000000;
                break;
        }
    }
}

[[combinable]]
void port_task ()
{
    unsigned port_state;

    while(1)
    {
        select
        {
        case p_enc when pinsneq(port_state) :> port_state:
            break;
        }
    }
}

int main ( )
{
    par
    {
        on tile[0]:
        {
            [[combine]]
            par
            {
                port_task ();
                timer_task ();
            }
        }
    }

    return 0;
}

Re: Combinable task with port select causes ET_ILLEGAL_PC

Posted: Mon Jul 09, 2018 9:31 am
by jakeh
Hi MyKeys,

I'm not able to reproduce this exception on my machine with the given code.
What version of the tools (xTimeComposer) are you using?

Regards,
Jake

Re: Combinable task with port select causes ET_ILLEGAL_PC

Posted: Mon Jul 09, 2018 10:17 am
by MyKeys
Hi Jake,

I was using v14.3.0 tools. Trying v14.3.2 seems to resolve the issue.
I don't see anything in the release notes between these versions that could explain this.

Thanks,
Mike