coder.hdl.pipeline - Insert pipeline registers at output of MATLAB expression - MATLAB (original) (raw)

Insert pipeline registers at output of MATLAB expression

Syntax

Description

out = coder.hdl.pipeline([expr](#burtyww-expr)) inserts one pipeline register 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:

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:

example

out = coder.hdl.pipeline([expr](#burtyww-expr),[num](#burtyww-num)) inserts 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:

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:

example

Examples

collapse all

At the output of a MATLAB expression, a + b * c, insert a single pipeline register.

y = coder.hdl.pipeline(a + b * c);

At the output of a MATLAB expression, a + b * c, insert three pipeline registers.

y = coder.hdl.pipeline(a + b * c, 3);

For a MATLAB expression, a + b * c, after the computation of b * c, insert five pipeline registers.

y = a + coder.hdl.pipeline(b * c, 5);

At an intermediate stage and at the output of a MATLAB expression, use nested coder.hdl.pipeline pragmas to insert pipeline registers.

For a MATLAB expression, a + b * c, after the computation of b * c, insert five pipeline registers, and insert two pipeline registers at the output of the whole expression.

y = coder.hdl.pipeline(a + coder.hdl.pipeline(b * c, 5),2);

Input Arguments

collapse all

MATLAB expression to pipeline. At the output of this expression in the generated HDL code, insert pipeline registers.

Example: a + b

Number of pipeline registers to insert at the output of expr in the generated HDL code, specified as a positive integer.

Example: 3

Version History

Introduced in R2015a

See Also