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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE bram port=D
#pragma HLS INTERFACE bra... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE bram port=D
#pragma HLS INTERFACE bram port=CLK
#pragma HLS INTERFACE bram port=EN
#pragma HLS INTERFACE bram port=Q
#pragma HLS INTERFACE bram port=Q_N
The right code snippet is:
#pragma HLS INTERFACE a... | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE bram port=D
#pragma HLS INTERFACE bram por... |
The right code snippet is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis port=CLK
#pragma HLS INTERFACE axis port=EN
#pragma HLS INTERFACE axis port=Q
#pragma HLS INTERFACE axis port=Q_N | '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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE bram port=D
#pragma HLS IN... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE bram port=D
#pragma HLS INTERFACE bram port=CLK
#pragma HLS INTERFACE bram port=EN
#pragma HLS INTERFACE bram port=Q
#pragma HLS INTERFACE bram port=Q_N
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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE bram port=D
#pragma HLS INTERFACE bram port=CLK
#pragma HLS INTERFACE bram port=EN
#pragma HLS INTERFACE bram port=Q
#pragma HLS INTERFACE bram port=Q_N
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 right code snippet
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port
bool gated_clk = CLK & EN; // create gated clock signal
... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_ctrl_none port
The right code snippet is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis port=CLK
#pragma HLS INTERFACE axis port=EN
#pragma HLS INTERFACE axis port=Q
#pragma HLS INTERFA... | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port
bool gated_clk = CLK & EN; // create gated clock signal
if (g... |
The right code snippet is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis port=CLK
#pragma HLS INTERFACE axis port=EN
#pragma HLS INTERFACE axis port=Q
#pragma HLS INTERFACE axis port=Q_N | '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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port
bool gated_clk = CLK & EN; // create gated clock s... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_ctrl_none port
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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port
bool gated_cl... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_ctrl_none port
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis port=CLK
#pragma HLS INTERFACE axis p... | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> resistance_m... |
The wrong part of the code is:
sensor_val = sensor[1] * 2;
The right code snippet is:
sensor_val = sensor * 2; | 'OOB': Out-of-bounds array access |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> resistance_mode =... |
The right code snippet is:
sensor_val = sensor * 2; | 'OOB': Out-of-bounds array access |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> r... |
The wrong part of the code is:
sensor_val = sensor[1] * 2;
The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access | 'OOB': Out-of-bounds array access |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> cap... |
The wrong part of the code is:
sensor_val = sensor[1] * 2;
The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access
The right code snippet is:
sensor_val = sensor * 2; | 'OOB': Out-of-bounds array access |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> resistance_m... |
The wrong part of the code is:
ap_uint<1> touch_detected = 0;
The right code snippet is:
ap_uint<1> touch_detected; | 'INIT': Read of uninitialized variable |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> resistance_mode =... |
The right code snippet is:
ap_uint<1> touch_detected; | 'INIT': Read of uninitialized variable |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> r... |
The wrong part of the code is:
ap_uint<1> touch_detected = 0;
The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable | 'INIT': Read of uninitialized variable |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> cap... |
The wrong part of the code is:
ap_uint<1> touch_detected = 0;
The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable
The right code snippet is:
ap_uint<1> touch_detected; | 'INIT': Read of uninitialized variable |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> resistance_m... |
The wrong part of the code is:
sensor_val = sensor << 10;
The right code snippet is:
sensor_val = sensor * 2; | 'SHFT': Bit shift by an out-of-bounds amount |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> resistance_mode =... |
The right code snippet is:
sensor_val = sensor * 2; | 'SHFT': Bit shift by an out-of-bounds amount |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> r... |
The wrong part of the code is:
sensor_val = sensor << 10;
The high-level-synthesis bug type of the code is: 'SHFT': Bit shift by an out-of-bounds amount | 'SHFT': Bit shift by an out-of-bounds amount |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> cap... |
The wrong part of the code is:
sensor_val = sensor << 10;
The high-level-synthesis bug type of the code is: 'SHFT': Bit shift by an out-of-bounds amount
The right code snippet is:
sensor_val = sensor * 2; | 'SHFT': Bit shift by an out-of-bounds amount |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> resistance_m... |
The wrong part of the code is:
sensor_val = -sensor;
The right code snippet is:
sensor_val = 255 - sensor; | 'USE': Unintended sign extension |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> resistance_mode =... |
The right code snippet is:
sensor_val = 255 - sensor; | 'USE': Unintended sign extension |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> r... |
The wrong part of the code is:
sensor_val = -sensor;
The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension | 'USE': Unintended sign extension |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> cap... |
The wrong part of the code is:
sensor_val = -sensor;
The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension
The right code snippet is:
sensor_val = 255 - sensor; | 'USE': Unintended sign extension |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> resistance_m... |
The wrong part of the code is:
ap_uint<1> touch_detected = 1;
The right code snippet is:
ap_uint<1> touch_detected; | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> resistance_mode =... |
The right code snippet is:
ap_uint<1> touch_detected; | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> capacitance_mode = 0;
const ap_uint<1> r... |
The wrong part of the code is:
ap_uint<1> touch_detected = 1;
The high-level-synthesis bug type of the code is: 'ZERO': Variable initialized to zero instead of nonzero initializer | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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>
const ap_uint<8> capacitance_threshold = 100;
const ap_uint<8> resistance_threshold = 100;
const ap_uint<1> cap... |
The wrong part of the code is:
ap_uint<1> touch_detected = 1;
The high-level-synthesis bug type of the code is: 'ZERO': Variable initialized to zero instead of nonzero initializer
The right code snippet is:
ap_uint<1> touch_detected; | 'ZERO': Variable initialized to zero instead of nonzero initializer |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
for (int j = 0; j < n+1; j++) {
temp[i+j] = temp[i+j] ^ (a[i] & b[j]);
}
The right code snippet is:
for (int j = 0; j < n; j++) {
temp[i+j] = temp[i+j] ^ (a[i] & b[j]);
} | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
for (int j = 0; j < n; j++) {
temp[i+j] = temp[i+j] ^ (a[i] & b[j]);
} | '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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
for (int j = 0; j < n+1; j++) {
temp[i+j] = temp[i+j] ^ (a[i] & b[j]);
}
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
for (int j = 0; j < n+1; j++) {
temp[i+j] = temp[i+j] ^ (a[i] & b[j]);
}
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
for (int j = 0; j < n; j++) {
temp[i+j] = temp[i+j] ^ (a[i] & b[j]);
} | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
ap_uint<t> error_positions;
The right code snippet is:
ap_uint<t> error_positions = 0; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
ap_uint<t> error_positions = 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
ap_uint<t> error_positions;
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
ap_uint<t> error_positions;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<t> error_positions = 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
for (int j = 0; j < n+2; j++) {
temp[i+j] = temp[i+j+2] ^ (a[i] & b[j]);
}
The right code snippet is:
for (int j = 0; j < n; j++) {
temp[i+j] = temp[i+j] ^ (a[i] & b[j]);
} | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
for (int j = 0; j < n; j++) {
temp[i+j] = temp[i+j] ^ (a[i] & b[j]);
} | '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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
for (int j = 0; j < n+2; j++) {
temp[i+j] = temp[i+j+2] ^ (a[i] & b[j]);
}
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
for (int j = 0; j < n+2; j++) {
temp[i+j] = temp[i+j+2] ^ (a[i] & b[j]);
}
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
for (int j = 0; j < n; j++) {
temp[i+j] = temp[i+j] ^ (a[i] & b[j]);
} | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
for (int i = 0; i < k+1; i++) {
poly_mod((remainder, 0), generator, remainder);
}
The right code snippet is:
for (int i = 0; i < k; i++) {
poly_mod((remainder, 0), generator, remainder);
} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
for (int i = 0; i < k; i++) {
poly_mod((remainder, 0), generator, remainder);
} | '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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
for (int i = 0; i < k+1; i++) {
poly_mod((remainder, 0), generator, remainder);
}
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
for (int i = 0; i < k+1; i++) {
poly_mod((remainder, 0), generator, remainder);
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
for (int i = 0; i < k; i++) {
poly_mod((remainder, 0), generator, remainder);
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
ap_uint<2*n> temp = -1;
The right code snippet is:
ap_uint<2*n> temp = 0; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
ap_uint<2*n> temp = 0; | '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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
ap_uint<2*n> temp = -1;
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
ap_uint<2*n> temp = -1;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_uint<2*n> temp = 0; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
for (int i = 0; i < k/2; i++) {
poly_mod((remainder, 0), generator, remainder);
poly_mod((remainder, 0), generator, remainder);
}
The right code snippet is:
for (int i = 0; i < k; i++) {
poly_mod((remainder, 0), generator, remainder);
} | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
for (int i = 0; i < k; i++) {
poly_mod((remainder, 0), generator, remainder);
} | '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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
for (int i = 0; i < k/2; i++) {
poly_mod((remainder, 0), generator, remainder);
poly_mod((remainder, 0), generator, remainder);
}
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
for (int i = 0; i < k/2; i++) {
poly_mod((remainder, 0), generator, remainder);
poly_mod((remainder, 0), generator, remainder);
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < k; i++) {
poly_mod((remainder... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
ap_uint<n-k> pad;
The right code snippet is:
ap_uint<n-k> pad = 0; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
ap_uint<n-k> pad = 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
ap_uint<n-k> pad;
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
ap_uint<n-k> pad;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<n-k> pad = 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
ap_uint<n/2> remainder = message;
The right code snippet is:
ap_uint<n> remainder = message; | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
ap_uint<n> remainder = message; | '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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
ap_uint<n/2> remainder = message;
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
ap_uint<n/2> remainder = message;
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
ap_uint<n> remainder = message; | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
#pragma HLS array_partition variable=generator cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS array_partition variable=generator 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
#pragma HLS array_partition variable=generator 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
#pragma HLS array_partition variable=generator cyclic factor=3 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
#pragma HLS array_partition variable=generator cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=generator 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
#pragma HLS array_partition variable=generator cyclic factor=5 dim=1
The right code snippet is:
#pragma HLS array_partition variable=generator 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
#pragma HLS array_partition variable=generator 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
#pragma HLS array_partition variable=generator cyclic factor=5 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
#pragma HLS array_partition variable=generator cyclic factor=5 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=generator 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
#pragma HLS array_partition variable=generator cyclic factor=2 dim=2
The right code snippet is:
#pragma HLS array_partition variable=generator 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
#pragma HLS array_partition variable=generator 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
#pragma HLS array_partition variable=generator 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
#pragma HLS array_partition variable=generator 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=generator 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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
#pragma HLS dataflow loop_flatten
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
#pragma HLS dataflow loop_flatten
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
#pragma HLS dataflow loop_flatten
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=result
The right code snippet is:
#pragma HLS interface ap_fifo port=result | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
#pragma HLS interface ap_fifo port=result | '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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=result
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=result
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface ap_fifo port=result | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
#pragma HLS interface m_axi port=data depth=512 offset=direct
The right code snippet is:
#pragma HLS interface m_axi port=data depth=256 offset=direct | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
#pragma HLS interface m_axi port=data depth=256 offset=direct | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
#pragma HLS interface m_axi port=data depth=512 offset=direct
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
#pragma HLS interface m_axi port=data depth=512 offset=direct
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi port=data depth=256 offset=direct | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
#pragma HLS interface bram port=result
The right code snippet is:
#pragma HLS interface ap_fifo port=result | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
#pragma HLS interface ap_fifo port=result | '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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
#pragma HLS interface bram port=result
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
#pragma HLS interface bram port=result
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface ap_fifo port=result | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=data
The right code snippet is:
#pragma HLS interface ap_fifo port=data | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
The right code snippet is:
#pragma HLS interface ap_fifo port=data | '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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=data
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=data
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface ap_fifo port=data | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations... |
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic operations
void... |
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected
// Define the polynomial arithmetic... |
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:
```
#define k 8 // number of input symbols
#define n 12 // number of output symbols
#define t 2 // number of errors that can be corrected... |
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' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.