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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: ap_uint<32> sum_reg, difference_reg, product_reg; The right code snippet is: ap_uint<32> sum_reg, difference_reg, product_reg, quotient_reg;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: ap_uint<32> sum_reg, difference_reg, product_reg, quotient_reg;
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: ap_uint<32> sum_reg, difference_reg, product_reg; 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: ap_uint<32> sum_reg, difference_reg, product_reg; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<32> sum_reg, difference_reg, product_reg, quotient_reg;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: product_reg = a_reg << 33; The right code snippet is: product_reg = a_reg * b_reg;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: product_reg = a_reg * b_reg;
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: product_reg = a_reg << 33; 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: product_reg = a_reg << 33; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: product_reg = a_reg * b_reg;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: while (b_reg != 0) { quotient_reg = a_reg / b_reg; } The right code snippet is: if (b_reg == 0) { quotient_reg = 0; } else { quotient_reg = a_reg / b_reg; }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: if (b_reg == 0) { quotient_reg = 0; } else { quotient_reg = a_reg / b_reg; }
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: while (b_reg != 0) { quotient_reg = a_reg / b_reg; } 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: while (b_reg != 0) { quotient_reg = a_reg / b_reg; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (b_reg == 0) { quotient_reg = 0; } else { quotient_reg = a_reg / b_reg; }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: ap_int<32> a_reg, b_reg; The right code snippet is: ap_uint<32> a_reg, b_reg;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: ap_uint<32> a_reg, b_reg;
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: ap_int<32> a_reg, b_reg; 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: ap_int<32> a_reg, b_reg; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<32> a_reg, b_reg;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: switch (operation_reg) { case 0: sum_reg = a_reg + b_reg; break; case 1: difference_reg = a_reg - b_reg; break; case 2: product_reg = a_reg * b_reg; break; case 3: if (b_reg == 0) { quotient_reg =...
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: switch (operation_reg) { case 0: sum_reg = a_reg + b_reg; break; case 1: difference_reg = a_reg - b_reg; break; case 2: product_reg = a_reg * b_reg; break; case 3: if (b_reg == 0) { quotient_reg = 0; ...
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: switch (operation_reg) { case 0: sum_reg = a_reg + b_reg; break; case 1: difference_reg = a_reg - b_reg; break; case 2: product_reg = a_reg * b_reg; break; case 3: if (b_reg == 0) { quotient_reg =...
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: switch (operation_reg) { case 0: sum_reg = a_reg + b_reg; break; case 1: difference_reg = a_reg - b_reg; break; case 2: product_reg = a_reg * b_reg; break; case 3: if (b_reg == 0) { quotient_reg =...
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: ap_uint<32> sum_reg = 0, difference_reg = 0, product_reg = 0, quotient_reg = 0; The right code snippet is: ap_uint<32> sum_reg, difference_reg, product_reg, quotient_reg;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: ap_uint<32> sum_reg, difference_reg, product_reg, quotient_reg;
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: ap_uint<32> sum_reg = 0, difference_reg = 0, product_reg = 0, quotient_reg = 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: ap_uint<32> sum_reg = 0, difference_reg = 0, product_reg = 0, quotient_reg = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_uint<32> sum_reg, difference_reg, product_reg, quotient_reg;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: N/A (no split buffer present) The right code snippet is: N/A (no split buffer present)
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: N/A (no split buffer present)
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: N/A (no split buffer present) 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: N/A (no split buffer present) The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: N/A (no split buffer present)
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: #pragma HLS array_partition variable=a cyclic factor=0 dim=1 The right code snippet is: N/A (no '#pragma HLS array_partition' present)
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: N/A (no '#pragma HLS array_partition' present)
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: #pragma HLS array_partition variable=a cyclic factor=0 dim=1 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: #pragma HLS array_partition variable=a cyclic factor=0 dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: N/A (no '#pragma HLS array_partition' present)
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: #pragma HLS array_partition variable=a cyclic factor=3 dim=2 The right code snippet is: N/A (no '#pragma HLS array_partition' present)
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: N/A (no '#pragma HLS array_partition' present)
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: #pragma HLS array_partition variable=a cyclic factor=3 dim=2 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: #pragma HLS array_partition variable=a cyclic factor=3 dim=2 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: N/A (no '#pragma HLS array_partition' present)
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: #pragma HLS array_partition variable=a cyclic factor=3 dim=3 The right code snippet is: N/A (no '#pragma HLS array_partition' present)
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: N/A (no '#pragma HLS array_partition' present)
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: #pragma HLS array_partition variable=a cyclic factor=3 dim=3 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: #pragma HLS array_partition variable=a cyclic factor=3 dim=3 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: N/A (no '#pragma HLS array_partition' present)
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: #pragma HLS dataflow The right code snippet is: N/A (no '#pragma HLS dataflow' present)
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: N/A (no '#pragma HLS dataflow' present)
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: #pragma HLS dataflow 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: #pragma HLS dataflow The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: N/A (no '#pragma HLS dataflow' present)
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: #pragma HLS interface ap_none port=sum_reg The right code snippet is: N/A (no '#pragma HLS interface' present)
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: N/A (no '#pragma HLS interface' present)
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: #pragma HLS interface ap_none port=sum_reg 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: #pragma HLS interface ap_none port=sum_reg The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: N/A (no '#pragma HLS interface' present)
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: N/A (no m_axi interface present) The right code snippet is: N/A (no m_axi interface present)
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: N/A (no m_axi interface present)
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: N/A (no m_axi interface present) 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: N/A (no m_axi interface present) The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: N/A (no m_axi interface present)
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: N/A (no array interfaces present) The right code snippet is: N/A (no array interfaces present)
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: N/A (no array interfaces present)
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: N/A (no array interfaces present) 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: N/A (no array interfaces present) The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: N/A (no array interfaces present)
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: N/A (no scalar interfaces present) The right code snippet is: N/A (no scalar interfaces present)
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: N/A (no scalar interfaces present)
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: N/A (no scalar interfaces present) 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: N/A (no scalar interfaces present) The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: N/A (no scalar interfaces present)
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: N/A (no '#pragma HLS pipeline' present)
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: N/A (no '#pragma HLS pipeline' present)
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
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: N/A (no '#pragma HLS pipeline' present)
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quoti...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop=1 The right code snippet is: N/A (all loops are fully unrolled)
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> &quotient) ...
The right code snippet is: N/A (all loops are fully unrolled)
'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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop=1 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: ``` #include <ap_int.h> void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop=1 The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: N/A (all loops are fully unrolled)
'ILNU'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_ax...
The wrong part of the code is: read_sel[4].sel = control.range(3, 0); The right code snippet is: read_sel[1].sel = control.range(3, 0);
'OOB'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_axilite...
The right code snippet is: read_sel[1].sel = control.range(3, 0);
'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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INT...
The wrong part of the code is: read_sel[4].sel = control.range(3, 0); 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: read_sel[4].sel = control.range(3, 0); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: read_sel[1].sel = control.range(3, 0);
'OOB'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_ax...
The wrong part of the code is: ap_uint<16>& R0 = 0, ap_uint<16>& R1 = 0, ap_uint<16>& R2 = 0, ap_uint<16>& R3 = 0 The right code snippet is: ap_uint<16>& R0, ap_uint<16>& R1, ap_uint<16>& R2, ap_uint<16>& R3
'INIT'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_axilite...
The right code snippet is: ap_uint<16>& R0, ap_uint<16>& R1, ap_uint<16>& R2, ap_uint<16>& R3
'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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INT...
The wrong part of the code is: ap_uint<16>& R0 = 0, ap_uint<16>& R1 = 0, ap_uint<16>& R2 = 0, ap_uint<16>& R3 = 0 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: ap_uint<16>& R0 = 0, ap_uint<16>& R1 = 0, ap_uint<16>& R2 = 0, ap_uint<16>& R3 = 0 The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<16>& R0, ap_uint<16>& R1, ap_uint<16>& R2, ap_uint<16>& R3
'INIT'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_ax...
The wrong part of the code is: read_sel[2].sel = control.range(32, 0); The right code snippet is: read_sel[2].sel = control.range(3, 0);
'SHFT'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_axilite...
The right code snippet is: read_sel[2].sel = control.range(3, 0);
'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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INT...
The wrong part of the code is: read_sel[2].sel = control.range(32, 0); 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: read_sel[2].sel = control.range(32, 0); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: read_sel[2].sel = control.range(3, 0);
'SHFT'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_ax...
The wrong part of the code is: for (int i = 0; i >= 3; i++) { The right code snippet is: for (int i = 0; i < 3; i++) {
'INF'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_axilite...
The right code snippet is: for (int i = 0; i < 3; i++) {
'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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INT...
The wrong part of the code is: for (int i = 0; i >= 3; i++) { 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: for (int i = 0; i >= 3; i++) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 3; i++) {
'INF'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_ax...
The wrong part of the code is: signed int read_sel[3]; The right code snippet is: read_sel_t read_sel[3];
'USE'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_axilite...
The right code snippet is: read_sel_t read_sel[3];
'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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INT...
The wrong part of the code is: signed int read_sel[3]; 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: signed int read_sel[3]; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: read_sel_t read_sel[3];
'USE'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_ax...
The wrong part of the code is: for (int i = 0; i < 2; i++) { The right code snippet is: for (int i = 0; i < 3; i++) {
'MLU'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_axilite...
The right code snippet is: for (int i = 0; i < 3; i++) {
'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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INT...
The wrong part of the code is: for (int i = 0; i < 2; i++) { 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: for (int i = 0; i < 2; i++) { The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 3; i++) {
'MLU'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_ax...
The wrong part of the code is: read_sel[2].data = 0; The right code snippet is: read_sel[2].data = R2;
'ZERO'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_axilite...
The right code snippet is: read_sel[2].data = R2;
'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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INT...
The wrong part of the code is: read_sel[2].data = 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: read_sel[2].data = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: read_sel[2].data = R2;
'ZERO'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_ax...
The wrong part of the code is: read_sel[1].sel = control.range(7, 4); The right code snippet is: read_sel[0].sel = control.range(7, 4);
'BUF'
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=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INTERFACE s_axilite...
The right code snippet is: read_sel[0].sel = control.range(7, 4);
'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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite port=control bundle=CTRL #pragma HLS INT...
The wrong part of the code is: read_sel[1].sel = control.range(7, 4); 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=data bundle=CTRL #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: read_sel[1].sel = control.range(7, 4); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: read_sel[0].sel = control.range(7, 4);
'BUF'