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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: ap_int<16> ID; The right code snippet is: ap_uint<16> ID;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The right code snippet is: ap_uint<16> ID;
'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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: ap_int<16> ID; 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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE a...
The wrong part of the code is: ap_int<16> ID; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<16> ID;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: temp0 = ID - (iddecimal4.range(15, 8) * 1000); The right code snippet is: temp0 = ID - (iddecimal4.range(15, 12) * 1000);
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The right code snippet is: temp0 = ID - (iddecimal4.range(15, 12) * 1000);
'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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: temp0 = ID - (iddecimal4.range(15, 8) * 1000); 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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE a...
The wrong part of the code is: temp0 = ID - (iddecimal4.range(15, 8) * 1000); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: temp0 = ID - (iddecimal4.range(15, 12) * 1000);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=digits45 The right code snippet is: #pragma HLS INTERFACE ap_none port=digits45
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The right code snippet is: #pragma HLS INTERFACE ap_none port=digits45
'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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=digits45 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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=digits45 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS INTERFACE ap_none port=digits45
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: iddecimal4.range(15, 12) = 1; The right code snippet is: No suitable code snippet found.
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The right code snippet is: No suitable code snippet found.
'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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: iddecimal4.range(15, 12) = 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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE a...
The wrong part of the code is: iddecimal4.range(15, 12) = 1; The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: No suitable code snippet found.
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=iddecimal4 complete dim=2 The right code snippet is: No suitable code snippet found.
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The right code snippet is: No suitable code snippet found.
'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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=iddecimal4 complete dim=2 The high-level-synthesis bug type of the code is: 'DID'
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=iddecimal4 complete dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: No suitable code snippet found.
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS DATAFLOW The right code snippet is: No suitable code snippet found.
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The right code snippet is: No suitable code snippet found.
'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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE a...
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: No suitable code snippet found.
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=iddecimal4 The right code snippet is: No suitable code snippet found.
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The right code snippet is: No suitable code snippet found.
'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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=iddecimal4 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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=iddecimal4 The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: No suitable code snippet found.
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=digits45 random The right code snippet is: No suitable code snippet found.
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The right code snippet is: No suitable code snippet found.
'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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=digits45 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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=digits45 random The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: No suitable code snippet found.
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS INTERFACE axis port=iddecimal4 The right code snippet is: No suitable code snippet found.
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The right code snippet is: No suitable code snippet found.
'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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #pragma HLS INTERFACE axis port=iddecimal4 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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS INTERFACE axis port=iddecimal4 The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: No suitable code snippet found.
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=iddecimal4 The right code snippet is: No suitable code snippet found.
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The right code snippet is: No suitable code snippet found.
'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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=iddecimal4 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: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=iddecimal4 The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: No suitable code snippet found.
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS PIPELINE II=2 The right code snippet is: No suitable code snippet found.
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The right code snippet is: No suitable code snippet found.
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #pragma HLS PIPELINE II=2 The high-level-synthesis bug type of the code is: 'MLP'
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS PIPELINE II=2 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: No suitable code snippet found.
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,d #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=min,q,final_output void min_shift_register(int a, in...
The wrong part of the code is: static int shift_reg[3]; shift_reg[0] = din; shift_reg[1] = shift_reg[2]; shift_reg[2] = shift_reg[1]; The right code snippet is: static int shift_reg[3]; shift_reg[0] = din; shift_reg[1] = shift_reg[0]; shift_reg[2] = shift_reg[1];
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,d #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=min,q,final_output void min_shift_register(int a, int b, ...
The right code snippet is: static int shift_reg[3]; shift_reg[0] = din; shift_reg[1] = shift_reg[0]; shift_reg[2] = shift_reg[1];
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,d #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=min,q,final_output void min_shift_registe...
The wrong part of the code is: static int shift_reg[3]; shift_reg[0] = din; shift_reg[1] = shift_reg[2]; shift_reg[2] = shift_reg[1]; The high-level-synthesis bug type of the code is: INIT
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,d #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=min,q...
The wrong part of the code is: static int shift_reg[3]; shift_reg[0] = din; shift_reg[1] = shift_reg[2]; shift_reg[2] = shift_reg[1]; The high-level-synthesis bug type of the code is: INIT The right code snippet is: static int shift_reg[3]; shift_reg[0] = din; shift_reg[1] = shift_reg[0]; shift_reg...
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,d #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=min,q,final_output void min_shift_register(int a, in...
The wrong part of the code is: // Shift register static int shift_reg[3]; shift_reg[0] = din; shift_reg[1] = shift_reg[0]; shift_reg[2] = din; The right code snippet is: // Shift register static int shift_reg[3]; shift_reg[0] = din; shift_reg[1] = shift_reg[0]; shift_reg[2] = shift_reg[1];
ILNU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,d #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=min,q,final_output void min_shift_register(int a, int b, ...
The right code snippet is: // Shift register static int shift_reg[3]; shift_reg[0] = din; shift_reg[1] = shift_reg[0]; shift_reg[2] = shift_reg[1];
ILNU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,d #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=min,q,final_output void min_shift_registe...
The wrong part of the code is: // Shift register static int shift_reg[3]; shift_reg[0] = din; shift_reg[1] = shift_reg[0]; shift_reg[2] = din; 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: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,d #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=min,q...
The wrong part of the code is: // Shift register static int shift_reg[3]; shift_reg[0] = din; shift_reg[1] = shift_reg[0]; shift_reg[2] = din; The high-level-synthesis bug type of the code is: ILNU The right code snippet is: // Shift register static int shift_reg[3]; shift_reg[0] = din; shift_reg[1...
ILNU
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint...
The wrong part of the code is: ap_uint<10> rat_out; rat_out = rat_out + 1; The right code snippet is: ap_uint<10> rat_out;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint<10> ...
The right code snippet is: ap_uint<10> rat_out;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ...
The wrong part of the code is: ap_uint<10> rat_out; rat_out = rat_out + 1; 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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pra...
The wrong part of the code is: ap_uint<10> rat_out; rat_out = rat_out + 1; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<10> rat_out;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint...
The wrong part of the code is: #pragma HLS unroll for(int i=0; i<10; i++) { RAT_xlslice_0_0(Din, rat_out); } The right code snippet is: RAT_xlslice_0_0(Din, rat_out);
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint<10> ...
The right code snippet is: RAT_xlslice_0_0(Din, rat_out);
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ...
The wrong part of the code is: #pragma HLS unroll for(int i=0; i<10; i++) { RAT_xlslice_0_0(Din, rat_out); } The high-level-synthesis bug type of the code is: 'ILNU'
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pra...
The wrong part of the code is: #pragma HLS unroll for(int i=0; i<10; i++) { RAT_xlslice_0_0(Din, rat_out); } The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: RAT_xlslice_0_0(Din, rat_out);
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint...
The wrong part of the code is: #pragma HLS array_partition variable=Din cyclic factor=3 #pragma HLS array_partition variable=Dout cyclic factor=3 The right code snippet is: #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint<10> ...
The right code snippet is: #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ...
The wrong part of the code is: #pragma HLS array_partition variable=Din cyclic factor=3 #pragma HLS array_partition variable=Dout cyclic factor=3 The high-level-synthesis bug type of the code is: 'FND'
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pra...
The wrong part of the code is: #pragma HLS array_partition variable=Din cyclic factor=3 #pragma HLS array_partition variable=Dout cyclic factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none p...
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint...
The wrong part of the code is: Dout = rat_out << 12; The right code snippet is: Dout = rat_out;
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint<10> ...
The right code snippet is: Dout = rat_out;
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ...
The wrong part of the code is: Dout = rat_out << 12; 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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pra...
The wrong part of the code is: Dout = rat_out << 12; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: Dout = rat_out;
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint...
The wrong part of the code is: while(1) {} The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint<10> ...
The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ...
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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pra...
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: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint...
The wrong part of the code is: #pragma HLS pipeline II=2 RAT_xlslice_0_0(Din, rat_out); The right code snippet is: RAT_xlslice_0_0(Din, rat_out);
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint<10> ...
The right code snippet is: RAT_xlslice_0_0(Din, rat_out);
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ...
The wrong part of the code is: #pragma HLS pipeline II=2 RAT_xlslice_0_0(Din, rat_out); The high-level-synthesis bug type of the code is: 'MLP'
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pra...
The wrong part of the code is: #pragma HLS pipeline II=2 RAT_xlslice_0_0(Din, rat_out); The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: RAT_xlslice_0_0(Din, rat_out);
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint...
The wrong part of the code is: ap_uint<10> rat_out_array[5]; rat_out = rat_out_array[6]; The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint<10> ...
The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ...
The wrong part of the code is: ap_uint<10> rat_out_array[5]; rat_out = rat_out_array[6]; 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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pra...
The wrong part of the code is: ap_uint<10> rat_out_array[5]; rat_out = rat_out_array[6]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_int<...
The wrong part of the code is: ap_int<10> rat_out_signed; rat_out_signed = rat_out; The right code snippet is: ap_uint<10> rat_out;
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_int<10> r...
The right code snippet is: ap_uint<10> rat_out;
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ...
The wrong part of the code is: ap_int<10> rat_out_signed; rat_out_signed = rat_out; 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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pra...
The wrong part of the code is: ap_int<10> rat_out_signed; rat_out_signed = rat_out; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<10> rat_out;
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint...
The wrong part of the code is: ap_uint<20> buf[10]; ap_uint<10>* buf_ptr = (ap_uint<10>*)buf; Dout = buf_ptr[1]; The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint<10> ...
The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ...
The wrong part of the code is: ap_uint<20> buf[10]; ap_uint<10>* buf_ptr = (ap_uint<10>*)buf; Dout = buf_ptr[1]; 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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pra...
The wrong part of the code is: ap_uint<20> buf[10]; ap_uint<10>* buf_ptr = (ap_uint<10>*)buf; Dout = buf_ptr[1]; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint...
The wrong part of the code is: #pragma HLS array_partition variable=Din block factor=2 The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint<10> ...
The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ...
The wrong part of the code is: #pragma HLS array_partition variable=Din block factor=2 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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pra...
The wrong part of the code is: #pragma HLS array_partition variable=Din block factor=2 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint...
The wrong part of the code is: #pragma HLS array_partition variable=Din cyclic dim=2 factor=3 The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint<10> ...
The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ...
The wrong part of the code is: #pragma HLS array_partition variable=Din cyclic dim=2 factor=3 The high-level-synthesis bug type of the code is: 'DID'
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pra...
The wrong part of the code is: #pragma HLS array_partition variable=Din cyclic dim=2 factor=3 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint...
The wrong part of the code is: #pragma HLS dataflow RAT_xlslice_0_0(Din, rat_out); Dout = rat_out; The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ap_uint<10> ...
The right code snippet is: // no suitable code snippet found
'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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pragma HLS INTERFACE ap_none port=Dout ...
The wrong part of the code is: #pragma HLS dataflow RAT_xlslice_0_0(Din, rat_out); Dout = rat_out; 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 my_design_module(ap_uint<18> Din, ap_uint<10>& Dout) { #pragma HLS INTERFACE ap_none port=Din #pra...
The wrong part of the code is: #pragma HLS dataflow RAT_xlslice_0_0(Din, rat_out); Dout = rat_out; The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: // no suitable code snippet found
'DFP'