Description
When pipelining functions or loops, the OCCURRENCE pragma or directive specifies that the code in a pipelined function call within the pipelined function or loop is executed at a lower rate than the surrounding function or loop. This allows the pipelined call that is executed at the lower rate to be pipelined at a slower rate, and potentially shared within the top-level pipeline. For example:
- A loop iterates N times.
- Part of the loop is protected by a conditional statement and only executes M times, where N is an integer multiple of M.
- The code protected by the conditional is said to have an occurrence of N/M.
Identifying a region with an OCCURRENCE rate allows the functions and loops in this region to be pipelined with an initiation interval that is slower than the enclosing function or loop.
Syntax
syn.directive.occurrence=[OPTIONS] <location>
-
<location>
specifies the block of code that contains the pipelined function call(s) with a slower rate of execution.
Options
-
cycle=<int>
- Specifies the occurrence N/M where:
- N is the number of times the enclosing function or loop is executed.
- M is the number of times the conditional region is executed.
Important: N must be an integer multiple of M. -
off=true
- Disable occurrence for the specified function.
Examples
Region Cond_Region
in function
foo
has an occurrence of 4. It executes at a
rate four times slower than the code that encompasses it.
syn.directive.occurrence=cycle=4 foo/Cond_Region