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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: gain_t gain_value = 0; // variable initialized to zero instead of nonzero initializer The right code snippet is: gain_t gain_value;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: gain_t gain_value;
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: gain_t gain_value = 0; // variable initialized to zero instead of nonzero initializer 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: gain_t gain_value = 0; // variable initialized to zero instead of nonzero initializer The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: gain_t gain_value;
'ZERO'
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 translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: // copy from the wrong half of a split buffer output_signal.data = input_signal.data + 32; The right code snippet is: // no buffer splitting
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: // no buffer splitting
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: // copy from the wrong half of a split buffer output_signal.data = input_signal.data + 32; 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: // copy from the wrong half of a split buffer output_signal.data = input_signal.data + 32; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: // no buffer splitting
'BUF'
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 translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: #pragma HLS array_partition variable=adjusted_signal block factor=8 dim=1 // incorrect partition type The right code snippet is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=8 dim=1
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=8 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: #pragma HLS array_partition variable=adjusted_signal block factor=8 dim=1 // incorrect partition type 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: #pragma HLS array_partition variable=adjusted_signal block factor=8 dim=1 // incorrect partition type The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=8 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=9 dim=1 // factor not divisible The right code snippet is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=8 dim=1
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=8 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=9 dim=1 // factor not divisible 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=9 dim=1 // factor not divisible The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=8 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=8 dim=2 // incorrect dimension The right code snippet is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=8 dim=1
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=8 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=8 dim=2 // incorrect dimension 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=8 dim=2 // incorrect dimension The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=adjusted_signal cyclic factor=8 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: #pragma HLS dataflow off // dataflow position error 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: #pragma HLS dataflow off // dataflow position error 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: #pragma HLS dataflow off // dataflow position error 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis depth=1 port=output_signal #pragma HLS interface axis depth=1 port=input_signal #pragma HLS interface m_axi port=control_signal // incorrect data access pattern The right code snippet is: #pragma HL...
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis depth=1 port=output_signal #pragma HLS interface axis depth=1 port=input_signal #pragma HLS interface s_axilite port=control_signal
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis depth=1 port=output_signal #pragma HLS interface axis depth=1 port=input_signal #pragma HLS interface m_axi port=control_signal // incorrect data access pattern The high-level-synthesis bug type of the ...
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis depth=1 port=output_signal #pragma HLS interface axis depth=1 port=input_signal #pragma HLS interface m_axi port=control_signal // incorrect data access pattern The high-level-synthesis bug type of the ...
'IDAP'
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 translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis depth=1 port=output_signal #pragma HLS interface axis depth=1 port=input_signal #pragma HLS interface m_axi port=output_signal // m_axi interface is accessed randomly in the code The right code snippet ...
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis depth=1 port=output_signal #pragma HLS interface axis depth=1 port=input_signal #pragma HLS interface s_axilite port=control_signal
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis depth=1 port=output_signal #pragma HLS interface axis depth=1 port=input_signal #pragma HLS interface m_axi port=output_signal // m_axi interface is accessed randomly in the code The high-level-synthesi...
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis depth=1 port=output_signal #pragma HLS interface axis depth=1 port=input_signal #pragma HLS interface m_axi port=output_signal // m_axi interface is accessed randomly in the code The high-level-synthesi...
'RAMB'
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 translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface ap_memory depth=1 port=output_signal // scalar values mapped to array interfaces The right code snippet is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis depth=1 port=output_s...
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis depth=1 port=output_signal #pragma HLS interface axis depth=1 port=input_signal #pragma HLS interface s_axilite port=control_signal
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface ap_memory depth=1 port=output_signal // scalar values mapped to array interfaces 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface ap_memory depth=1 port=output_signal // scalar values mapped to array interfaces The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_ctrl_none ...
'SMA'
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 translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface ap_vld port=input_signal // array value The right code snippet is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis depth=1 port=output_signal #pragma HLS interface axis depth=1 ...
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis depth=1 port=output_signal #pragma HLS interface axis depth=1 port=input_signal #pragma HLS interface s_axilite port=control_signal
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface ap_vld port=input_signal // array value 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface ap_vld port=input_signal // array value The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis de...
'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 data_extract(ap_uint<32> data_in, ap_uint<1> reset, ap_uint<16> &data_out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ...
The wrong part of the code is: int a; data_out = a; Bug_type: USE The right code snippet is: data_out = 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> void data_extract(ap_uint<32> data_in, ap_uint<1> reset, ap_uint<16> &data_out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_no...
The right code snippet is: data_out = 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> void data_extract(ap_uint<32> data_in, ap_uint<1> reset, ap_uint<16> &data_out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS...
The wrong part of the code is: int a; data_out = a; Bug_type: USE 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 data_extract(ap_uint<32> data_in, ap_uint<1> reset, ap_uint<16> &data_out) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: int a; data_out = a; Bug_type: USE The high-level-synthesis bug type of the code is: INIT The right code snippet is: data_out = 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: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundl...
The wrong part of the code is: shift_reg <= {shift_reg[2:0], uninitialized_variable}; The right code snippet is: shift_reg <= {shift_reg[2:0], data(sel)};
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundle=CTR...
The right code snippet is: shift_reg <= {shift_reg[2:0], data(sel)};
'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 translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: shift_reg <= {shift_reg[2:0], uninitialized_variable}; 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 translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=dat...
The wrong part of the code is: shift_reg <= {shift_reg[2:0], uninitialized_variable}; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: shift_reg <= {shift_reg[2:0], data(sel)};
'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 translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundl...
The wrong part of the code is: Q <= shift_reg[4:1]; The right code snippet is: Q <= shift_reg[3:0];
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundle=CTR...
The right code snippet is: Q <= shift_reg[3:0];
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: Q <= shift_reg[4:1]; 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 translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=dat...
The wrong part of the code is: Q <= shift_reg[4:1]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: Q <= shift_reg[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: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundl...
The wrong part of the code is: Q <= shift_reg[1:-1] ^ shift_reg[3]; The right code snippet is: Q <= shift_reg[1:0] ^ shift_reg[3];
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundle=CTR...
The right code snippet is: Q <= shift_reg[1:0] ^ shift_reg[3];
'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 translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: Q <= shift_reg[1:-1] ^ shift_reg[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: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=dat...
The wrong part of the code is: Q <= shift_reg[1:-1] ^ shift_reg[3]; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: Q <= shift_reg[1:0] ^ shift_reg[3];
'SHFT'
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 translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundl...
The wrong part of the code is: state <= 2'b00; The right code snippet is: state <= 2'b01;
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundle=CTR...
The right code snippet is: state <= 2'b01;
'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: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: state <= 2'b00; 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: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=dat...
The wrong part of the code is: state <= 2'b00; The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: state <= 2'b01;
'INF'
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 translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundl...
The wrong part of the code is: shift_reg <= {shift_reg[2:0], $signed(data(sel))}; The right code snippet is: shift_reg <= {shift_reg[2:0], data(sel)};
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundle=CTR...
The right code snippet is: shift_reg <= {shift_reg[2:0], data(sel)};
'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: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: shift_reg <= {shift_reg[2:0], $signed(data(sel))}; 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: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=dat...
The wrong part of the code is: shift_reg <= {shift_reg[2:0], $signed(data(sel))}; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: shift_reg <= {shift_reg[2:0], data(sel)};
'USE'
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 translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundl...
The wrong part of the code is: always @(negedge clk or posedge rst_n) begin The right code snippet is: always @(posedge clk or negedge rst_n) begin
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundle=CTR...
The right code snippet is: always @(posedge clk or negedge rst_n) begin
'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: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: always @(negedge clk or posedge rst_n) begin 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: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=dat...
The wrong part of the code is: always @(negedge clk or posedge rst_n) begin The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: always @(posedge clk or negedge rst_n) begin
'DFP'
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 translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundl...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=mem depth=1024 offset=random The right code snippet is: #pragma HLS INTERFACE m_axi port=mem depth=1024 offset=direct
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundle=CTR...
The right code snippet is: #pragma HLS INTERFACE m_axi port=mem depth=1024 offset=direct
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=mem depth=1024 offset=random The high-level-synthesis bug type of the code is: 'RAMB'
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=dat...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=mem depth=1024 offset=random The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS INTERFACE m_axi port=mem depth=1024 offset=direct
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundl...
The wrong part of the code is: case (state) 2'b00: begin Q <= shift_reg[3:0]; state <= 2'b10; end The right code snippet is: case (state) 2'b00: begin Q <= shift_reg[3:0]; state <= 2'b01; end
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite port=sel bundle=CTR...
The right code snippet is: case (state) 2'b00: begin Q <= shift_reg[3:0]; state <= 2'b01; end
'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: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=data #pragma HLS INTERFACE s_axilite por...
The wrong part of the code is: case (state) 2'b00: begin Q <= shift_reg[3:0]; state <= 2'b10; end 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: HLS code translation: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE axis port=dat...
The wrong part of the code is: case (state) 2'b00: begin Q <= shift_reg[3:0]; state <= 2'b10; end The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: case (state) 2'b00: begin Q <= shift_reg[3:0]; state <= 2'b01; end
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GREEN = 3'b101...
The wrong part of the code is: if (hor_pos == H_FRONT + 1) { h_sync_reg = true; } The right code snippet is: if (hor_pos == H_FRONT - 1) { h_sync_reg = true; }
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GREEN = 3'b101; con...
The right code snippet is: if (hor_pos == H_FRONT - 1) { h_sync_reg = true; }
'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: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GRE...
The wrong part of the code is: if (hor_pos == H_FRONT + 1) { h_sync_reg = true; } 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: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3...
The wrong part of the code is: if (hor_pos == H_FRONT + 1) { h_sync_reg = true; } The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: if (hor_pos == H_FRONT - 1) { h_sync_reg = true; }
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GREEN = 3'b101...
The wrong part of the code is: bool h_sync_reg; bool v_sync_reg; The right code snippet is: bool h_sync_reg = h_sync; bool v_sync_reg = v_sync;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GREEN = 3'b101; con...
The right code snippet is: bool h_sync_reg = h_sync; bool v_sync_reg = v_sync;
'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: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GRE...
The wrong part of the code is: bool h_sync_reg; bool v_sync_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: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3...
The wrong part of the code is: bool h_sync_reg; bool v_sync_reg; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: bool h_sync_reg = h_sync; bool v_sync_reg = v_sync;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GREEN = 3'b101...
The wrong part of the code is: R = hor_pos(8, 0); G = ver_pos(8, 0); B = hor_pos(8, 0); The right code snippet is: R = hor_pos(7, 0); G = ver_pos(7, 0); B = hor_pos(7, 0);
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GREEN = 3'b101; con...
The right code snippet is: R = hor_pos(7, 0); G = ver_pos(7, 0); B = hor_pos(7, 0);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GRE...
The wrong part of the code is: R = hor_pos(8, 0); G = ver_pos(8, 0); B = hor_pos(8, 0); The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3...
The wrong part of the code is: R = hor_pos(8, 0); G = ver_pos(8, 0); B = hor_pos(8, 0); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: R = hor_pos(7, 0); G = ver_pos(7, 0); B = hor_pos(7, 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: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GREEN = 3'b101...
The wrong part of the code is: if (hor_pos < H_TOTAL) { hor_pos--; } else { hor_pos = 0; } The right code snippet is: if (hor_pos < H_TOTAL) { hor_pos++; } else { hor_pos = 0; }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GREEN = 3'b101; con...
The right code snippet is: if (hor_pos < H_TOTAL) { hor_pos++; } else { hor_pos = 0; }
'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: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GRE...
The wrong part of the code is: if (hor_pos < H_TOTAL) { hor_pos--; } else { hor_pos = 0; } 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: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3...
The wrong part of the code is: if (hor_pos < H_TOTAL) { hor_pos--; } else { hor_pos = 0; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (hor_pos < H_TOTAL) { hor_pos++; } else { hor_pos = 0; }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GREEN = 3'b101...
The wrong part of the code is: ap_int<3> color; The right code snippet is: ap_uint<3> color;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GREEN = 3'b101; con...
The right code snippet is: ap_uint<3> color;
'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: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GRE...
The wrong part of the code is: ap_int<3> color; 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: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3...
The wrong part of the code is: ap_int<3> color; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<3> color;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GREEN = 3'b101...
The wrong part of the code is: ap_uint<8> R; ap_uint<8> G; ap_uint<8> B; The right code snippet is: ap_uint<8> R = 0; ap_uint<8> G = 0; ap_uint<8> B = 0;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GREEN = 3'b101; con...
The right code snippet is: ap_uint<8> R = 0; ap_uint<8> G = 0; ap_uint<8> B = 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: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3> BLUE = 3'b011; const ap_uint<3> GRE...
The wrong part of the code is: ap_uint<8> R; ap_uint<8> G; ap_uint<8> B; 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: The HLS translation of the given Verilog code is as follows: ```c++ #include <ap_int.h> const ap_uint<3> BLACK = 3'b000; const ap_uint<3...
The wrong part of the code is: ap_uint<8> R; ap_uint<8> G; ap_uint<8> B; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_uint<8> R = 0; ap_uint<8> G = 0; ap_uint<8> B = 0;
'ZERO'