In my application I have eight "worker" threads that are split over two cores, a virtual ROM thread (32k bytes)
running on it's own core, and a manager thread running on a fourth core. Accessing the ROM was going
slower then I like so I tried implementing transactions for reading it, but I keep getting the following error:
Unhandled exception: ILLEGAL_RESOURCE, data: 0x00000102
The way I am doing my transaction is as follows:
Code: Select all
transaction read_rom( chanend _rom, uint data[], uint size )
{
_rom <: ROM_READ;
_rom <: size;
for( uint i=0; i<size; i++ )
_rom :> data[i];
}
void load_worker( chanend worker, chanend _rom )
{
uint i;
uint data[512];
master read_rom( _rom, data, 512 );
slave
{
worker <: WORKER_HALT;
worker <: WORKER_LOAD;
worker <: 512;
for( i=0; i<512; i++ )
worker <: data[i];
worker <: WORKER_BEGIN;
}
}
void worker_manager( chanend workers[8], chanend _rom )
{
...
load_worker( workers[0], _rom );
...
while( 1 )
{
..
}
}
is to synchronize two channels. Is there something I have missed or is there another way I can do this task
without use of streaming channels?
Any help is appreciated.
Thanks.