instruction
stringlengths
139
357k
response
stringlengths
36
4.54k
buggy_type
stringclasses
745 values
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS interface ap_vld port=A The right code snippet is: #pragma HLS interface ap_none port=A
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
The right code snippet is: #pragma HLS interface ap_none port=A
'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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
The wrong part of the code is: #pragma HLS interface ap_vld port=A 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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
The wrong part of the code is: #pragma HLS interface ap_vld port=A The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_none port=A
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
The right code snippet is: #pragma HLS pipeline
'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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
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
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS unroll factor=2 The right code snippet is: #pragma HLS unroll
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
The right code snippet is: #pragma HLS unroll
'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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
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 unroll
'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=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFACE ap_none port=in4 #pragma HLS INTERFACE ap_non...
The wrong part of the code is: ap_uint<1> in1_ap, in2_ap, in3_ap, in4_ap, in5_ap, in6_ap, in7_ap; in1_ap = (ap_uint<1>)in1; in2_ap = (ap_uint<1>)in2; in3_ap = (ap_uint<1>)in3; in4_ap = (ap_uint<1>)in4; in5_ap = (ap_uint<1>)in5; in6_ap = (ap_uint<1>)in6; The right code snippet is: ap_uint<1> in1_ap, i...
'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=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFACE ap_none port=in4 #pragma HLS INTERFACE ap_none por...
The right code snippet is: ap_uint<1> in1_ap, in2_ap, in3_ap, in4_ap, in5_ap, in6_ap, in7_ap;
'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=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFACE ap_none port=in4 #pragma HLS INTER...
The wrong part of the code is: ap_uint<1> in1_ap, in2_ap, in3_ap, in4_ap, in5_ap, in6_ap, in7_ap; in1_ap = (ap_uint<1>)in1; in2_ap = (ap_uint<1>)in2; in3_ap = (ap_uint<1>)in3; in4_ap = (ap_uint<1>)in4; in5_ap = (ap_uint<1>)in5; in6_ap = (ap_uint<1>)in6; The high-level-synthesis bug type of the code is: '...
'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=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFA...
The wrong part of the code is: ap_uint<1> in1_ap, in2_ap, in3_ap, in4_ap, in5_ap, in6_ap, in7_ap; in1_ap = (ap_uint<1>)in1; in2_ap = (ap_uint<1>)in2; in3_ap = (ap_uint<1>)in3; in4_ap = (ap_uint<1>)in4; in5_ap = (ap_uint<1>)in5; in6_ap = (ap_uint<1>)in6; The high-level-synthesis bug type of the code is: '...
'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=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFACE ap_none port=in4 #pragma HLS INTERFACE ap_non...
The wrong part of the code is: out1 = (int)out1_ap; The right code snippet is: out1 = (bool)out1_ap;
'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=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFACE ap_none port=in4 #pragma HLS INTERFACE ap_none por...
The right code snippet is: out1 = (bool)out1_ap;
'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=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFACE ap_none port=in4 #pragma HLS INTER...
The wrong part of the code is: out1 = (int)out1_ap; 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=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFA...
The wrong part of the code is: out1 = (int)out1_ap; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: out1 = (bool)out1_ap;
'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_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ap_vld port=in3 #pragma HLS INTERFACE ap_vld port=in4 #pragma HLS INTERFACE ap_vld por...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ap_vld port=in3 #pragma HLS INTERFACE ap_vld port=in4 #pragma HLS INTERFACE ap_vld port=in5 #pragma HLS INTERFACE ap_vld port=in6 #pragma HLS INTERFACE ap_vld port=in7 #pragma HLS IN...
'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_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ap_vld port=in3 #pragma HLS INTERFACE ap_vld port=in4 #pragma HLS INTERFACE ap_vld port=in5...
The right code snippet is: #pragma HLS INTERFACE ap_none port=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFACE ap_none port=in4 #pragma HLS INTERFACE ap_none port=in5 #pragma HLS INTERFACE ap_none port=in6 #pragma HLS INTERFACE ap_none port=in7 #pragma HLS...
'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_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ap_vld port=in3 #pragma HLS INTERFACE ap_vld port=in4 #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ap_vld port=in3 #pragma HLS INTERFACE ap_vld port=in4 #pragma HLS INTERFACE ap_vld port=in5 #pragma HLS INTERFACE ap_vld port=in6 #pragma HLS INTERFACE ap_vld port=in7 #pragma HLS IN...
'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_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ap_vld port=in3 #pragma HLS INTERFACE ...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ap_vld port=in3 #pragma HLS INTERFACE ap_vld port=in4 #pragma HLS INTERFACE ap_vld port=in5 #pragma HLS INTERFACE ap_vld port=in6 #pragma HLS INTERFACE ap_vld port=in7 #pragma HLS IN...
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y = 1; } else if (D && !E) { Y = 1; } else if (!D && E) { Y = 1; } else { Y[1] = 0; } The right code snippet is: if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y = 1; } else...
'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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y = 1; } else if (D && !E) { Y = 1; } else if (!D && E) { Y = 1; } else { Y = 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: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y = 1; } else if (D && !E) { Y = 1; } else if (!D && E) { Y = 1; } else { Y[1] = 0; } 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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y = 1; } else if (D && !E) { Y = 1; } else if (!D && E) { Y = 1; } else { Y[1] = 0; } The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: if (A) { Y = 1; ...
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1> Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: ap_uint<1> Y The right code snippet is: ap_uint<1>& Y
'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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1> Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y = ...
The right code snippet is: ap_uint<1>& Y
'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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1> Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C...
The wrong part of the code is: ap_uint<1> Y 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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1> Y) { if (A) { Y = 1; } else if ...
The wrong part of the code is: ap_uint<1> Y The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<1>& Y
'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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: if (D && !E) { Y = 1 << 2; } else if (!D && E) { Y = 1 >> 2; } The right code snippet is: if (D && !E) { Y = 1; } else if (!D && E) { Y = 1; }
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: if (D && !E) { Y = 1; } else if (!D && E) { Y = 1; }
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: if (D && !E) { Y = 1 << 2; } else if (!D && E) { Y = 1 >> 2; } The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: if (D && !E) { Y = 1 << 2; } else if (!D && E) { Y = 1 >> 2; } The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: if (D && !E) { Y = 1; } else if (!D && E) { Y = 1; }
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
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: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
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: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
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: #include <ap_int.h> void five_to_one(signed int A, signed int B, signed int C, signed int D, signed int E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y =...
The wrong part of the code is: signed int A, signed int B, signed int C, signed int D, signed int E The right code snippet is: bool A, bool B, bool C, bool D, bool E
'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 five_to_one(signed int A, signed int B, signed int C, signed int D, signed int E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; ...
The right code snippet is: bool A, bool B, bool C, bool D, bool E
'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 five_to_one(signed int A, signed int B, signed int C, signed int D, signed int E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { ...
The wrong part of the code is: signed int A, signed int B, signed int C, signed int D, signed int E 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 five_to_one(signed int A, signed int B, signed int C, signed int D, signed int E, ap_uint<1>& Y) { if (A) ...
The wrong part of the code is: signed int A, signed int B, signed int C, signed int D, signed int E The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: bool A, bool B, bool C, bool D, bool E
'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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: for (int i = 0; i < 10; i++) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y = 1; } else if (D && !E) { Y = 1; } else if (!D && E) { Y = 1; } else { Y = 0; } } The right code snippet is: ...
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: for (int i = 0; i < 10; i++) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y = 1; } else if (D && !E) { Y = 1; } else if (!D && E) { Y = 1; } else { Y = 0; } } The high-level-synthesis bug ...
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: for (int i = 0; i < 10; i++) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y = 1; } else if (D && !E) { Y = 1; } else if (!D && E) { Y = 1; } else { Y = 0; } } The high-level-synthesis bug ...
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: ap_uint<1> Y = 0; The right code snippet is: None
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: ap_uint<1> Y = 0; The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: ap_uint<1> Y = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: None
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: for (int i = 0; i < 5; i++) { Y[i] = A; } The right code snippet is: None
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: for (int i = 0; i < 5; i++) { Y[i] = A; } The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: for (int i = 0; i < 5; i++) { Y[i] = A; } The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: None
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: #pragma HLS array_partition variable=Y cyclic factor=3 The right code snippet is: None
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: #pragma HLS array_partition variable=Y cyclic factor=3 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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: #pragma HLS array_partition variable=Y cyclic factor=3 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: None
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: #pragma HLS array_partition variable=Y block factor=3 The right code snippet is: None
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: #pragma HLS array_partition variable=Y block 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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: #pragma HLS array_partition variable=Y block factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: None
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: #pragma HLS array_partition variable=Y dim=2 The right code snippet is: None
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: #pragma HLS array_partition variable=Y dim=2 The high-level-synthesis bug type of the code is: 'DID'
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: #pragma HLS array_partition variable=Y dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: None
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: #pragma HLS dataflow The right code snippet is: None
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: #pragma HLS dataflow The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: #pragma HLS dataflow The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: None
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: #pragma HLS interface ap_fifo port=Y The right code snippet is: None
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: #pragma HLS interface ap_fifo port=Y The high-level-synthesis bug type of the code is: 'IDAP'
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: #pragma HLS interface ap_fifo port=Y The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: None
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: #pragma HLS interface m_axi port=Y The right code snippet is: None
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: #pragma HLS interface m_axi port=Y The high-level-synthesis bug type of the code is: 'RAMB'
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: #pragma HLS interface m_axi port=Y The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: None
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: #pragma HLS interface s_axilite port=Y The right code snippet is: None
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: #pragma HLS interface s_axilite port=Y The high-level-synthesis bug type of the code is: 'SMA'
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: #pragma HLS interface s_axilite port=Y The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: 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: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: #pragma HLS interface ap_vld port=Y The right code snippet is: None
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: #pragma HLS interface ap_vld port=Y The high-level-synthesis bug type of the code is: 'AMS'
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: #pragma HLS interface ap_vld port=Y The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: None
'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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: None
'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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP'
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
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: None
'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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { ...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop=True The right code snippet is: None
'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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (C) { Y =...
The right code snippet is: None
'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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if (B) { Y = 1; } else if (...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop=True 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 five_to_one(bool A, bool B, bool C, bool D, bool E, ap_uint<1>& Y) { if (A) { Y = 1; } else if...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop=True The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: None
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A[4] | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); }...
The wrong part of the code is: bool a_or = A[4] | A2 | A3; The right code snippet is: bool a_or = A1 | A2 | A3;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A[4] | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
The right code snippet is: bool a_or = A1 | A2 | A3;
'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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A[4] | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_...
The wrong part of the code is: bool a_or = A[4] | A2 | A3; 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A[4] | A2 | A3; bool a_and = A1 & A2 & A3; X ...
The wrong part of the code is: bool a_or = A[4] | A2 | A3; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: bool a_or = A1 | A2 | A3;
'OOB'