coder.hdl.pipeline
Insert pipeline registers at output of MATLAB expression
Description
out = coder.hdl.pipeline(
inserts
one pipeline register at the output of expr
)expr
in
the generated HDL code. This pragma does not affect MATLAB® simulation
behavior.
Use this pragma to specify exactly where to insert pipeline registers. For example, in a MATLAB assignment statement, you can specify the coder.hdl.pipeline pragma:
On the entire right side of the assignment statement.
On a subexpression.
By nesting multiple pragmas.
On a call to a subfunction, if the subfunction returns a single value. You cannot specify the pragma for a subfunction that returns multiple values.
If you enable distributed pipelining, HDL Coder™ can move the pipeline registers to break the critical path.
HDL Coder cannot insert a pipeline register at the output of a MATLAB expression if any of the variables in the expression are:
A persistent variable that maps to a state element, like a state register or RAM.
In a data feedback loop. For example, in the following code, you cannot pipeline an expression containing the
t
orpvar
variables:persistent pvar; t = u + pvar; pvar = t + v;
out = coder.hdl.pipeline(
inserts expr
,num
)num
pipeline
registers at the output of expr
in the generated
HDL code. This pragma does not affect MATLAB simulation
behavior.
Use this pragma to specify exactly where to insert pipeline registers. For example, in a MATLAB assignment statement, you can specify the coder.hdl.pipeline pragma:
On the entire right side of the assignment statement.
On a subexpression.
By nesting multiple pragmas.
On a call to a subfunction, if the subfunction returns a single value. You cannot specify the pragma for a subfunction that returns multiple values.
If you enable distributed pipelining, HDL Coder can move the pipeline registers to break the critical path.
HDL Coder cannot insert a pipeline register at the output of a MATLAB expression if any of the variables in the expression are:
A persistent variable that maps to a state element, like a state register or RAM.
In a data feedback loop. For example, in the following code, you cannot pipeline an expression containing the
t
orpvar
variables:persistent pvar; t = u + pvar; pvar = t + v;
Examples
Input Arguments
Version History
Introduced in R2015a