Article ID: 000073766 Content Type: Troubleshooting Last Reviewed: 09/14/2011

Pointer Dereferences to Volatile Types

Environment

    Quartus® II Subscription Edition
    Interrupt
BUILT IN - ARTICLE INTRO SECOND COMPONENT

Critical Issue

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.

Non-Concurrent Loops
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.

Related Products

This article applies to 1 products

Intel® Programmable Devices

1