Skip to content

reinterpret<>() for hls_target.cpp #27

@kevinkim06

Description

@kevinkim06

Hello,

I found reinterpret<> can be used in hls_target.cpp and it causes compile errors and VivadoHLS doesn't know how to do it. In the following example, constant '1' for 'Pos & 1' is reinterpreted unnecessarily.

  Param<uint8_t> Pos;

  MyPipeline():
          input(Int(32), 2),
          hw_output("hw_output"),
          output("output")
  {
    padded = BoundaryConditions::constant_exterior(input, 0);

    Expr xOffset = Pos & 1;
    Expr yOffset = (Pos >> 1)&1;

    hw_output(x, y) = padded(x + xOffset, y + yOffset);

    output(x, y) = hw_output(x, y);

    args = {input, Pos};
  }

I think it should be dealt in CodeGen_HLS_Target::CodeGen_HLS_C rather than in CodeGen_C.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions