Knowledge Base Article
Pointer Dereferences to Volatile Types
Description
The C2H Compiler treats pointer dereferences to a volatile type as if they alias all other pointer dereferences. Pointers that are restrict-qualified are treated the same way.
The two loops in cannot
be scheduled concurrently because the volatile qualification
overrides the __restrict__ pragma.
volatile int * __restrict__ fifo_rd = FIFO_RD_BASE;
volatile int * __restrict__ fifo_wr = FIFO_WR_BASE;
for ()
{
*fifo_wr = ....;
}
for ()
{
... = *fifo_rd;
} |
Resolution
Divide the function into multiple interrupt request (IRQ)-enabled accelerators that are launched concurrently from the processor, and use FIFO buffers to communicate between them.
Updated 2 months ago
Version 2.0No CommentsBe the first to comment