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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8>& sum, ap_uint<1>& carry_out) { #pragma HLS INTERFACE ap_none port=a #pragma HLS INTER...
The wrong part of the code is: for (int i = 0; i >= 0; i The right code snippet is: for (int i = 0; i < 10; i++) { // code here }
'INF': An infinite loop arising from an incorrect loop termination
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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8>& sum, ap_uint<1>& carry_out) { #pragma HLS INTERFACE ap_none port=a #pragma HLS INTERFACE ...
The right code snippet is: for (int i = 0; i < 10; i++) { // code here }
'INF': An infinite loop arising from an incorrect loop termination
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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8>& sum, ap_uint<1>& carry_out) { #pragma HLS INTERFACE ap_none port=a #pragm...
The wrong part of the code is: for (int i = 0; i >= 0; i The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination
'INF': An infinite loop arising from an incorrect loop termination
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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8>& sum, ap_uint<1>& carry_out) { #pragma HL...
The wrong part of the code is: for (int i = 0; i >= 0; i The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination The right code snippet is: for (int i = 0; i < 10; i++) { // code here }
'INF': An infinite loop arising from an incorrect loop termination
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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[8-i]; } ...
The wrong part of the code is: shift_reg[i] = in[8-i]; The right code snippet is: shift_reg[i] = in[7-i];
'OOB'
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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[8-i]; } ou...
The right code snippet is: shift_reg[i] = in[7-i];
'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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[8-...
The wrong part of the code is: shift_reg[i] = in[8-i]; 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: shift_reg[i] = in[8-i]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: shift_reg[i] = in[7-i];
'OOB'
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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: ap_uint<8> bit_reversed = 0; The right code snippet is: ap_uint<8> bit_reversed;
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
The right code snippet is: ap_uint<8> bit_reversed;
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: ap_uint<8> bit_reversed = 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: ap_uint<8> bit_reversed = 0; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<8> bit_reversed;
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: out_not[5] = ~b[3]; The right code snippet is: out_not[5] = ~b[2];
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
The right code snippet is: out_not[5] = ~b[2];
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: out_not[5] = ~b[3]; 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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: out_not[5] = ~b[3]; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: out_not[5] = ~b[2];
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i <= 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: for (int i = 0; i <= 8; i++) { The right code snippet is: for (int i = 0; i < 8; i++) {
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i <= 8; i++) { shift_reg[i] = in[7-i]; } o...
The right code snippet is: for (int i = 0; i < 8; 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i <= 8; i++) { shift_reg[i] = in[7...
The wrong part of the code is: for (int i = 0; i <= 8; 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i <= ...
The wrong part of the code is: for (int i = 0; i <= 8; i++) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 8; 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: out_not[5] = ~(unsigned int)b[2]; The right code snippet is: out_not[5] = ~b[2];
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
The right code snippet is: out_not[5] = ~b[2];
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: out_not[5] = ~(unsigned int)b[2]; 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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: out_not[5] = ~(unsigned int)b[2]; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: out_not[5] = ~b[2];
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: for (int i = 0; i < 4; i++) { shift_reg[i] = in[7-i]; shift_reg[i+4] = in[3-i]; } The right code snippet is: None
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
The right code snippet is: None
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: for (int i = 0; i < 4; i++) { shift_reg[i] = in[7-i]; shift_reg[i+4] = in[3-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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: for (int i = 0; i < 4; i++) { shift_reg[i] = in[7-i]; shift_reg[i+4] = in[3-i]; } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: None
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: ap_uint<8> bit_reversed = 1; The right code snippet is: ap_uint<8> bit_reversed;
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
The right code snippet is: ap_uint<8> bit_reversed;
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: ap_uint<8> bit_reversed = 1; 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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: ap_uint<8> bit_reversed = 1; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_uint<8> bit_reversed;
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: ap_uint<8> step1_output = ~and_bitwise; The right code snippet is: ap_uint<8> step1_output = ~nor_bitwise;
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
The right code snippet is: ap_uint<8> step1_output = ~nor_bitwise;
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: ap_uint<8> step1_output = ~and_bitwise; 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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: ap_uint<8> step1_output = ~and_bitwise; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: ap_uint<8> step1_output = ~nor_bitwise;
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: #pragma HLS array_partition variable=shift_reg cyclic The right code snippet is: #pragma HLS array_partition variable=shift_reg complete
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
The right code snippet is: #pragma HLS array_partition variable=shift_reg 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: #pragma HLS array_partition variable=shift_reg 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: #pragma HLS array_partition variable=shift_reg cyclic The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=shift_reg 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: #pragma HLS array_partition variable=out_not cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=out_not complete
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
The right code snippet is: #pragma HLS array_partition variable=out_not complete
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: #pragma HLS array_partition variable=out_not 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: #pragma HLS array_partition variable=out_not cyclic factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=out_not complete
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: #pragma HLS array_partition variable=shift_reg complete dim=2 The right code snippet is: #pragma HLS array_partition variable=shift_reg complete dim=1
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
The right code snippet is: #pragma HLS array_partition variable=shift_reg complete 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: #pragma HLS array_partition variable=shift_reg complete 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: #pragma HLS array_partition variable=shift_reg complete dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=shift_reg complete 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: #pragma HLS dataflow region 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: #pragma HLS dataflow region 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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: #pragma HLS dataflow region 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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: #pragma HLS interface m_axi port=in offset=slave bundle=wrong_bundle The right code snippet is: #pragma HLS interface m_axi port=in offset=slave
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
The right code snippet is: #pragma HLS interface m_axi port=in offset=slave
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: #pragma HLS interface m_axi port=in offset=slave bundle=wrong_bundle 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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: #pragma HLS interface m_axi port=in offset=slave bundle=wrong_bundle The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=in offset=slave
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: #pragma HLS interface bram port=in The right code snippet is: #pragma HLS interface ap_fifo port=in
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
The right code snippet is: #pragma HLS interface ap_fifo port=in
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: #pragma HLS interface bram port=in 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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: #pragma HLS interface bram port=in The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_fifo port=in
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: #pragma HLS interface ap_vld port=final_output The right code snippet is: #pragma HLS interface ap_none port=final_output
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
The right code snippet is: #pragma HLS interface ap_none port=final_output
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: #pragma HLS interface ap_vld port=final_output 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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: #pragma HLS interface ap_vld port=final_output The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_none port=final_output
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
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: ``` #include <ap_int.h> void bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ...
The wrong part of the code is: #pragma HLS unroll inner loop full The right code snippet is: None
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-i]; } ou...
The right code snippet is: None
'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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8; i++) { shift_reg[i] = in[7-...
The wrong part of the code is: #pragma HLS unroll inner loop full 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 bit_reverse(ap_uint<8> in, ap_uint<8>& out_reversed) { ap_uint<8> shift_reg; for (int i = 0; i < 8...
The wrong part of the code is: #pragma HLS unroll inner loop full The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: None
'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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
The wrong part of the code is: case 2'b11: Y = D[10]; break; The right code snippet is: case 2'b10: Y = C; break;
OOB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
The right code snippet is: case 2'b10: Y = C; break;
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: case 2'b11: Y = D[10]; break; 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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
The wrong part of the code is: case 2'b11: Y = D[10]; break; The high-level-synthesis bug type of the code is: OOB The right code snippet is: case 2'b10: Y = C; break;
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
The wrong part of the code is: int x; switch (S[1] + x, S[0] + x) { The right code snippet is: switch (S[1], S[0]) {
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
The right code snippet is: switch (S[1], S[0]) {
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: int x; switch (S[1] + x, S[0] + x) { 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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
The wrong part of the code is: int x; switch (S[1] + x, S[0] + x) { The high-level-synthesis bug type of the code is: INIT The right code snippet is: switch (S[1], S[0]) {
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
The wrong part of the code is: case 2'b01: Y = B << 10; break; The right code snippet is: case 2'b01: Y = B; break;
SHFT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
The right code snippet is: case 2'b01: Y = B; break;
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: case 2'b01: Y = B << 10; break; 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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
The wrong part of the code is: case 2'b01: Y = B << 10; break; The high-level-synthesis bug type of the code is: SHFT The right code snippet is: case 2'b01: Y = B; break;
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
The wrong part of the code is: while (1) { switch (S[1], S[0]) { case 2'b00: Y = A; break; case 2'b01: Y = B; break; case 2'b10: Y = C; break; case 2'b11: Y = D; break; } } The right code snippet is: switch (S[1], S[0]) { case 2'b00: Y = A; break; case 2'...
INF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
The right code snippet is: switch (S[1], S[0]) { case 2'b00: Y = A; break; case 2'b01: Y = B; break; case 2'b10: Y = C; break; case 2'b11: Y = D; break; }
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: while (1) { switch (S[1], S[0]) { case 2'b00: Y = A; break; case 2'b01: Y = B; break; case 2'b10: Y = C; break; case 2'b11: Y = D; break; } } 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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
The wrong part of the code is: while (1) { switch (S[1], S[0]) { case 2'b00: Y = A; break; case 2'b01: Y = B; break; case 2'b10: Y = C; break; case 2'b11: Y = D; break; } } The high-level-synthesis bug type of the code is: INF The right code snippet is: switc...
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
The wrong part of the code is: case 2'b11: Y = (signed int)D; break; The right code snippet is: case 2'b11: Y = D; break;
USE
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
The right code snippet is: case 2'b11: Y = D; break;
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: case 2'b11: Y = (signed int)D; break; 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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
The wrong part of the code is: case 2'b11: Y = (signed int)D; break; The high-level-synthesis bug type of the code is: USE The right code snippet is: case 2'b11: Y = D; break;
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
The wrong part of the code is: case 2'b00: Y = A + B + C + D; break; The right code snippet is: case 2'b00: Y = A; break;
MLU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
The right code snippet is: case 2'b00: Y = A; break;
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: case 2'b00: Y = A + B + C + D; break; 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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
The wrong part of the code is: case 2'b00: Y = A + B + C + D; break; The high-level-synthesis bug type of the code is: MLU The right code snippet is: case 2'b00: Y = A; break;
MLU