Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reinterpret<>() for hls_target.cpp #27

Open
kevinkim06 opened this issue Jan 21, 2018 · 0 comments
Open

reinterpret<>() for hls_target.cpp #27

kevinkim06 opened this issue Jan 21, 2018 · 0 comments

Comments

@kevinkim06
Copy link
Contributor

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.

@kevinkim06 kevinkim06 changed the title reinterpreter<>() for hls_target.cpp reinterpret<>() for hls_target.cpp Jan 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant