Flow control pragma, Flow control pragma –3 – Altera Nios II C2H Compiler User Manual
Page 121

Altera Corporation
9.1
6–3
November 2009
Nios II C2H Compiler User Guide
Pragma Reference
master port when it begins a sequence of transfer requests. The
arbitration share of a shared Avalon-MM master port is the sum of the
arbitration shares of all master-slave pairs associated with the master
port.
The connection pragma with additional terms for arbitration share is
defined as follows, where <shares> is a positive integer from 1 to 100:
#pragma altera_accelerate connect_variable \
<
function name
>/<
variable name
> to \
<
module
>[/<
slave name
>] arbitration_share <
shares
>
connects the variable
x
in function
myfunc
to the memory
module named
sdram
with an arbitration share of 16.
Example 6–3. Pragma Specifying Arbitration Share
#pragma altera_accelerate connect_variable myfunc/x to sdram \
arbitration_share 16
Flow Control
Pragma
Avalon-MM transfers with flow control force a master port to obey flow
control signals controlled by a slave port. For example, a slave FIFO might
assert flow control signals to prevent write transfers when the FIFO
memory is full. The C2H Compiler provides a flow control pragma which
enables flow control for all master ports related to a specific pointer
variable.
The flow control pragma is defined as follows:
#pragma altera_accelerate \
enable_flow_control_for_pointer
<
function name
>/<
variable name
>
The flow control pragma must be placed outside the function to
accelerate in the same file. <function name> and <variable name> are the
exact names of the accelerated function and the pointer variable.
1
Using the flow control pragma might result in an accelerator
that functions differently from the original function running on
the Nios II processor.
f
For details about Avalon-MM flow control, refer to the
.