I've just run up against a problem - a notification function in a select block which isn't responding. I can fix it just by changing the order of cases.
Here's the offending block, in the working state:
Code: Select all
select
{
case rx_if.data_ready():
recv_flag = 1; // trigger action after transaction
break;
case hif.send(uint32_t buffer[n], unsigned n):
for(int i = 0; i < n; i++)
{
tx_data[i] = buffer[i];
}
send_flag = 1; // trigger action after transaction
break;
case hif.receive(uint32_t buffer[n], unsigned n):
for(int i = 0; i < n; i++)
{
buffer[i] = rx_data[i];
}
break;
}
If I put the rx_if.data_ready case between hif.send and hif.receive, the data_ready notification isn't received. Is this a known problem, or could I be doing something wrong?
I've confirmed the select block isn't just spending time in one of the other cases, and of course checked that the rx_if server has sent the data_ready event.
Thanks.