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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
The wrong part of the code is: int S[2] = {0}; The right code snippet is: int S[2];
ZERO
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
The right code snippet is: int S[2];
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: int S[2] = {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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
The wrong part of the code is: int S[2] = {0}; The high-level-synthesis bug type of the code is: ZERO The right code snippet is: int S[2];
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
The wrong part of the code is: case 2'b10: Y = D + 4; break; The right code snippet is: case 2'b10: Y = C; break;
BUF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
The right code snippet is: case 2'b10: Y = C; break;
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: case 2'b10: Y = D + 4; break; 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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
The wrong part of the code is: case 2'b10: Y = D + 4; break; The high-level-synthesis bug type of the code is: BUF The right code snippet is: case 2'b10: Y = C; break;
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A cyclic The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A complete
APT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A cyclic The high-level-synthesis bug type of the code is: APT The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A block factor=3 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A complete
FND
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A block factor=3 The high-level-synthesis bug type of the code is: FND The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A dim=2 factor=2 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A complete
DID
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A dim=2 factor=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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A dim=2 factor=2 The high-level-synthesis bug type of the code is: DID The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS dataflow unreliable 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: #pragma HLS dataflow unreliable 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
The wrong part of the code is: #pragma HLS dataflow unreliable 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
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
IDAP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTER...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE m_axi port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_n...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A The right code snippet is: #pragma HLS INTERFACE ap_none port=A
RAMB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE m_axi port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none p...
The right code snippet is: #pragma HLS INTERFACE ap_none port=A
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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE m_axi port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INT...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE m_axi port=A #pragma HLS INTERFA...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A The high-level-synthesis bug type of the code is: RAMB The right code snippet is: #pragma HLS INTERFACE ap_none port=A
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE bram port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_no...
The wrong part of the code is: #pragma HLS INTERFACE bram 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE bram port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none po...
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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE bram port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTE...
The wrong part of the code is: #pragma HLS INTERFACE bram 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE bram port=A #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS INTERFACE bram 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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_memory port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ...
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
AMS
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_memory port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_no...
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_memory port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS...
The wrong part of the code is: #pragma HLS INTERFACE ap_memory 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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_memory port=A #pragma HLS INT...
The wrong part of the code is: #pragma HLS INTERFACE ap_memory 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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
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: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap...
The wrong part of the code is: case 2'b00: Y[0] = A[0]; Y[1] = A[1]; Y[2] = A[2]; Y[3] = A[3]; Y[4] = A[4]; Y[5] = A[5]; Y[6] = A[6]; Y[7] = A[7]; break; The right code snippet is: case 2'b00: Y = A; break;
ILNU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none...
The right code snippet is: case 2'b00: Y = A; break;
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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS I...
The wrong part of the code is: case 2'b00: Y[0] = A[0]; Y[1] = A[1]; Y[2] = A[2]; Y[3] = A[3]; Y[4] = A[4]; Y[5] = A[5]; Y[6] = A[6]; Y[7] = A[7]; break; 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 mux4x1(int A[8], int B[8], int C[8], int D[8], int S[2], int Y[8]) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTER...
The wrong part of the code is: case 2'b00: Y[0] = A[0]; Y[1] = A[1]; Y[2] = A[2]; Y[3] = A[3]; Y[4] = A[4]; Y[5] = A[5]; Y[6] = A[6]; Y[7] = A[7]; break; The high-level-synthesis bug type of the code is: ILNU The right code snippet is: case 2'b00: Y = A; break;
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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: q = reg1[10] + reg2; The right code snippet is: q = reg1 + reg2;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=d1...
The right code snippet is: q = reg1 + reg2;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: q = reg1[10] + reg2; 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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: q = reg1[10] + reg2; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: q = reg1 + reg2;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: static ap_uint<8> reg1; static ap_uint<8> reg2; The right code snippet is: static ap_uint<8> reg1 = 0x34; static ap_uint<8> reg2 = 0x34;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=d1...
The right code snippet is: static ap_uint<8> reg1 = 0x34; static ap_uint<8> reg2 = 0x34;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: static ap_uint<8> reg1; static ap_uint<8> reg2; 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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: static ap_uint<8> reg1; static ap_uint<8> reg2; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<8> reg1 = 0x34; static ap_uint<8> reg2 = 0x34;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: q = reg1 << 10 + reg2; The right code snippet is: q = reg1 + reg2;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=d1...
The right code snippet is: q = reg1 + reg2;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: q = reg1 << 10 + reg2; 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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: q = reg1 << 10 + reg2; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: q = reg1 + reg2;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: while (true) { reg1 = d1; reg2 = d2; } The right code snippet is: if (reset) { reg1 = 0x34; reg2 = 0x34; } else { reg1 = d1; reg2 = d2; }
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=d1...
The right code snippet is: if (reset) { reg1 = 0x34; reg2 = 0x34; } else { reg1 = d1; reg2 = d2; }
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: while (true) { reg1 = d1; reg2 = d2; } 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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: while (true) { reg1 = d1; reg2 = d2; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (reset) { reg1 = 0x34; reg2 = 0x34; } else { reg1 = d1; reg2 = d2; }
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: q = (ap_uint<16>)reg1 + reg2; The right code snippet is: q = reg1 + reg2;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=d1...
The right code snippet is: q = reg1 + reg2;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: q = (ap_uint<16>)reg1 + reg2; 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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: q = (ap_uint<16>)reg1 + reg2; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: q = reg1 + reg2;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; The right code snippet is: for (int i = 0; i < 8; i++) { q += reg1 + reg2; }
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=d1...
The right code snippet is: for (int i = 0; i < 8; i++) { q += reg1 + reg2; }
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; 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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; q += reg1 + reg2; The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 8; i++) { q += re...
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: static ap_uint<8> reg1 = 0; static ap_uint<8> reg2 = 0; The right code snippet is: static ap_uint<8> reg1 = 0x34; static ap_uint<8> reg2 = 0x34;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=d1...
The right code snippet is: static ap_uint<8> reg1 = 0x34; static ap_uint<8> reg2 = 0x34;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: static ap_uint<8> reg1 = 0; static ap_uint<8> reg2 = 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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: static ap_uint<8> reg1 = 0; static ap_uint<8> reg2 = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static ap_uint<8> reg1 = 0x34; static ap_uint<8> reg2 = 0x34;
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: // Assume buffer is split into two halves: buf1 and buf2 memcpy(buf1, buf1, sizeof(buf1)); The right code snippet is: // Assume buffer is split into two halves: buf1 and buf2 memcpy(buf2, buf1, sizeof(buf1));
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=d1...
The right code snippet is: // Assume buffer is split into two halves: buf1 and buf2 memcpy(buf2, buf1, sizeof(buf1));
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: // Assume buffer is split into two halves: buf1 and buf2 memcpy(buf1, buf1, sizeof(buf1)); 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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: // Assume buffer is split into two halves: buf1 and buf2 memcpy(buf1, buf1, sizeof(buf1)); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: // Assume buffer is split into two halves: buf1 and buf2 memcpy(buf2, buf1, sizeof(buf1));
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: #pragma HLS array_partition variable=reg1 block factor=2 dim=1 The right code snippet is: #pragma HLS array_partition variable=reg1 cyclic factor=2 dim=1
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=d1...
The right code snippet is: #pragma HLS array_partition variable=reg1 cyclic factor=2 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: #include <ap_int.h> void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS array_partition variable=reg1 block factor=2 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: #include <ap_int.h> void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: #pragma HLS array_partition variable=reg1 block factor=2 dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=reg1 cyclic factor=2 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: #include <ap_int.h> void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: #pragma HLS array_partition variable=reg1 cyclic factor=3 dim=1 The right code snippet is: #pragma HLS array_partition variable=reg1 cyclic factor=2 dim=1
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=d1...
The right code snippet is: #pragma HLS array_partition variable=reg1 cyclic factor=2 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: #include <ap_int.h> void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS array_partition variable=reg1 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: #include <ap_int.h> void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: #pragma HLS array_partition variable=reg1 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=reg1 cyclic factor=2 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: #include <ap_int.h> void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: #pragma HLS array_partition variable=reg1 cyclic factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=reg1 cyclic factor=2 dim=1
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=d1...
The right code snippet is: #pragma HLS array_partition variable=reg1 cyclic factor=2 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: #include <ap_int.h> void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS array_partition variable=reg1 cyclic factor=2 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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: #pragma HLS array_partition variable=reg1 cyclic factor=2 dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=reg1 cyclic factor=2 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: #include <ap_int.h> void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: #pragma HLS dataflow pipeline 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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=d1...
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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS dataflow pipeline 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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: #pragma HLS dataflow pipeline 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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: #pragma HLS interface ap_fifo port=q The right code snippet is: #pragma HLS interface ap_none port=q
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=d1...
The right code snippet is: #pragma HLS interface ap_none port=q
'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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS interface ap_fifo port=q 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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) { #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: #pragma HLS interface ap_fifo port=q The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_none port=q
'IDAP'