Main Content

coder.hdl.literaltext

Specify the literal text to define in the pragma

Since R2024b

Description

coder.hdl.literaltext(literal text) enables you to define a pragma statement in your MATLAB® code, which appears at the same location in the generated HLS code.

This pragma does not affect MATLAB simulation behavior.

example

Examples

collapse all

In the MATLAB® function myFun, you can declare a pragma statement using coder.hdl.literaltext. This pragma statement appears at the same location in the generated HLS code.

function out = myFun(in)
   out = zeros(10,10);
   a = in;
   b = in*8;
   for i = 1:10 
      for j = 1:10
         coder.hdl.literaltext("#pragma HLS loop_flatten")
         out(i,j) = a(i,j) + b(i,j);
      end
   end
end

Input Arguments

collapse all

Pragma statement specified as a string. The input literal text must be a valid pragma statement.

Example: coder.hdl.literaltext()

Version History

Introduced in R2024b