instruction
stringlengths
139
357k
response
stringlengths
36
4.54k
buggy_type
stringclasses
745 values
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data #pragma HL...
The wrong part of the code is: #pragma HLS interface m_axi port=buffer random The right code snippet is: #pragma HLS interface m_axi port=buffer
RAMB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data #pragma HLS INT...
The right code snippet is: #pragma HLS interface m_axi port=buffer
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data...
The wrong part of the code is: #pragma HLS interface m_axi port=buffer random The high-level-synthesis bug type of the code is: RAMB
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pra...
The wrong part of the code is: #pragma HLS interface m_axi port=buffer random The high-level-synthesis bug type of the code is: RAMB The right code snippet is: #pragma HLS interface m_axi port=buffer
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data #pragma HL...
The wrong part of the code is: #pragma HLS interface bram port=buffer The right code snippet is: #pragma HLS interface axis port=buffer
SMA
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data #pragma HLS INT...
The right code snippet is: #pragma HLS interface axis port=buffer
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data...
The wrong part of the code is: #pragma HLS interface bram port=buffer The high-level-synthesis bug type of the code is: SMA
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pra...
The wrong part of the code is: #pragma HLS interface bram port=buffer The high-level-synthesis bug type of the code is: SMA The right code snippet is: #pragma HLS interface axis port=buffer
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data #pragma HL...
The wrong part of the code is: #pragma HLS interface ap_vld port=usedw The right code snippet is: #pragma HLS interface s_axilite port=usedw
AMS
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data #pragma HLS INT...
The right code snippet is: #pragma HLS interface s_axilite port=usedw
AMS
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data...
The wrong part of the code is: #pragma HLS interface ap_vld port=usedw The high-level-synthesis bug type of the code is: AMS
AMS
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pra...
The wrong part of the code is: #pragma HLS interface ap_vld port=usedw The high-level-synthesis bug type of the code is: AMS The right code snippet is: #pragma HLS interface s_axilite port=usedw
AMS
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data #pragma HL...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline II=1
MLP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data #pragma HLS INT...
The right code snippet is: #pragma HLS pipeline II=1
MLP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: MLP
MLP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pra...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: MLP The right code snippet is: #pragma HLS pipeline II=1
MLP
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data #pragma HL...
The wrong part of the code is: #pragma HLS unroll factor=2 The right code snippet is: #pragma HLS unroll
ILNU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data #pragma HLS INT...
The right code snippet is: #pragma HLS unroll
ILNU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pragma HLS INTERFACE s_axilite port=data...
The wrong part of the code is: #pragma HLS unroll factor=2 The high-level-synthesis bug type of the code is: ILNU
ILNU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=aclr #pragma HLS INTERFACE s_axilite port=clock #pra...
The wrong part of the code is: #pragma HLS unroll factor=2 The high-level-synthesis bug type of the code is: ILNU The right code snippet is: #pragma HLS unroll
ILNU
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: ap_int<16> sum = A + (sub ? neg_B : B)[16]; The right code snippet is: ap_int<16> sum = A + (sub ? neg_B : B);
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: ap_int<16> sum = A + (sub ? neg_B : B);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: ap_int<16> sum = A + (sub ? neg_B : B)[16]; The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: ap_int<16> sum = A + (sub ? neg_B : B)[16]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: ap_int<16> sum = A + (sub ? neg_B : B);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B; ap_int<16> sum = A + (sub ? neg_B : B)...
The wrong part of the code is: ap_int<16> neg_B; ap_int<16> sum = A + (sub ? neg_B : B); The right code snippet is: ap_int<16> neg_B = ~B + 1;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B; ap_int<16> sum = A + (sub ? neg_B : B); ...
The right code snippet is: ap_int<16> neg_B = ~B + 1;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B; ap_int<16> sum = A + (sub ?...
The wrong part of the code is: ap_int<16> neg_B; ap_int<16> sum = A + (sub ? neg_B : B); The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: ap_int<16> neg_B; ap_int<16> sum = A + (sub ? neg_B : B); The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_int<16> neg_B = ~B + 1;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: overflow = (sum[15] == sum[16]) ? false : true; The right code snippet is: overflow = (sum[15] == sum[14]) ? false : true;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: overflow = (sum[15] == sum[14]) ? false : true;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: overflow = (sum[15] == sum[16]) ? false : true; The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: overflow = (sum[15] == sum[16]) ? false : true; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: overflow = (sum[15] == sum[14]) ? false : true;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // some code here } The right code snippet is: for (int i = 0; i < 10; i++) { // some code here }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: for (int i = 0; i < 10; i++) { // some code here }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // some code here } The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // some code here } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 10; i++) { // some code here }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_uint<16> sum = A + (su...
The wrong part of the code is: ap_uint<16> sum = A + (sub ? neg_B : B); The right code snippet is: ap_int<16> sum = A + (sub ? neg_B : B);
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_uint<16> sum = A + (sub ? n...
The right code snippet is: ap_int<16> sum = A + (sub ? neg_B : B);
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_uint<16> su...
The wrong part of the code is: ap_uint<16> sum = A + (sub ? neg_B : B); The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: ap_uint<16> sum = A + (sub ? neg_B : B); The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_int<16> sum = A + (sub ? neg_B : B);
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: for (int i = 0; i < 9; i++) { // some code here } The right code snippet is: for (int i = 0; i < 10; i++) { // some code here }
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: for (int i = 0; i < 10; i++) { // some code here }
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: for (int i = 0; i < 9; i++) { // some code here } The high-level-synthesis bug type of the code is: 'MLU'
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: for (int i = 0; i < 9; i++) { // some code here } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 10; i++) { // some code here }
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = 0; ap_int<16> sum = A + (sub ? ne...
The wrong part of the code is: ap_int<16> neg_B = 0; The right code snippet is: ap_int<16> neg_B = ~B + 1;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = 0; ap_int<16> sum = A + (sub ? neg_B :...
The right code snippet is: ap_int<16> neg_B = ~B + 1;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = 0; ap_int<16> sum = A ...
The wrong part of the code is: ap_int<16> neg_B = 0; The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: ap_int<16> neg_B = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_int<16> neg_B = ~B + 1;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: memcpy(buffer1, buffer2 + sizeof(buffer1), sizeof(buffer1)); The right code snippet is: memcpy(buffer1, buffer2, sizeof(buffer1));
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: memcpy(buffer1, buffer2, sizeof(buffer1));
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: memcpy(buffer1, buffer2 + sizeof(buffer1), sizeof(buffer1)); The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: memcpy(buffer1, buffer2 + sizeof(buffer1), sizeof(buffer1)); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memcpy(buffer1, buffer2, sizeof(buffer1));
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: #pragma HLS array_partition variable=sum cyclic The right code snippet is: #pragma HLS array_partition variable=sum complete
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: #pragma HLS array_partition variable=sum complete
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: #pragma HLS array_partition variable=sum cyclic The high-level-synthesis bug type of the code is: 'APT'
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: #pragma HLS array_partition variable=sum cyclic The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=sum complete
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: #pragma HLS array_partition variable=sum cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=sum cyclic factor=2
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: #pragma HLS array_partition variable=sum cyclic factor=2
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: #pragma HLS array_partition variable=sum cyclic factor=3 The high-level-synthesis bug type of the code is: 'FND'
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: #pragma HLS array_partition variable=sum cyclic factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=sum cyclic factor=2
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: #pragma HLS array_partition variable=sum cyclic factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=sum cyclic factor=2 dim=1
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: #pragma HLS array_partition variable=sum cyclic factor=2 dim=1
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: #pragma HLS array_partition variable=sum cyclic factor=2 dim=2 The high-level-synthesis bug type of the code is: 'DID'
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: #pragma HLS array_partition variable=sum cyclic factor=2 dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=sum cyclic factor=2 dim=1
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: #pragma HLS dataflow loop_flatten The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: #pragma HLS dataflow loop_flatten The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: #pragma HLS dataflow loop_flatten The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: #pragma HLS interface ap_none port=return The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: #pragma HLS interface ap_none port=return The high-level-synthesis bug type of the code is: 'IDAP'
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: #pragma HLS interface ap_none port=return The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: #pragma HLS interface m_axi port=data offset=slave The right code snippet is: #pragma HLS interface m_axi port=data offset=direct
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: #pragma HLS interface m_axi port=data offset=direct
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: #pragma HLS interface m_axi port=data offset=slave The high-level-synthesis bug type of the code is: 'RAMB'
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: #pragma HLS interface m_axi port=data offset=slave The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=data offset=direct
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: #pragma HLS interface ap_none port=buffer1 The right code snippet is: #pragma HLS interface ap_memory port=buffer1
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: #pragma HLS interface ap_memory port=buffer1
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: #pragma HLS interface ap_none port=buffer1 The high-level-synthesis bug type of the code is: 'SMA'
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: #pragma HLS interface ap_none port=buffer1 The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_memory port=buffer1
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: #pragma HLS interface ap_memory port=A The right code snippet is: #pragma HLS interface ap_none port=A
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: #pragma HLS interface ap_none port=A
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: #pragma HLS interface ap_memory port=A The high-level-synthesis bug type of the code is: 'AMS'
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: #pragma HLS interface ap_memory port=A The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_none port=A
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP'
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub...
The wrong part of the code is: #pragma HLS unroll factor=2 The right code snippet is: #pragma HLS unroll
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum = A + (sub ? ne...
The right code snippet is: #pragma HLS unroll
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16> neg_B = ~B + 1; ap_int<16> sum...
The wrong part of the code is: #pragma HLS unroll factor=2 The high-level-synthesis bug type of the code is: 'ILNU'
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void adder_subtractor( ap_int<16> A, ap_int<16> B, bool sub, ap_int<16>& result, bool& overflow) { ap_int<16...
The wrong part of the code is: #pragma HLS unroll factor=2 The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: #pragma HLS unroll
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void magnitude_comparator( hls::stream<ap_uint<4>> &A, hls::stream<ap_uint<4>> &B, hls::stream<bool> &EQ, hls::stream<bool> &GT ) { #pragma HLS INTERFACE axis port=A #p...
The wrong part of the code is: ap_uint<4> a = A.read()[5]; The right code snippet is: ap_uint<4> a = A.read();
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void magnitude_comparator( hls::stream<ap_uint<4>> &A, hls::stream<ap_uint<4>> &B, hls::stream<bool> &EQ, hls::stream<bool> &GT ) { #pragma HLS INTERFACE axis port=A #pragma...
The right code snippet is: ap_uint<4> a = A.read();
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void magnitude_comparator( hls::stream<ap_uint<4>> &A, hls::stream<ap_uint<4>> &B, hls::stream<bool> &EQ, hls::stream<bool> &GT ) { #pragma HLS INTERFACE axis ...
The wrong part of the code is: ap_uint<4> a = A.read()[5]; The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void magnitude_comparator( hls::stream<ap_uint<4>> &A, hls::stream<ap_uint<4>> &B, hls::stream<bool> &EQ, hls::stream<bool> ...
The wrong part of the code is: ap_uint<4> a = A.read()[5]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: ap_uint<4> a = A.read();
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void magnitude_comparator( hls::stream<ap_uint<4>> &A, hls::stream<ap_uint<4>> &B, hls::stream<bool> &EQ, hls::stream<bool> &GT ) { #pragma HLS INTERFACE axis port=A #p...
The wrong part of the code is: ap_uint<4> a; The right code snippet is: ap_uint<4> a = A.read();
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void magnitude_comparator( hls::stream<ap_uint<4>> &A, hls::stream<ap_uint<4>> &B, hls::stream<bool> &EQ, hls::stream<bool> &GT ) { #pragma HLS INTERFACE axis port=A #pragma...
The right code snippet is: ap_uint<4> a = A.read();
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void magnitude_comparator( hls::stream<ap_uint<4>> &A, hls::stream<ap_uint<4>> &B, hls::stream<bool> &EQ, hls::stream<bool> &GT ) { #pragma HLS INTERFACE axis ...
The wrong part of the code is: ap_uint<4> a; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void magnitude_comparator( hls::stream<ap_uint<4>> &A, hls::stream<ap_uint<4>> &B, hls::stream<bool> &EQ, hls::stream<bool> ...
The wrong part of the code is: ap_uint<4> a; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<4> a = A.read();
'INIT'