0
#define READ_COL 4
void read_data(kern_colmeta *colmeta
         , int ncols
        , HeapTupleHeaderData *htup
        , cl_char tup_dclass[READ_COL]
        , cl_long   tup_values[READ_COL])
{
        char        *addr ;//__attribute__((unused));
        EXTRACT_HEAP_TUPLE_BEGIN(addr, colmeta, ncols, htup);
        EXTRACT_HEAP_TUPLE_NEXT(addr);
        EXTRACT_HEAP_TUPLE_NEXT(addr);
        EXTRACT_HEAP_READ_32BIT(addr, tup_dclass[3],tup_values[3]); 
        EXTRACT_HEAP_TUPLE_NEXT(addr);
        EXTRACT_HEAP_TUPLE_NEXT(addr);
        EXTRACT_HEAP_TUPLE_NEXT(addr);
        //EXTRACT_HEAP_READ_POINTER(addr,tup_dclass[1],tup_values[1]); 
        EXTRACT_HEAP_TUPLE_NEXT(addr);
        //EXTRACT_HEAP_READ_POINTER(addr ,tup_dclass[2],tup_values[2]);
        EXTRACT_HEAP_TUPLE_END();
}

void accel (char *a, char *b)//, int* o)
{
#pragma HLS INTERFACE m_axi depth=125    port=a
#pragma HLS INTERFACE m_axi depth=1984    port=b
    kern_colmeta col[16];
    memcpy(col, b, sizeof(kern_colmeta)*16);
    HeapTupleHeaderData *htup;
    htup = (HeapTupleHeaderData *)a;
    cl_char tup_dclass[READ_COL];
    cl_long   tup_values[READ_COL];
    read_data(col, 16, htup, tup_dclass, tup_values);
}

最上面的函数是accel(),调用EXTRACT_HEAP_READ_32BIT()的时候代码会出错。C仿真结果是正常的,但是一旦尝试运行综合,它就失败了。错误日志如下:

INFO: [HLS 200-1510] Running: csynth_design
INFO: [HLS 200-111] Finished File checks and directory preparation: CPU user time: 0 seconds. CPU system time: 0 seconds. Elapsed time: 0 seconds; current allocated memory: 205.967 MB.
INFO: [HLS 200-10] Analyzing design file '/root/gyf/hls/Unable_to_Schedule/kernel_fun.cpp' ...
INFO: [HLS 200-111] Finished Source Code Analysis and Preprocessing: CPU user time: 0.23 seconds. CPU system time: 0.08 seconds. Elapsed time: 0.21 seconds; current allocated memory: 207.566 MB.
INFO: [HLS 200-777] Using interface defaults for 'Vitis' flow target.
INFO: [HLS 200-111] Finished Command csynth_design CPU user time: 3.3 seconds. CPU system time: 0.35 seconds. Elapsed time: 3.56 seconds; current allocated memory: 209.139 MB.
Pre-synthesis failed.
    while executing
"source accel.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel \#0 [list source $arg] "

INFO: [HLS 200-112] Total CPU user time: 5.81 seconds. Total CPU system time: 0.99 seconds. Total elapsed time: 5.43 seconds; peak allocated memory: 208.758 MB.
INFO: [Common 17-206] Exiting vitis_hls at Fri Feb 25 13:28:33 2022..

项目代码

4

1 回答 1

0

我有完全相同的错误:

INFO: [HLS 200-111] Finished Command csynth_design CPU user time: 45.76 seconds. CPU system time: 0.94 seconds. Elapsed time: 46.21 seconds; current allocated memory: 194.761 MB.
Pre-synthesis failed.
    while executing
"source ../scripts/ip_v6.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel \#0 [list source $arg] "

我很想知道如何跟踪错误源。如果我启动 viti_hls GUI,我也会收到相同的错误消息。

于 2022-03-01T14:07:58.607 回答