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_none port=data_in bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=seg_out bundle=CTRL_BUS #pragma HLS INTERFACE ap_ctrl_none port=return reg [3:0] stage1...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=data_in bundle=CTRL_BUS The right code snippet is: #pragma HLS INTERFACE s_axilite port=data_in bundle=CTRL_BUS
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_none port=data_in bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=seg_out bundle=CTRL_BUS #pragma HLS INTERFACE ap_ctrl_none port=return reg [3:0] stage1_out;...
The right code snippet is: #pragma HLS INTERFACE s_axilite port=data_in bundle=CTRL_BUS
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_none port=data_in bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=seg_out bundle=CTRL_BUS #pragma HLS INTERFACE ap_ctrl_none port=return reg [...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=data_in bundle=CTRL_BUS 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_none port=data_in bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=seg_out bundle=CTRL_BUS #pragma HLS INTE...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=data_in bundle=CTRL_BUS The high-level-synthesis bug type of the code is: AMS The right code snippet is: #pragma HLS INTERFACE s_axilite port=data_in bundle=CTRL_BUS
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 s_axilite port=data_in bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=seg_out bundle=CTRL_BUS #pragma HLS INTERFACE ap_ctrl_none port=return reg [3:0] stag...
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 s_axilite port=data_in bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=seg_out bundle=CTRL_BUS #pragma HLS INTERFACE ap_ctrl_none port=return reg [3:0] stage1_ou...
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 s_axilite port=data_in bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=seg_out bundle=CTRL_BUS #pragma HLS INTERFACE ap_ctrl_none port=return reg...
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 s_axilite port=data_in bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=seg_out bundle=CTRL_BUS #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 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 s_axilite port=data_in bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=seg_out bundle=CTRL_BUS #pragma HLS INTERFACE ap_ctrl_none port=return reg [3:0] stag...
The wrong part of the code is: #pragma HLS UNROLL factor=2 stage2_out = stage1_out; The right code snippet is: stage2_out = stage1_out;
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 s_axilite port=data_in bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=seg_out bundle=CTRL_BUS #pragma HLS INTERFACE ap_ctrl_none port=return reg [3:0] stage1_ou...
The right code snippet is: stage2_out = stage1_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: #pragma HLS INTERFACE s_axilite port=data_in bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=seg_out bundle=CTRL_BUS #pragma HLS INTERFACE ap_ctrl_none port=return reg...
The wrong part of the code is: #pragma HLS UNROLL factor=2 stage2_out = stage1_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: #pragma HLS INTERFACE s_axilite port=data_in bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=seg_out bundle=CTRL_BUS #pragma HLS IN...
The wrong part of the code is: #pragma HLS UNROLL factor=2 stage2_out = stage1_out; The high-level-synthesis bug type of the code is: ILNU The right code snippet is: stage2_out = stage1_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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: ap_uint<4> xor_out = A[5] ^ B[5]; The right code snippet is: ap_uint<4> xor_out = A ^ B;
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: ap_uint<4> xor_out = A ^ B;
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: ap_uint<4> xor_out = A[5] ^ B[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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: ap_uint<4> xor_out = A[5] ^ B[5]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: ap_uint<4> xor_out = A ^ B;
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: ap_uint<4> xor_out; xor_out = A ^ B; The right code snippet is: ap_uint<4> xor_out = A ^ B;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: ap_uint<4> xor_out = A ^ B;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: ap_uint<4> xor_out; xor_out = A ^ B; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: ap_uint<4> xor_out; xor_out = A ^ B; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<4> xor_out = A ^ B;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: S = xor_out << 5 ^ Cin; The right code snippet is: S = xor_out ^ Cin;
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: S = xor_out ^ Cin;
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: S = xor_out << 5 ^ Cin; 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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: S = xor_out << 5 ^ Cin; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: S = xor_out ^ Cin;
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // some code here } The right code snippet is: for (int i = 0; i < 4; i++) { // some code here }
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: for (int i = 0; i < 4; i++) { // some code here }
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // some code here } 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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // some code here } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 4; i++) { // some code here }
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: ap_int<4> xor_out = A ^ B; The right code snippet is: ap_uint<4> xor_out = A ^ B;
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: ap_uint<4> xor_out = A ^ B;
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: ap_int<4> xor_out = A ^ B; 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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: ap_int<4> xor_out = A ^ B; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<4> xor_out = A ^ B;
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: for (int i = 0; i < 3; i++) { // some code here } The right code snippet is: for (int i = 0; i < 4; i++) { // some code here }
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: for (int i = 0; i < 4; i++) { // some code here }
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: for (int i = 0; i < 3; i++) { // some code here } 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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: for (int i = 0; i < 3; i++) { // some code here } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 4; i++) { // some code here }
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: ap_uint<4> xor_out = 0; The right code snippet is: ap_uint<4> xor_out = A ^ B;
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: ap_uint<4> xor_out = A ^ B;
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: ap_uint<4> xor_out = 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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: ap_uint<4> xor_out = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_uint<4> xor_out = A ^ B;
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: // some code here that copies data from buffer A to buffer B+1 The right code snippet is: // some code here that copies data from buffer A to buffer B
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: // some code here that copies data from buffer A to buffer B
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: // some code here that copies data from buffer A to buffer B+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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: // some code here that copies data from buffer A to buffer B+1 The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: // some code here that copies data from buffer A to buffer B
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS array_partition variable=xor_out cyclic The right code snippet is: #pragma HLS array_partition variable=xor_out complete
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: #pragma HLS array_partition variable=xor_out complete
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=xor_out cyclic 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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: #pragma HLS array_partition variable=xor_out cyclic The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=xor_out complete
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS array_partition variable=xor_out factor=3 The right code snippet is: #pragma HLS array_partition variable=xor_out complete
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: #pragma HLS array_partition variable=xor_out complete
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=xor_out 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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: #pragma HLS array_partition variable=xor_out factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=xor_out complete
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS array_partition variable=xor_out dim=3 The right code snippet is: #pragma HLS array_partition variable=xor_out complete
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: #pragma HLS array_partition variable=xor_out complete
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=xor_out dim=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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: #pragma HLS array_partition variable=xor_out dim=3 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=xor_out complete
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS dataflow region 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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS dataflow region 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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: #pragma HLS dataflow region 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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
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
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: #pragma HLS interface ap_none port=A
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS interface ap_vld port=A 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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: #pragma HLS interface ap_vld port=A The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_none port=A
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS interface m_axi depth=50 port=A offset=random The right code snippet is: #pragma HLS interface m_axi depth=50 port=A offset=direct
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: #pragma HLS interface m_axi depth=50 port=A offset=direct
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS interface m_axi depth=50 port=A offset=random The high-level-synthesis bug type of the code is: 'RAMB'
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: #pragma HLS interface m_axi depth=50 port=A offset=random The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi depth=50 port=A offset=direct
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS interface ap_memory port=A The right code snippet is: #pragma HLS interface ap_none port=A
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The right code snippet is: #pragma HLS interface ap_none port=A
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS interface ap_memory port=A 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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: #pragma HLS interface ap_memory port=A The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_none port=A
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS interface ap_fifo 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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS interface ap_fifo 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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
The wrong part of the code is: #pragma HLS interface ap_fifo 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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #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'
'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 four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS unroll factor=3 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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none port=A ...
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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
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: ``` #include <ap_int.h> void four_bit_adder( ap_uint<4> A, ap_uint<4> B, ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>&...
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
'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 top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The wrong part of the code is: out = (in1 | (ap_uint<32>(in2 + 10) << 24)).or_reduce(); The right code snippet is: out = (in1 | (ap_uint<32>(in2) << 24)).or_reduce();
'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 top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The right code snippet is: out = (in1 | (ap_uint<32>(in2) << 24)).or_reduce();
'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 top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: out = (in1 | (ap_uint<32>(in2 + 10) << 24)).or_reduce(); 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 top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HL...
The wrong part of the code is: out = (in1 | (ap_uint<32>(in2 + 10) << 24)).or_reduce(); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: out = (in1 | (ap_uint<32>(in2) << 24)).or_reduce();
'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 top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The wrong part of the code is: static ap_uint<8> prev_in; The right code snippet is: static ap_uint<8> prev_in = 0;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The right code snippet is: static ap_uint<8> prev_in = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: static ap_uint<8> prev_in; 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 top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HL...
The wrong part of the code is: static ap_uint<8> prev_in; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<8> prev_in = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The wrong part of the code is: out = (in1 | (ap_uint<32>(in2) << 50)).or_reduce(); The right code snippet is: out = (in1 | (ap_uint<32>(in2) << 24)).or_reduce();
'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 top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The right code snippet is: out = (in1 | (ap_uint<32>(in2) << 24)).or_reduce();
'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 top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: out = (in1 | (ap_uint<32>(in2) << 50)).or_reduce(); 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 top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HL...
The wrong part of the code is: out = (in1 | (ap_uint<32>(in2) << 50)).or_reduce(); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: out = (in1 | (ap_uint<32>(in2) << 24)).or_reduce();
'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 top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { The right code snippet is: for (int i = 0; i < 10; i++) {
'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 top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The right code snippet is: for (int i = 0; i < 10; i++) {
'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 top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { 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 top_module(ap_uint<1> clk, ap_uint<1> reset, ap_uint<32> in, ap_uint<8> in2, ap_uint<1> &out) { #pragma HL...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 10; i++) {
'INF'