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_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=A 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: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; } The wrong part of the...
The right code snippet is: #pragma HLS array_partition variable=A 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: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
The wrong part of the code is: #pragma HLS array_partition variable=A 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: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A <<...
The wrong part of the code is: #pragma HLS array_partition variable=A 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=A 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: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
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: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; } The wrong part of the...
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 four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
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: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A <<...
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: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
The wrong part of the code is: #pragma HLS interface ap_memory port=out The right code snippet is: #pragma HLS interface ap_fifo port=out
IDAP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; } The wrong part of the...
The right code snippet is: #pragma HLS interface ap_fifo port=out
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
The wrong part of the code is: #pragma HLS interface ap_memory port=out The high-level-synthesis bug type of the code is: IDAP
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A <<...
The wrong part of the code is: #pragma HLS interface ap_memory port=out The high-level-synthesis bug type of the code is: IDAP The right code snippet is: #pragma HLS interface ap_fifo port=out
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
The wrong part of the code is: #pragma HLS interface m_axi port=out offset=slave The right code snippet is: #pragma HLS interface m_axi port=out
RAMB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; } The wrong part of the...
The right code snippet is: #pragma HLS interface m_axi port=out
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
The wrong part of the code is: #pragma HLS interface m_axi port=out offset=slave 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 four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A <<...
The wrong part of the code is: #pragma HLS interface m_axi port=out offset=slave The high-level-synthesis bug type of the code is: RAMB The right code snippet is: #pragma HLS interface m_axi port=out
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
The wrong part of the code is: #pragma HLS interface bram port=A The right code snippet is: #pragma HLS interface ap_fifo 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 four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; } The wrong part of the...
The right code snippet is: #pragma HLS interface ap_fifo 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 four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
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 four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A <<...
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_fifo 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 four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
The wrong part of the code is: #pragma HLS interface ap_vld port=out The right code snippet is: #pragma HLS interface bram port=out
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_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; } The wrong part of the...
The right code snippet is: #pragma HLS interface bram port=out
AMS
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
The wrong part of the code is: #pragma HLS interface ap_vld port=out The high-level-synthesis bug type of the code is: AMS
AMS
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A <<...
The wrong part of the code is: #pragma HLS interface ap_vld port=out The high-level-synthesis bug type of the code is: AMS The right code snippet is: #pragma HLS interface bram port=out
AMS
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void four_bit_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
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_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; } The wrong part of the...
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_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A << i)); } out = result; }
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_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i++) { result += (B[i] * (A <<...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: MLP The right code snippet is: #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_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i+=2) { result += (B[i] * (A << i)); } out = result; }
The wrong part of the code is: for (int i = 0; i < 4; i+=2) { The right code snippet is: for (int i = 0; i < 4; i++) {
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_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i+=2) { result += (B[i] * (A << i)); } out = result; } The wrong part of th...
The right code snippet is: for (int i = 0; i < 4; i++) {
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_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i+=2) { result += (B[i] * (A << i)); } out = result; }
The wrong part of the code is: for (int i = 0; i < 4; i+=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_multiplier(int A[4], int B[4], int out[8]) { int result = 0; for (int i = 0; i < 4; i+=2) { result += (B[i] * (A <...
The wrong part of the code is: for (int i = 0; i < 4; i+=2) { The high-level-synthesis bug type of the code is: ILNU The right code snippet is: for (int i = 0; i < 4; i++) {
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=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: for(int i=0; i<=6; i++){ adder(A[i], B[i], sum[i]); } The right code snippet is: for(int i=0; i<6; i++){ adder(A[i], B[i], sum[i]); }
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: for(int i=0; i<6; i++){ adder(A[i], B[i], sum[i]); }
'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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: for(int i=0; i<=6; i++){ adder(A[i], B[i], sum[i]); } 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: for(int i=0; i<=6; i++){ adder(A[i], B[i], sum[i]); } The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: for(int i=0; i<6; i++){ adder(A[i], B[i], sum[i]); }
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: int A, B, sum; A = 5; sum = A + B; The right code snippet is: int A, B, sum; sum = A + B;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: int A, B, sum; sum = 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: int A, B, sum; A = 5; sum = 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: int A, B, sum; A = 5; sum = A + B; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: int A, B, sum; sum = 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A << 20 + B;...
The wrong part of the code is: sum = A << 20 + B; The right code snippet is: sum = A + B;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A << 20 + B; ...
The right code snippet is: sum = A + B;
'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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: sum = A << 20 + B; 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: sum = A << 20 + B; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: sum = A + B;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: for(int i=0; i>=0; i++){ adder(A[i], B[i], sum[i]); } The right code snippet is: for(int i=0; i<6; i++){ adder(A[i], B[i], sum[i]); }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: for(int i=0; i<6; i++){ adder(A[i], B[i], sum[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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: for(int i=0; i>=0; i++){ adder(A[i], B[i], sum[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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: for(int i=0; i>=0; i++){ adder(A[i], B[i], sum[i]); } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for(int i=0; i<6; i++){ adder(A[i], B[i], sum[i]); }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: int A = -1; unsigned int B = (unsigned int)A; The right code snippet is: int A = -1; unsigned int B = A;
'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=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: int A = -1; unsigned int B = A;
'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=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: int A = -1; unsigned int B = (unsigned int)A; 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=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: int A = -1; unsigned int B = (unsigned int)A; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: int A = -1; unsigned int B = A;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: for(int i=0; i<6; i+=2){ adder(A[i], B[i], sum[i]); adder(A[i+1], B[i+1], sum[i+1]); } The right code snippet is: for(int i=0; i<6; i++){ adder(A[i], B[i], sum[i]); }
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: for(int i=0; i<6; i++){ adder(A[i], B[i], sum[i]); }
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: for(int i=0; i<6; i+=2){ adder(A[i], B[i], sum[i]); adder(A[i+1], B[i+1], sum[i+1]); } The high-level-synthesis bug type of the code is: 'MLU'
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: for(int i=0; i<6; i+=2){ adder(A[i], B[i], sum[i]); adder(A[i+1], B[i+1], sum[i+1]); } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for(int i=0; i<6; i++){ adder(A[i], B[i], sum[i]); }
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: int A; The right code snippet is: int A = 0;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: int A = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: int A; The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: int A; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: int A = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: memcpy(buffer1+1024, buffer2, 1024); The right code snippet is: memcpy(buffer1, buffer2, 1024);
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: memcpy(buffer1, buffer2, 1024);
'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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: memcpy(buffer1+1024, buffer2, 1024); 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: memcpy(buffer1+1024, buffer2, 1024); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memcpy(buffer1, buffer2, 1024);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: #pragma HLS array_partition variable=A block factor=2 dim=1 The right code snippet is: #pragma HLS array_partition variable=A 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: #pragma HLS array_partition variable=A 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: #pragma HLS array_partition variable=A 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: #pragma HLS array_partition variable=A 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=A 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=3 dim=1 The right code snippet is: #pragma HLS array_partition variable=A 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: #pragma HLS array_partition variable=A 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: 'FND'
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: #pragma HLS array_partition variable=A 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=A 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=A 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: #pragma HLS array_partition variable=A 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: #pragma HLS array_partition variable=A 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: #pragma HLS array_partition variable=A 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=A 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: #pragma HLS interface ap_fifo port=A,B The right code snippet is: #pragma HLS interface ap_none port=A,B
'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_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: #pragma HLS interface ap_none port=A,B
'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_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: #pragma HLS interface ap_fifo port=A,B The high-level-synthesis bug type of the code is: 'IDAP'
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: #pragma HLS interface ap_fifo port=A,B The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_none port=A,B
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: #pragma HLS interface m_axi port=A offset=slave bundle=gmem1 The right code snippet is: #pragma HLS interface m_axi port=A offset=slave bundle=gmem
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: #pragma HLS interface m_axi port=A offset=slave bundle=gmem
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: #pragma HLS interface m_axi port=A offset=slave bundle=gmem1 The high-level-synthesis bug type of the code is: 'RAMB'
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: #pragma HLS interface m_axi port=A offset=slave bundle=gmem1 The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=A offset=slave bundle=gmem
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: #pragma HLS interface ap_memory port=A,B The right code snippet is: #pragma HLS interface ap_none port=A,B
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: #pragma HLS interface ap_none port=A,B
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: #pragma HLS interface ap_memory port=A,B The high-level-synthesis bug type of the code is: 'SMA'
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: #pragma HLS interface ap_memory port=A,B The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_none port=A,B
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: #pragma HLS interface ap_none port=A,B The right code snippet is: #pragma HLS interface ap_memory port=A,B
'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=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: #pragma HLS interface ap_memory port=A,B
'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=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A...
The wrong part of the code is: #pragma HLS interface ap_none port=A,B 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=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
The wrong part of the code is: #pragma HLS interface ap_none port=A,B The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_memory port=A,B
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; i...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline II=1
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = A + B; if (su...
The right code snippet is: #pragma HLS pipeline II=1
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder(int A, int B, int& sum){ sum = 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: #pragma HLS INTERFACE ap_none port=A,B #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=sum void adder...
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'