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: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: static unsigned int counter = 0; The right code snippet is: static int counter = 0;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: static int counter = 0;
'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 count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: static unsigned int counter = 0; 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 count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: static unsigned int counter = 0; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: static int counter = 0;
'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 count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: counter = counter + 1; The right code snippet is: for (int i = 0; i < 4; i++) { counter = counter + 1; }
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: for (int i = 0; i < 4; i++) { counter = counter + 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: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: counter = counter + 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: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: counter = counter + 1; The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 4; i++) { counter = counter + 1; }
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: static bool signal_prev = true; The right code snippet is: static bool signal_prev = false;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: static bool signal_prev = false;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: static bool signal_prev = true; The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: static bool signal_prev = true; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static bool signal_prev = false;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: for (int i = 0; i < 2; i++) { buffer_out[i] = buffer_in[i]; } The right code snippet is: for (int i = 0; i < 4; i++) { buffer_out[i] = buffer_in[i]; }
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: for (int i = 0; i < 4; i++) { buffer_out[i] = buffer_in[i]; }
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: for (int i = 0; i < 2; i++) { buffer_out[i] = buffer_in[i]; } The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: for (int i = 0; i < 2; i++) { buffer_out[i] = buffer_in[i]; } The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: for (int i = 0; i < 4; i++) { buffer_out[i] = buffer_in[i]; }
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=buffer_in block factor=2 dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=buffer_in cyclic factor=2 dim=1
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=buffer_in cyclic factor=2 dim=1
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=buffer_in block 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: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=buffer_in block factor=2 dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=buffer_in cyclic factor=2 dim=1
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=buffer_in cyclic factor=3 dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=buffer_in 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: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=buffer_in 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: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=buffer_in 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: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=buffer_in 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=buffer_in 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: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=buffer_in cyclic factor=2 dim=2 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=buffer_in cyclic factor=2 dim=1
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=buffer_in cyclic factor=2 dim=1
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=buffer_in cyclic factor=2 dim=2 The high-level-synthesis bug type of the code is: 'DID'
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=buffer_in 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=buffer_in cyclic factor=2 dim=1
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: #pragma HLS DATAFLOW pipeline II=2 The right code snippet is: #pragma HLS DATAFLOW
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: #pragma HLS DATAFLOW
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: #pragma HLS DATAFLOW pipeline II=2 The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: #pragma HLS DATAFLOW pipeline II=2 The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: #pragma HLS DATAFLOW
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=signal bundle=CTRL_BUS #pragma HLS INTERFACE m_axi port=period bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=count bundle=CTRL_BUS ...
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=signal bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=period bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=count bundle=CTRL_BUS
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=signal bundle=CTRL_BUS #pragma HLS INTERFACE m_axi port=period bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=count bundle=CTRL_BUS ...
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=signal bundle=CTRL_BUS #pragma HLS INTERFACE m_axi port=period bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=count bundle=CTRL_BUS ...
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=signal bundle=CTRL_BUS #pragma HLS INTERFACE m_axi port=period bundle=CTRL_BUS #pragma HLS INTERFACE m_axi port=count bundle=CTRL_BUS T...
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=signal bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=period bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=count bundle=CTRL_BUS
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=signal bundle=CTRL_BUS #pragma HLS INTERFACE m_axi port=period bundle=CTRL_BUS #pragma HLS INTERFACE m_axi port=count bundle=CTRL_BUS T...
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=signal bundle=CTRL_BUS #pragma HLS INTERFACE m_axi port=period bundle=CTRL_BUS #pragma HLS INTERFACE m_axi port=count bundle=CTRL_BUS T...
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS #pragma HLS INTERFACE bram port=signal The right code snippet is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BU...
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=signal bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=period bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=count bundle=CTRL_BUS
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS #pragma HLS INTERFACE bram port=signal The high-level-synthesis bug type of the code is: 'SMA'
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS #pragma HLS INTERFACE bram port=signal The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS INTERFACE ap_ctrl_none port=re...
'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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: if (address_a[9] == 1) { q_a = address_a(3,0) + 1; } else { q_a = address_a(3,0) + 2; } The right code snippet is: if (address_a[8] == 1) { q_a = address_a(3,0) + 1; } else { q_a = address_a(3,0) + 2; }
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The right code snippet is: if (address_a[8] == 1) { q_a = address_a(3,0) + 1; } else { q_a = address_a(3,0) + 2; }
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_non...
The wrong part of the code is: if (address_a[9] == 1) { q_a = address_a(3,0) + 1; } else { q_a = address_a(3,0) + 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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { ...
The wrong part of the code is: if (address_a[9] == 1) { q_a = address_a(3,0) + 1; } else { q_a = address_a(3,0) + 2; } The high-level-synthesis bug type of the code is: OOB The right code snippet is: if (address_a[8] == 1) { q_a = address_a(3,0) + 1; } else { q_a = address_a(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: #include <ap_int.h> void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4> q_a, q_b;) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: ap_uint<4> q_a, q_b; The right code snippet is: ap_uint<4>& q_a, ap_uint<4>& q_b
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4> q_a, q_b;) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HL...
The right code snippet is: ap_uint<4>& q_a, ap_uint<4>& q_b
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4> q_a, q_b;) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: ap_uint<4> q_a, q_b; The high-level-synthesis bug type of the code is: INIT
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4> q_a, q_b;) { #pragma ...
The wrong part of the code is: ap_uint<4> q_a, q_b; The high-level-synthesis bug type of the code is: INIT The right code snippet is: ap_uint<4>& q_a, ap_uint<4>& q_b
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: if (address_a[8] == 1) { q_a = address_a(3,0) << 10; } else { q_a = address_a(3,0) + 2; } The right code snippet is: if (address_a[8] == 1) { q_a = address_a(3,0) + 1; } else { q_a = address_a(3,0) + 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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The right code snippet is: if (address_a[8] == 1) { q_a = address_a(3,0) + 1; } else { q_a = address_a(3,0) + 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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_non...
The wrong part of the code is: if (address_a[8] == 1) { q_a = address_a(3,0) << 10; } else { q_a = address_a(3,0) + 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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { ...
The wrong part of the code is: if (address_a[8] == 1) { q_a = address_a(3,0) << 10; } else { q_a = address_a(3,0) + 2; } The high-level-synthesis bug type of the code is: SHFT The right code snippet is: if (address_a[8] == 1) { q_a = address_a(3,0) + 1; } else { q_a = address_a(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: #include <ap_int.h> void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: while(1); The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_non...
The wrong part of the code is: while(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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { ...
The wrong part of the code is: while(1); The high-level-synthesis bug type of the code is: INF The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, int clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: int clock The right code snippet is: bool clock
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, int clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The right code snippet is: bool clock
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, int clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: int clock 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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, int clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { ...
The wrong part of the code is: int clock The high-level-synthesis bug type of the code is: USE The right code snippet is: bool clock
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: for (int i = 0; i < 10; i++) { if (address_a[8] == 1) { q_a = address_a(3,0) + 1; } else { q_a = address_a(3,0) + 2; } if (address_b[8] == 1) { q_b = address_b(3,0) + 1; } else { q_b = address_b(3,0) + 2; } } The right ...
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_non...
The wrong part of the code is: for (int i = 0; i < 10; i++) { if (address_a[8] == 1) { q_a = address_a(3,0) + 1; } else { q_a = address_a(3,0) + 2; } if (address_b[8] == 1) { q_b = address_b(3,0) + 1; } else { q_b = address_b(3,0) + 2; } } The high-l...
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { ...
The wrong part of the code is: for (int i = 0; i < 10; i++) { if (address_a[8] == 1) { q_a = address_a(3,0) + 1; } else { q_a = address_a(3,0) + 2; } if (address_b[8] == 1) { q_b = address_b(3,0) + 1; } else { q_b = address_b(3,0) + 2; } } The high-l...
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: ap_uint<4> q_a = 0; ap_uint<4> q_b = 0; The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_non...
The wrong part of the code is: ap_uint<4> q_a = 0; ap_uint<4> q_b = 0; The high-level-synthesis bug type of the code is: ZERO
ZERO
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { ...
The wrong part of the code is: ap_uint<4> q_a = 0; ap_uint<4> q_b = 0; The high-level-synthesis bug type of the code is: ZERO The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: memcpy(q_a, q_b, sizeof(q_a)); The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_non...
The wrong part of the code is: memcpy(q_a, q_b, sizeof(q_a)); 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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { ...
The wrong part of the code is: memcpy(q_a, q_b, sizeof(q_a)); The high-level-synthesis bug type of the code is: BUF The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS array_partition variable=q_a cyclic factor=2 dim=1 The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_non...
The wrong part of the code is: #pragma HLS array_partition variable=q_a 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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { ...
The wrong part of the code is: #pragma HLS array_partition variable=q_a cyclic factor=2 dim=1 The high-level-synthesis bug type of the code is: APT The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS array_partition variable=q_a cyclic factor=3 dim=1 The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_non...
The wrong part of the code is: #pragma HLS array_partition variable=q_a 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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { ...
The wrong part of the code is: #pragma HLS array_partition variable=q_a cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: FND The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS array_partition variable=q_a cyclic factor=2 dim=2 The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_non...
The wrong part of the code is: #pragma HLS array_partition variable=q_a 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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { ...
The wrong part of the code is: #pragma HLS array_partition variable=q_a cyclic factor=2 dim=2 The high-level-synthesis bug type of the code is: DID The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS dataflow The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_non...
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { ...
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: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS interface s_axilite port=q_a bundle=control The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_non...
The wrong part of the code is: #pragma HLS interface s_axilite port=q_a bundle=control 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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { ...
The wrong part of the code is: #pragma HLS interface s_axilite port=q_a bundle=control The high-level-synthesis bug type of the code is: IDAP The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS interface m_axi port=q_a offset=slave bundle=gmem The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The right code snippet is: None
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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { #pragma HLS INTERFACE ap_ctrl_non...
The wrong part of the code is: #pragma HLS interface m_axi port=q_a offset=slave bundle=gmem 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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) { ...
The wrong part of the code is: #pragma HLS interface m_axi port=q_a offset=slave bundle=gmem The high-level-synthesis bug type of the code is: RAMB The right code snippet is: None
RAMB