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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and; if(A1 == true && A2 == true && A3 == true){ a_and = true; } else{ ...
The wrong part of the code is: bool a_and; if(A1 == true && A2 == true && A3 == true){ a_and = true; } else{ a_and = false; } The right code snippet is: bool a_and = A1 & A2 & A3;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and; if(A1 == true && A2 == true && A3 == true){ a_and = true; } else{ a_a...
The right code snippet is: bool a_and = A1 & A2 & A3;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and; if(A1 == true && A2 == true && A3 == true){ a_and = true;...
The wrong part of the code is: bool a_and; if(A1 == true && A2 == true && A3 == true){ a_and = true; } else{ a_and = false; } The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and; if(A1 == true && A2 == t...
The wrong part of the code is: bool a_and; if(A1 == true && A2 == true && A3 == true){ a_and = true; } else{ a_and = false; } The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: bool a_and = A1 & A2 & A3;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or << B1); } ...
The wrong part of the code is: X = ((~a_or & ~B1) | a_and | B1) & ~(a_or << B1); The right code snippet is: X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1);
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or << B1); } ``` ...
The right code snippet is: X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
The wrong part of the code is: X = ((~a_or & ~B1) | a_and | B1) & ~(a_or << B1); The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
The wrong part of the code is: X = ((~a_or & ~B1) | a_and | B1) & ~(a_or << B1); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: for(int i = 0; i >= 0; i++){ // do something } The right code snippet is: for(int i = 0; i < 10; i++){ // do something }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
The right code snippet is: for(int i = 0; i < 10; i++){ // do something }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
The wrong part of the code is: for(int i = 0; i >= 0; i++){ // do something } The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
The wrong part of the code is: for(int i = 0; i >= 0; i++){ // do something } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for(int i = 0; i < 10; i++){ // do something }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; int a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``...
The wrong part of the code is: int a_and = A1 & A2 & A3; The right code snippet is: bool a_and = A1 & A2 & A3;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; int a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
The right code snippet is: bool a_and = A1 & A2 & A3;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; int a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or ...
The wrong part of the code is: int a_and = A1 & A2 & A3; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; int a_and = A1 & A2 & A3; X = (...
The wrong part of the code is: int a_and = A1 & A2 & A3; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: bool a_and = A1 & A2 & A3;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: for(int i = 0; i < 9; i++){ // do something } The right code snippet is: for(int i = 0; i < 10; i++){ // do something }
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
The right code snippet is: for(int i = 0; i < 10; i++){ // do something }
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
The wrong part of the code is: for(int i = 0; i < 9; i++){ // do something } The high-level-synthesis bug type of the code is: 'MLU'
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
The wrong part of the code is: for(int i = 0; i < 9; i++){ // do something } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for(int i = 0; i < 10; i++){ // do something }
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = 0; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ```
The wrong part of the code is: bool a_or = 0; The right code snippet is: bool a_or = A1 | A2 | A3;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = 0; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` The wrong...
The right code snippet is: bool a_or = A1 | A2 | A3;
'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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = 0; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: bool a_or = 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = 0; bool a_and = A1 & A2 & A3; X = ((~a_or & ~...
The wrong part of the code is: bool a_or = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: bool a_or = A1 | A2 | A3;
'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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: for(int i = N/2; i < N; i++){ B[i] = A[i]; } The right code snippet is: for(int i = 0; i < N/2; i++){ B[i] = A[i]; }
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
The right code snippet is: for(int i = 0; i < N/2; i++){ B[i] = A[i]; }
'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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
The wrong part of the code is: for(int i = N/2; i < N; i++){ B[i] = A[i]; } 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
The wrong part of the code is: for(int i = N/2; i < N; i++){ B[i] = A[i]; } The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: for(int i = 0; i < N/2; i++){ B[i] = A[i]; }
'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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: #pragma HLS array_partition variable=A1 cyclic The right code snippet is: #pragma HLS array_partition variable=A1 complete
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
The right code snippet is: #pragma HLS array_partition variable=A1 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
The wrong part of the code is: #pragma HLS array_partition variable=A1 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
The wrong part of the code is: #pragma HLS array_partition variable=A1 cyclic The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=A1 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: #pragma HLS array_partition variable=A1 cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=A1 complete
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
The right code snippet is: #pragma HLS array_partition variable=A1 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
The wrong part of the code is: #pragma HLS array_partition variable=A1 cyclic 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
The wrong part of the code is: #pragma HLS array_partition variable=A1 cyclic factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=A1 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: #pragma HLS array_partition variable=A1 dim=2 The right code snippet is: #pragma HLS array_partition variable=A1 complete
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
The right code snippet is: #pragma HLS array_partition variable=A1 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
The wrong part of the code is: #pragma HLS array_partition variable=A1 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
The wrong part of the code is: #pragma HLS array_partition variable=A1 dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=A1 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: #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: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
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: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
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: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: #pragma HLS interface ap_ctrl_hs port=return The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
The wrong part of the code is: #pragma HLS interface ap_ctrl_hs port=return 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
The wrong part of the code is: #pragma HLS interface ap_ctrl_hs port=return The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: #pragma HLS interface m_axi port=A1 offset=slave bundle=A1 max_read_burst_length=16 The right code snippet is: #pragma HLS interface m_axi port=A1 offset=slave bundle=A1
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
The right code snippet is: #pragma HLS interface m_axi port=A1 offset=slave bundle=A1
'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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
The wrong part of the code is: #pragma HLS interface m_axi port=A1 offset=slave bundle=A1 max_read_burst_length=16 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
The wrong part of the code is: #pragma HLS interface m_axi port=A1 offset=slave bundle=A1 max_read_burst_length=16 The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=A1 offset=slave bundle=A1
'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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: #pragma HLS interface bram port=A1 The right code snippet is: #pragma HLS interface ap_memory port=A1
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
The right code snippet is: #pragma HLS interface ap_memory port=A1
'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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
The wrong part of the code is: #pragma HLS interface bram port=A1 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
The wrong part of the code is: #pragma HLS interface bram port=A1 The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_memory port=A1
'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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: #pragma HLS interface ap_vld port=A1 The right code snippet is: #pragma HLS interface ap_none port=A1
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
The right code snippet is: #pragma HLS interface ap_none port=A1
'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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
The wrong part of the code is: #pragma HLS interface ap_vld port=A1 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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
The wrong part of the code is: #pragma HLS interface ap_vld port=A1 The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_none port=A1
'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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: #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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
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 my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } `...
The wrong part of the code is: #pragma HLS unroll factor=2 The right code snippet is: #pragma HLS unroll
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or & B1); } ``` ...
The right code snippet is: #pragma HLS unroll
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ((~a_or & ~B1) | a_and | B1) & ~(a_or...
The wrong part of the code is: #pragma HLS unroll factor=2 The high-level-synthesis bug type of the code is: 'ILNU'
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void my_module(bool A1, bool A2, bool A3, bool B1, bool& X) { bool a_or = A1 | A2 | A3; bool a_and = A1 & A2 & A3; X = ...
The wrong part of the code is: #pragma HLS unroll factor=2 The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: #pragma HLS unroll
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> load_value, ap_uint<4> shift_value, bool up_down, bool shift_dir, ap_uint<4>& RESULT) { #pragma HLS INTERFACE ap_none port=load_valu...
The wrong part of the code is: ap_uint<4> counter; ap_uint<4> shifted_value; ap_uint<2> select; Bug_type: 'OOB' The right code snippet is: ap_uint<4> counter = 0; ap_uint<4> shifted_value = 0; ap_uint<2> select = 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<4> load_value, ap_uint<4> shift_value, bool up_down, bool shift_dir, ap_uint<4>& RESULT) { #pragma HLS INTERFACE ap_none port=load_value ...
The right code snippet is: ap_uint<4> counter = 0; ap_uint<4> shifted_value = 0; ap_uint<2> select = 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<4> load_value, ap_uint<4> shift_value, bool up_down, bool shift_dir, ap_uint<4>& RESULT) { #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: ap_uint<4> counter; ap_uint<4> shifted_value; ap_uint<2> select; Bug_type: 'OOB' 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<4> load_value, ap_uint<4> shift_value, bool up_down, bool shift_dir, ap_uint<4>& RESULT) { ...
The wrong part of the code is: ap_uint<4> counter; ap_uint<4> shifted_value; ap_uint<2> select; Bug_type: 'OOB' The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<4> counter = 0; ap_uint<4> shifted_value = 0; ap_uint<2> select = 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: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo port=sum ...
The wrong part of the code is: sum[9] = A[9] + B[9]; The right code snippet is: sum[i] = A[i] + B[i];
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo port=sum for...
The right code snippet is: sum[i] = A[i] + B[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: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo port=...
The wrong part of the code is: sum[9] = A[9] + B[9]; 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: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B ...
The wrong part of the code is: sum[9] = A[9] + B[9]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: sum[i] = A[i] + B[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: ```c++ void adder(int A[8] = {0}, int B[8] = {0}, int sum[8] = {0};) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fi...
The wrong part of the code is: int A[8] = {0}, int B[8] = {0}, int sum[8] = {0}; The right code snippet is: int A[8], int B[8], int sum[8]
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void adder(int A[8] = {0}, int B[8] = {0}, int sum[8] = {0};) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo po...
The right code snippet is: int A[8], int B[8], int sum[8]
'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: ```c++ void adder(int A[8] = {0}, int B[8] = {0}, int sum[8] = {0};) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTE...
The wrong part of the code is: int A[8] = {0}, int B[8] = {0}, int sum[8] = {0}; 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: ```c++ void adder(int A[8] = {0}, int B[8] = {0}, int sum[8] = {0};) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFAC...
The wrong part of the code is: int A[8] = {0}, int B[8] = {0}, int sum[8] = {0}; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: int A[8], int B[8], int sum[8]
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo port=sum ...
The wrong part of the code is: sum[i] = A[i] << 9 + B[i] << 9; The right code snippet is: sum[i] = A[i] + B[i];
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo port=sum for...
The right code snippet is: sum[i] = A[i] + B[i];
'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: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo port=...
The wrong part of the code is: sum[i] = A[i] << 9 + B[i] << 9; 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: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B ...
The wrong part of the code is: sum[i] = A[i] << 9 + B[i] << 9; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: sum[i] = A[i] + B[i];
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo port=sum ...
The wrong part of the code is: for (int i = 0; ; i++) { The right code snippet is: for (int i = 0; i < 8; i++) {
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo port=sum for...
The right code snippet is: for (int i = 0; i < 8; 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: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo port=...
The wrong part of the code is: for (int 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: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B ...
The wrong part of the code is: for (int i = 0; ; i++) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 8; 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: ```c++ void adder(unsigned int A[8], unsigned int B[8], unsigned int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFA...
The wrong part of the code is: unsigned int A[8], unsigned int B[8], unsigned int sum[8] The right code snippet is: int A[8], int B[8], int sum[8]
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void adder(unsigned int A[8], unsigned int B[8], unsigned int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap...
The right code snippet is: int A[8], int B[8], int sum[8]
'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: ```c++ void adder(unsigned int A[8], unsigned int B[8], unsigned int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma ...
The wrong part of the code is: unsigned int A[8], unsigned int B[8], unsigned int sum[8] 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: ```c++ void adder(unsigned int A[8], unsigned int B[8], unsigned int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS ...
The wrong part of the code is: unsigned int A[8], unsigned int B[8], unsigned int sum[8] The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: int A[8], int B[8], int sum[8]
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo port=sum ...
The wrong part of the code is: for (int i = 0; i < 4; i++) { The right code snippet is: for (int i = 0; i < 8; i++) {
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo port=sum for...
The right code snippet is: for (int i = 0; i < 8; 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: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo port=...
The wrong part of the code is: for (int i = 0; i < 4; i++) { 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: ```c++ void adder(int A[8], int B[8], int sum[8]) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B ...
The wrong part of the code is: for (int i = 0; i < 4; i++) { The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 8; 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: ```c++ void adder(int A[8] = {0}, int B[8] = {0}, int sum[8] = {0};) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fi...
The wrong part of the code is: int A[8] = {0}, int B[8] = {0}, int sum[8] = {0}; The right code snippet is: int A[8], int B[8], int sum[8]
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void adder(int A[8] = {0}, int B[8] = {0}, int sum[8] = {0};) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTERFACE ap_fifo po...
The right code snippet is: int A[8], int B[8], int sum[8]
'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: ```c++ void adder(int A[8] = {0}, int B[8] = {0}, int sum[8] = {0};) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFACE ap_fifo port=B #pragma HLS INTE...
The wrong part of the code is: int A[8] = {0}, int B[8] = {0}, int sum[8] = {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: ```c++ void adder(int A[8] = {0}, int B[8] = {0}, int sum[8] = {0};) { #pragma HLS INTERFACE ap_fifo port=A #pragma HLS INTERFAC...
The wrong part of the code is: int A[8] = {0}, int B[8] = {0}, int sum[8] = {0}; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: int A[8], int B[8], int sum[8]
'ZERO'