Skip to content

Error when creating temporary values within kernel functions #73

@shanhx2000

Description

@shanhx2000

Dear developers,

As a beginner with HLS, I am trying to use ScaleHLS to optimize a large integer modular multiplication program. Unfortunately, I met some difficulties.

First, I found that ap_fixed library provided by Vitis cannot be used. ap_fixed library needs template in it, requiring to be C++ code. I kind of curious if there's a way to support taking in C++ code with ScaleHLS?

Second, I got "Stack dump" for llvm compiler when there are temporary array claimed within the kernel function. Here's an easy example that crashes. Do you have any comments about it?

typedef float uint64_t; void multiply256(uint64_t a[NUM_INTS], uint64_t b[NUM_INTS], uint64_t result[NUM_INTS*2]) { #pragma scop uint64_t temp[NUM_INTS * 2] = {0}; for (int i = 0; i < NUM_INTS*2; i++) { result[i] = temp[i]; } #pragma endscop }

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions