instruction
stringlengths
139
357k
response
stringlengths
36
4.54k
buggy_type
stringclasses
745 values
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS I...
The wrong part of the code is: bb[0] <= -1 * (bb[16] ^ bb[13]); The right code snippet is: bb[0] <= ~(bb[16] ^ bb[13]);
USE
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS INTERF...
The right code snippet is: bb[0] <= ~(bb[16] ^ bb[13]);
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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #p...
The wrong part of the code is: bb[0] <= -1 * (bb[16] ^ bb[13]); 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma...
The wrong part of the code is: bb[0] <= -1 * (bb[16] ^ bb[13]); The high-level-synthesis bug type of the code is: USE The right code snippet is: bb[0] <= ~(bb[16] ^ bb[13]);
USE
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS I...
The wrong part of the code is: if (base) { bb[16:1] <= bb[15:0]; bb[1] <= ~(bb[17] ^ bb[14]); bb[0] <= ~(bb[16] ^ bb[13]); } The right code snippet is: if (base) { bb[16:1] <= bb[15:0]; bb[0] <= ~(bb[16] ^ bb[13]); }
MLU
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS INTERF...
The right code snippet is: if (base) { bb[16:1] <= bb[15:0]; bb[0] <= ~(bb[16] ^ bb[13]); }
MLU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #p...
The wrong part of the code is: if (base) { bb[16:1] <= bb[15:0]; bb[1] <= ~(bb[17] ^ bb[14]); bb[0] <= ~(bb[16] ^ bb[13]); } The high-level-synthesis bug type of the code is: MLU
MLU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma...
The wrong part of the code is: if (base) { bb[16:1] <= bb[15:0]; bb[1] <= ~(bb[17] ^ bb[14]); bb[0] <= ~(bb[16] ^ bb[13]); } The high-level-synthesis bug type of the code is: MLU The right code snippet is: if (base) { bb[16:1] <= bb[15:0]; bb[0] <= ~(bb[16] ^ bb[13]); }
MLU
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS I...
The wrong part of the code is: reg [16:0] bb = 0; The right code snippet is: reg [16:0] bb;
ZERO
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS INTERF...
The right code snippet is: reg [16:0] bb;
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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #p...
The wrong part of the code is: reg [16:0] bb = 0; The high-level-synthesis bug type of the code is: ZERO
ZERO
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma...
The wrong part of the code is: reg [16:0] bb = 0; The high-level-synthesis bug type of the code is: ZERO The right code snippet is: reg [16:0] bb;
ZERO
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS I...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=bb complete dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=4 dim=1
APT
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS INTERF...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=4 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #p...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=bb complete dim=1 The high-level-synthesis bug type of the code is: APT
APT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=bb complete dim=1 The high-level-synthesis bug type of the code is: APT The right code snippet is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=4 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS I...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=3 dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=4 dim=1
FND
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS INTERF...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=4 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #p...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: FND
FND
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: FND The right code snippet is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=4 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS I...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=4 dim=2 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=4 dim=1
DID
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS INTERF...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=4 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #p...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=4 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=4 dim=2 The high-level-synthesis bug type of the code is: DID The right code snippet is: #pragma HLS ARRAY_PARTITION variable=bb cyclic factor=4 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS I...
The wrong part of the code is: #pragma HLS dataflow loop_flatten The right code snippet is: #pragma HLS dataflow
DFP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS INTERF...
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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #p...
The wrong part of the code is: #pragma HLS dataflow loop_flatten The high-level-synthesis bug type of the code is: DFP
DFP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma...
The wrong part of the code is: #pragma HLS dataflow loop_flatten The high-level-synthesis bug type of the code is: DFP The right code snippet is: #pragma HLS dataflow
DFP
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS I...
The wrong part of the code is: #pragma HLS INTERFACE s_axilite port=out The right code snippet is: #pragma HLS INTERFACE ap_none port=out
IDAP
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS INTERF...
The right code snippet is: #pragma HLS INTERFACE ap_none port=out
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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #p...
The wrong part of the code is: #pragma HLS INTERFACE s_axilite port=out 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma...
The wrong part of the code is: #pragma HLS INTERFACE s_axilite port=out The high-level-synthesis bug type of the code is: IDAP The right code snippet is: #pragma HLS INTERFACE ap_none port=out
IDAP
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS I...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=out The right code snippet is: #pragma HLS INTERFACE ap_none port=out
RAMB
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS INTERF...
The right code snippet is: #pragma HLS INTERFACE ap_none port=out
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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #p...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=out 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=out The high-level-synthesis bug type of the code is: RAMB The right code snippet is: #pragma HLS INTERFACE ap_none port=out
RAMB
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS I...
The wrong part of the code is: #pragma HLS INTERFACE bram port=out The right code snippet is: #pragma HLS INTERFACE ap_none port=out
SMA
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS INTERF...
The right code snippet is: #pragma HLS INTERFACE ap_none port=out
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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #p...
The wrong part of the code is: #pragma HLS INTERFACE bram port=out 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma...
The wrong part of the code is: #pragma HLS INTERFACE bram port=out The high-level-synthesis bug type of the code is: SMA The right code snippet is: #pragma HLS INTERFACE ap_none port=out
SMA
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS I...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=out The right code snippet is: #pragma HLS INTERFACE ap_none port=out
AMS
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS INTERF...
The right code snippet is: #pragma HLS INTERFACE ap_none port=out
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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #p...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=out 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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=out The high-level-synthesis bug type of the code is: AMS The right code snippet is: #pragma HLS INTERFACE ap_none port=out
AMS
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS I...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline II=1
MLP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS INTERF...
The right code snippet is: #pragma HLS pipeline II=1
MLP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #p...
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: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: MLP The right code snippet is: #pragma HLS pipeline II=1
MLP
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS I...
The wrong part of the code is: #pragma HLS unroll factor=3 The right code snippet is: #pragma HLS unroll factor=4
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #pragma HLS INTERF...
The right code snippet is: #pragma HLS unroll factor=4
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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma HLS INTERFACE s_axilite port=base #p...
The wrong part of the code is: #pragma HLS unroll factor=3 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_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=rst #pragma HLS INTERFACE s_axilite port=clk #pragma...
The wrong part of the code is: #pragma HLS unroll factor=3 The high-level-synthesis bug type of the code is: ILNU The right code snippet is: #pragma HLS unroll factor=4
ILNU
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=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE ap_none port=ENCLK void clock_gate(bool CLK, b...
The wrong part of the code is: int E = EN; The right code snippet is: bool E = EN;
'USE'
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=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE ap_none port=ENCLK void clock_gate(bool CLK, bool E...
The right code snippet is: bool E = EN;
'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: #pragma HLS INTERFACE ap_none port=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE ap_none port=ENCLK void clock_gate(...
The wrong part of the code is: int E = EN; 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: #pragma HLS INTERFACE ap_none port=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE...
The wrong part of the code is: int E = EN; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: bool E = EN;
'USE'
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=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE ap_none port=ENCLK void clock_gate(bool CLK, b...
The wrong part of the code is: #pragma HLS UNROLL factor=2 The right code snippet is: #pragma HLS PIPELINE II=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=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE ap_none port=ENCLK void clock_gate(bool CLK, bool E...
The right code snippet is: #pragma HLS PIPELINE II=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=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE ap_none port=ENCLK void clock_gate(...
The wrong part of the code is: #pragma HLS UNROLL factor=2 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=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS UNROLL factor=2 The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: #pragma HLS PIPELINE II=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: #pragma HLS INTERFACE ap_none port=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE ap_none port=ENCLK void clock_gate(bool CLK, b...
The wrong part of the code is: while(1){ TLATNTSCAX2TS_latch(E, SE, CK, ENCLK); } The right code snippet is: TLATNTSCAX2TS_latch(E, SE, CK, ENCLK);
'INF'
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=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE ap_none port=ENCLK void clock_gate(bool CLK, bool E...
The right code snippet is: TLATNTSCAX2TS_latch(E, SE, CK, ENCLK);
'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: #pragma HLS INTERFACE ap_none port=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE ap_none port=ENCLK void clock_gate(...
The wrong part of the code is: while(1){ TLATNTSCAX2TS_latch(E, SE, CK, ENCLK); } 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: #pragma HLS INTERFACE ap_none port=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE...
The wrong part of the code is: while(1){ TLATNTSCAX2TS_latch(E, SE, CK, ENCLK); } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: TLATNTSCAX2TS_latch(E, SE, CK, ENCLK);
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE a...
The wrong part of the code is: Q_reg = D[10]; Q_N_reg = ~D[5]; The right code snippet is: Q_reg = D; Q_N_reg = ~D;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis p...
The right code snippet is: Q_reg = D; Q_N_reg = ~D;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The wrong part of the code is: Q_reg = D[10]; Q_N_reg = ~D[5]; The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_c...
The wrong part of the code is: Q_reg = D[10]; Q_N_reg = ~D[5]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: Q_reg = D; Q_N_reg = ~D;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE a...
The wrong part of the code is: static bool Q_reg; static bool Q_N_reg; The right code snippet is: static bool Q_reg = 0; static bool Q_N_reg = 1;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis p...
The right code snippet is: static bool Q_reg = 0; static bool Q_N_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: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The wrong part of the code is: static bool Q_reg; static bool Q_N_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: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_c...
The wrong part of the code is: static bool Q_reg; static bool Q_N_reg; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static bool Q_reg = 0; static bool Q_N_reg = 1;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE a...
The wrong part of the code is: Q_N_reg = D << 10; The right code snippet is: Q_N_reg = ~D;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis p...
The right code snippet is: Q_N_reg = ~D;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The wrong part of the code is: Q_N_reg = D << 10; The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_c...
The wrong part of the code is: Q_N_reg = D << 10; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: Q_N_reg = ~D;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE a...
The wrong part of the code is: while(true); The right code snippet is: // None
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis p...
The right code snippet is: // None
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The wrong part of the code is: while(true); The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_c...
The wrong part of the code is: while(true); The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: // None
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE a...
The wrong part of the code is: int16_t D_signed = D; Q_reg = D_signed; The right code snippet is: // None
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis p...
The right code snippet is: // None
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The wrong part of the code is: int16_t D_signed = D; Q_reg = D_signed; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_c...
The wrong part of the code is: int16_t D_signed = D; Q_reg = D_signed; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: // None
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE a...
The wrong part of the code is: for(int i = 0; i < 10; i++){ Q_reg = D; Q_N_reg = ~D; } The right code snippet is: // None
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis p...
The right code snippet is: // None
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The wrong part of the code is: for(int i = 0; i < 10; i++){ Q_reg = D; Q_N_reg = ~D; } The high-level-synthesis bug type of the code is: 'MLU'
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_c...
The wrong part of the code is: for(int i = 0; i < 10; i++){ Q_reg = D; Q_N_reg = ~D; } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: // None
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE a...
The wrong part of the code is: static bool Q_reg; static bool Q_N_reg; The right code snippet is: static bool Q_reg = 0; static bool Q_N_reg = 1;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis p...
The right code snippet is: static bool Q_reg = 0; static bool Q_N_reg = 1;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The wrong part of the code is: static bool Q_reg; static bool Q_N_reg; The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_c...
The wrong part of the code is: static bool Q_reg; static bool Q_N_reg; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static bool Q_reg = 0; static bool Q_N_reg = 1;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE a...
The wrong part of the code is: memcpy(Q, D, sizeof(D)); The right code snippet is: // None
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis p...
The right code snippet is: // None
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The wrong part of the code is: memcpy(Q, D, sizeof(D)); The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_c...
The wrong part of the code is: memcpy(Q, D, sizeof(D)); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: // None
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=D cyclic factor=10 The right code snippet is: // None
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis p...
The right code snippet is: // None
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The wrong part of the code is: #pragma HLS array_partition variable=D cyclic factor=10 The high-level-synthesis bug type of the code is: 'APT'
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void flip_flop( bool D, bool CLK, bool SET, bool RESET, bool &Q, bool &Q_N ) { #pragma HLS INTERFACE ap_c...
The wrong part of the code is: #pragma HLS array_partition variable=D cyclic factor=10 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: // None
'APT'