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_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=shen #pragma HLS INTERFACE...
The wrong part of the code is: // incorrect dimension error reg [7:0][1:0] shift_reg; The right code snippet is: reg [7:0] shift_reg;
'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition'
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_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=shen #pragma HLS INTERFACE ap_n...
The right code snippet is: reg [7:0] shift_reg;
'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition'
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_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=shen #pragma HL...
The wrong part of the code is: // incorrect dimension error reg [7:0][1:0] shift_reg; The high-level-synthesis bug type of the code is: 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition'
'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition'
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_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The wrong part of the code is: // incorrect dimension error reg [7:0][1:0] shift_reg; The high-level-synthesis bug type of the code is: 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition' The right code snippet is: reg [7:0] shift_reg;
'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS Code: ``` #include <ap_int.h> void shift_register( bool clk, bool reset, ap_uint<8> data_in, bool shift_direction, bool load, ap_uint<8> &q ) { #pragma HLS INTERFACE ...
The wrong part of the code is: ``` static ap_uint<8> shift_reg; ``` The right code snippet is: ``` static ap_uint<8> shift_reg = 0x34; ```
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS Code: ``` #include <ap_int.h> void shift_register( bool clk, bool reset, ap_uint<8> data_in, bool shift_direction, bool load, ap_uint<8> &q ) { #pragma HLS INTERFACE ap_ct...
The right code snippet is: ``` static ap_uint<8> shift_reg = 0x34; ```
'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: HLS Code: ``` #include <ap_int.h> void shift_register( bool clk, bool reset, ap_uint<8> data_in, bool shift_direction, bool load, ap_uint<8> &q ) { #pragma HLS...
The wrong part of the code is: ``` static ap_uint<8> shift_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: HLS Code: ``` #include <ap_int.h> void shift_register( bool clk, bool reset, ap_uint<8> data_in, bool shift_direction, bool lo...
The wrong part of the code is: ``` static ap_uint<8> shift_reg; ``` The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ``` static ap_uint<8> shift_reg = 0x34; ```
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS Code: ``` #include <ap_int.h> void shift_register( bool clk, bool reset, ap_uint<8> data_in, bool shift_direction, bool load, ap_uint<8> &q ) { #pragma HLS INTERFACE ...
The wrong part of the code is: ``` shift_reg = (shift_reg.range(6, 0), shift_reg[8]); ``` The right code snippet is: ``` shift_reg = (shift_reg.range(6, 0), shift_reg[7]); ```
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS Code: ``` #include <ap_int.h> void shift_register( bool clk, bool reset, ap_uint<8> data_in, bool shift_direction, bool load, ap_uint<8> &q ) { #pragma HLS INTERFACE ap_ct...
The right code snippet is: ``` shift_reg = (shift_reg.range(6, 0), shift_reg[7]); ```
'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: HLS Code: ``` #include <ap_int.h> void shift_register( bool clk, bool reset, ap_uint<8> data_in, bool shift_direction, bool load, ap_uint<8> &q ) { #pragma HLS...
The wrong part of the code is: ``` shift_reg = (shift_reg.range(6, 0), shift_reg[8]); ``` 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: HLS Code: ``` #include <ap_int.h> void shift_register( bool clk, bool reset, ap_uint<8> data_in, bool shift_direction, bool lo...
The wrong part of the code is: ``` shift_reg = (shift_reg.range(6, 0), shift_reg[8]); ``` The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: ``` shift_reg = (shift_reg.range(6, 0), shift_reg[7]); ```
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS Code: ``` #include <ap_int.h> void shift_register( bool clk, bool reset, ap_uint<8> data_in, bool shift_direction, bool load, ap_uint<8> &q ) { #pragma HLS INTERFACE ...
The wrong part of the code is: ``` shift_reg = (shift_reg[0], shift_reg.range(8, 1)); ``` The right code snippet is: ``` shift_reg = (shift_reg[0], shift_reg.range(7, 1)); ```
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS Code: ``` #include <ap_int.h> void shift_register( bool clk, bool reset, ap_uint<8> data_in, bool shift_direction, bool load, ap_uint<8> &q ) { #pragma HLS INTERFACE ap_ct...
The right code snippet is: ``` shift_reg = (shift_reg[0], shift_reg.range(7, 1)); ```
'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: HLS Code: ``` #include <ap_int.h> void shift_register( bool clk, bool reset, ap_uint<8> data_in, bool shift_direction, bool load, ap_uint<8> &q ) { #pragma HLS...
The wrong part of the code is: ``` shift_reg = (shift_reg[0], shift_reg.range(8, 1)); ``` 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: HLS Code: ``` #include <ap_int.h> void shift_register( bool clk, bool reset, ap_uint<8> data_in, bool shift_direction, bool lo...
The wrong part of the code is: ``` shift_reg = (shift_reg[0], shift_reg.range(8, 1)); ``` The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: ``` shift_reg = (shift_reg[0], shift_reg.range(7, 1)); ```
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: and_out[i] = in[2*i+1] & in[2*i+2]; The right code snippet is: and_out[i] = in[2*i] & in[2*i+1];
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: and_out[i] = in[2*i] & in[2*i+1];
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: and_out[i] = in[2*i+1] & in[2*i+2]; 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: and_out[i] = in[2*i+1] & in[2*i+2]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: and_out[i] = in[2*i] & in[2*i+1];
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: ap_uint<50> and_out = 0; The right code snippet is: ap_uint<50> and_out;
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: ap_uint<50> and_out;
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: ap_uint<50> and_out = 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: ap_uint<50> and_out = 0; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<50> and_out;
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: or_out[i] = in[2*i] | in[2*i+2]; The right code snippet is: or_out[i] = in[2*i] | in[2*i+1];
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: or_out[i] = in[2*i] | in[2*i+1];
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: or_out[i] = in[2*i] | in[2*i+2]; 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: or_out[i] = in[2*i] | in[2*i+2]; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: or_out[i] = in[2*i] | in[2*i+1];
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: for (int i = 0; ; i++) { xor_out[i] = in[i] ^ in[i+1]; } The right code snippet is: for (int i = 0; i < 99; i++) { xor_out[i] = in[i] ^ in[i+1]; }
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: for (int i = 0; i < 99; i++) { xor_out[i] = in[i] ^ in[i+1]; }
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: for (int i = 0; ; i++) { xor_out[i] = in[i] ^ in[i+1]; } 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: for (int i = 0; ; i++) { xor_out[i] = in[i] ^ in[i+1]; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 99; i++) { xor_out[i] = in[i] ^ in[i+1]; }
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: out_and = (ap_uint<1>)and_out.and_reduce(); The right code snippet is: out_and = and_out.and_reduce();
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: out_and = and_out.and_reduce();
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: out_and = (ap_uint<1>)and_out.and_reduce(); 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: out_and = (ap_uint<1>)and_out.and_reduce(); The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: out_and = and_out.and_reduce();
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: and_out[0] = in[0] & in[1]; or_out[0] = in[0] | in[1]; for (int i = 1; i < 50; i++) { and_out[i] = in[2*i] & in[2*i+1]; or_out[i] = in[2*i] | in[2*i+1]; } The right code snippet is: for (int i = 0; i < 50; i++) { and_out[i] = in[2*i] & in[2*i+1]; or_out[i]...
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: for (int i = 0; i < 50; i++) { and_out[i] = in[2*i] & in[2*i+1]; or_out[i] = in[2*i] | in[2*i+1]; }
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: and_out[0] = in[0] & in[1]; or_out[0] = in[0] | in[1]; for (int i = 1; i < 50; i++) { and_out[i] = in[2*i] & in[2*i+1]; or_out[i] = in[2*i] | in[2*i+1]; } 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: and_out[0] = in[0] & in[1]; or_out[0] = in[0] | in[1]; for (int i = 1; i < 50; i++) { and_out[i] = in[2*i] & in[2*i+1]; or_out[i] = in[2*i] | in[2*i+1]; } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 50...
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: ap_uint<4> johnson_counter; The right code snippet is: ap_uint<4> johnson_counter = 0;
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: ap_uint<4> johnson_counter = 0;
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: ap_uint<4> johnson_counter; 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: ap_uint<4> johnson_counter; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_uint<4> johnson_counter = 0;
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: out_sum = out_xor + 4; The right code snippet is: out_sum = out_xor + 8;
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: out_sum = out_xor + 8;
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: out_sum = out_xor + 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: #include <ap_int.h> void top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: out_sum = out_xor + 4; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: out_sum = out_xor + 8;
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=out_and cyclic factor=2 dim=1 The right code snippet is: #pragma HLS INTERFACE ap_none port=out_and
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: #pragma HLS INTERFACE ap_none port=out_and
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=out_and cyclic factor=2 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=out_and cyclic factor=2 dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS INTERFACE ap_none port=out_and
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=out_sum cyclic factor=3 dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=out_sum cyclic factor=2 dim=1
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=out_sum cyclic factor=2 dim=1
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=out_sum cyclic factor=3 dim=1 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=out_sum cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=out_sum cyclic factor=2 dim=1
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=out_sum cyclic factor=2 dim=2 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=out_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: #include <ap_int.h> void top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=out_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: #include <ap_int.h> void top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=out_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: #include <ap_int.h> void top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=out_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=out_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: #include <ap_int.h> void top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
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: #include <ap_int.h> void top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
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: #include <ap_int.h> void top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
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: #include <ap_int.h> void top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: #pragma HLS INTERFACE s_axilite port=in The right code snippet is: #pragma HLS INTERFACE axis port=in
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: #pragma HLS INTERFACE axis port=in
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: #pragma HLS INTERFACE s_axilite port=in 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: #pragma HLS INTERFACE s_axilite port=in The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS INTERFACE axis port=in
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=out_sum The right code snippet is: #pragma HLS INTERFACE ap_none port=out_sum
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: #pragma HLS INTERFACE ap_none port=out_sum
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=out_sum 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=out_sum The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS INTERFACE ap_none port=out_sum
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: #pragma HLS INTERFACE bram port=out_sum The right code snippet is: #pragma HLS INTERFACE ap_none port=out_sum
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: #pragma HLS INTERFACE ap_none port=out_sum
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: #pragma HLS INTERFACE bram port=out_sum 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: #pragma HLS INTERFACE bram port=out_sum The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS INTERFACE ap_none port=out_sum
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=Q The right code snippet is: #pragma HLS INTERFACE ap_none port=Q
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: #pragma HLS INTERFACE ap_none port=Q
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=Q 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=Q The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS INTERFACE ap_none port=Q
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
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: #include <ap_int.h> void top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
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: #include <ap_int.h> void top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
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: #include <ap_int.h> void top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q...
The wrong part of the code is: for (int i = 0; i < 50; i+=2) { and_out[i] = in[2*i] & in[2*i+1]; or_out[i] = in[2*i] The right code snippet is: for (int i = 0; i < 50; i++) { and_out[i] = in[2*i] & in[2*i+1]; or_out[i] = in[2*i] | in[2*i+1]; }
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap_uint<4>& Q, ...
The right code snippet is: for (int i = 0; i < 50; i++) { and_out[i] = in[2*i] & in[2*i+1]; or_out[i] = in[2*i] | in[2*i+1]; }
'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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& out_or, ap_uint<1>& out_xor, ap...
The wrong part of the code is: for (int i = 0; i < 50; i+=2) { and_out[i] = in[2*i] & in[2*i+1]; or_out[i] = in[2*i] 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 top_module( ap_clk clk, ap_rst reset, ap_uint<100> in, ap_uint<1>& out_and, ap_uint<1>& ou...
The wrong part of the code is: for (int i = 0; i < 50; i+=2) { and_out[i] = in[2*i] & in[2*i+1]; or_out[i] = in[2*i] The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: for (int i = 0; i < 50; i++) { and_out[i] = in[2*i] & in[2*i+1]; or_out[i] = in[2*...
'ILNU'
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> const int n2 = 10; void level2arch(ap_int<16> data_in, bool clk, bool nReset, ap_int<16> &cD_l2, ap_int<16> &cA_l2, ap_int<16> cD_store[n2-1]) { #pragma HLS I...
The wrong part of the code is: cD_store[n2] = cD_l2; The right code snippet is: cD_store[count3-1] = cD_l2;
'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> const int n2 = 10; void level2arch(ap_int<16> data_in, bool clk, bool nReset, ap_int<16> &cD_l2, ap_int<16> &cA_l2, ap_int<16> cD_store[n2-1]) { #pragma HLS INTERF...
The right code snippet is: cD_store[count3-1] = cD_l2;
'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> const int n2 = 10; void level2arch(ap_int<16> data_in, bool clk, bool nReset, ap_int<16> &cD_l2, ap_int<16> &cA_l2, ap_int<16> cD_store[n2-1]) { #p...
The wrong part of the code is: cD_store[n2] = cD_l2; 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> const int n2 = 10; void level2arch(ap_int<16> data_in, bool clk, bool nReset, ap_int<16> &cD_l2, ap_int<16> &cA_l2...
The wrong part of the code is: cD_store[n2] = cD_l2; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: cD_store[count3-1] = cD_l2;
'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> const int n2 = 10; void level2arch(ap_int<16> data_in, bool clk, bool nReset, ap_int<16> &cD_l2, ap_int<16> &cA_l2, ap_int<16> cD_store[n2-1]) { #pragma HLS I...
The wrong part of the code is: ap_uint<3> count1; The right code snippet is: ap_uint<3> count1 = 0;
'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> const int n2 = 10; void level2arch(ap_int<16> data_in, bool clk, bool nReset, ap_int<16> &cD_l2, ap_int<16> &cA_l2, ap_int<16> cD_store[n2-1]) { #pragma HLS INTERF...
The right code snippet is: ap_uint<3> count1 = 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: #include <ap_int.h> const int n2 = 10; void level2arch(ap_int<16> data_in, bool clk, bool nReset, ap_int<16> &cD_l2, ap_int<16> &cA_l2, ap_int<16> cD_store[n2-1]) { #p...
The wrong part of the code is: ap_uint<3> count1; 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> const int n2 = 10; void level2arch(ap_int<16> data_in, bool clk, bool nReset, ap_int<16> &cD_l2, ap_int<16> &cA_l2...
The wrong part of the code is: ap_uint<3> count1; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<3> count1 = 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: #include <ap_int.h> const int n2 = 10; void level2arch(ap_int<16> data_in, bool clk, bool nReset, ap_int<16> &cD_l2, ap_int<16> &cA_l2, ap_int<16> cD_store[n2-1]) { #pragma HLS I...
The wrong part of the code is: data1 = data_in << 20; The right code snippet is: data1 = data_in;
'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> const int n2 = 10; void level2arch(ap_int<16> data_in, bool clk, bool nReset, ap_int<16> &cD_l2, ap_int<16> &cA_l2, ap_int<16> cD_store[n2-1]) { #pragma HLS INTERF...
The right code snippet is: data1 = data_in;
'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> const int n2 = 10; void level2arch(ap_int<16> data_in, bool clk, bool nReset, ap_int<16> &cD_l2, ap_int<16> &cA_l2, ap_int<16> cD_store[n2-1]) { #p...
The wrong part of the code is: data1 = data_in << 20; 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> const int n2 = 10; void level2arch(ap_int<16> data_in, bool clk, bool nReset, ap_int<16> &cD_l2, ap_int<16> &cA_l2...
The wrong part of the code is: data1 = data_in << 20; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: data1 = data_in;
'SHFT'