Using notifications with an array of interfaces and combinab

If you have a simple question and just want an answer.
Post Reply
zivke
Member
Posts: 11
Joined: Fri Aug 01, 2014 12:21 pm

Using notifications with an array of interfaces and combinab

Post by zivke »

I am working on an application that should (amongst other things) get a value from the server side of an interface once a notification is signaled. I use an array of interfaces and wait for a notification to be signaled on either one of them, before I get the value in question using a method for that (pretty much standard usage). You can see the simplified (standalone) version of this application here: https://github.com/zivke/app_somanetcon ... error-test

The problem is that I get this error once I start this application on Synapticon's SOMANET C22 setup:

xrun: Program received signal ET_LOAD_STORE, Memory access exception.

      0x000101ac in _Scounter_plugin_0.select.enable (_Scounter_plugin_0.select.state_ptr=0x1fecc) at <synthesized>:11
      11 <synthesized>: No such file or directory.
      in <synthesized>
 
If I start it on the simulator, I get this error:
Unhandled exception: LOAD_STORE, data: 0x0001feed
 
The problem seems to be in the usage of combinable functions, because this problem doesn't happen when I remove the [[combine]] label from the main.xc file.
 
I would be grateful if someone could help me with this, because I am running around in circles for quite some time now. Am I missing something?
 
Thanks


User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

This is a bug. Can you report it on the XMOS website please? I reduced your code to the below example

Code: Select all

#include interface i {  void x(void);};interface j {  [[notification]] slave void y(void);};[[combinable]] void f(client interface i i){  timer t;  unsigned s;  while (1) {    select {      case t when timerafter(s) :> void:        break;    }  }}[[combinable]] void g(server interface i i, client interface j j[1]){  unsigned char a = 'c';  while (1) {    select {      case i.x():        break;      case j[int n].y():        break;    }  }}int main(void){  interface i i;  interface j j[1];  [[combine]]  par {    f(i);    g(i, j);  }  return 0;}
sprajagopal
Member++
Posts: 18
Joined: Thu Jul 23, 2015 4:22 pm

Post by sprajagopal »

larry wrote:This is a bug. Can you report it on the XMOS website please? I reduced your code to the below example

Code: Select all

#include interface i {  void x(void);};interface j {  [[notification]] slave void y(void);};[[combinable]] void f(client interface i i){  timer t;  unsigned s;  while (1) {    select {      case t when timerafter(s) :> void:        break;    }  }}[[combinable]] void g(server interface i i, client interface j j[1]){  unsigned char a = 'c';  while (1) {    select {      case i.x():        break;      case j[int n].y():        break;    }  }}int main(void){  interface i i;  interface j j[1];  [[combine]]  par {    f(i);    g(i, j);  }  return 0;}
Hi Larry,
Is this issue resolved now?
I'm getting similar errors in my code. Not even in a combinable function. Just in a separate server thread that waits on interface calls.
stnschrdr
Member
Posts: 13
Joined: Thu Jan 24, 2019 7:35 pm

Post by stnschrdr »

I recieved the same 'Unhandled exception: LOAD_STORE, data:xxxxxx' bug when implementing the 'dsp_filters_fir()' function of the 'lib_dsp' library, in a simulation using a signal array and a FIR. I noticed that these two arrays were declared inside main(). When I placed in outside of main as global variables the error dissipated.
Post Reply