instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none por... |
The wrong part of the code is:
#pragma HLS interface bram port=A
The right code snippet is:
#pragma HLS interface ap_none port=A | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=gre... |
The right code snippet is:
#pragma HLS interface ap_none port=A | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ... |
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ... |
The wrong part of the code is:
#pragma HLS interface bram port=A
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface ap_none port=A | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none por... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=A
The right code snippet is:
#pragma HLS interface ap_none port=A | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=gre... |
The right code snippet is:
#pragma HLS interface ap_none port=A | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=A
The high-level-synthesis bug type of the code is: 'AMS' | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=A
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface ap_none port=A | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none por... |
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=gre... |
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ... |
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_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ... |
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none por... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 0; i < 4; i++) {
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=gre... |
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 0; i < 4; i++) {
The high-level-synthesis bug type of the code is: 'ILNU' | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 0; i < 4; i++) {
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:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
int c = c + 1;
The right code snippet is:
int c; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
int c = c + 1;
|
The right code snippet is:
int c; | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
int c = c + 1;
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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
int c = c + 1;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
int c; | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
int arr[5];
arr[6] = 0;
The right code snippet is:
None | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
int arr[5];
arr[6] = 0;
|
The right code snippet is:
None | 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:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
int arr[5];
arr[6] = 0;
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:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
int arr[5];
arr[6] = 0;
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
None | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
int a = 10;
int b = 2;
int c = a << b;
The right code snippet is:
None | SHFT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
int a = 10;
int b = 2;
int c = a << b;
|
The right code snippet is:
None | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
int a = 10;
int b = 2;
int c = a << 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:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
int a = 10;
int b = 2;
int c = a << b;
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
None | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
while (1) {
// do something infinitely
}
The right code snippet is:
None | INF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
while (1) {
// do something infinitely
}
|
The right code snippet is:
None | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
while (1) {
// do something infinitely
}
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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
while (1) {
// do something infinitely
}
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
None | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
unsigned int b = a;
The right code snippet is:
int a = 10; | USE |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
unsigned int b = a;
|
The right code snippet is:
int a = 10; | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
unsigned int b = 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:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
unsigned int b = a;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
int a = 10; | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
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:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
int a;
|
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:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
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:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
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:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
int buf[10];
memcpy(arr, buf + 5, sizeof(int) * 5);
The right code snippet is:
int arr[10]; | BUF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
int buf[10];
memcpy(arr, buf + 5, sizeof(int) * 5);
|
The right code snippet is:
int arr[10]; | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
int buf[10];
memcpy(arr, buf + 5, sizeof(int) * 5);
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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
int buf[10];
memcpy(arr, buf + 5, sizeof(int) * 5);
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
int arr[10]; | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS array_partition variable=arr cyclic
The right code snippet is:
#pragma HLS array_partition variable=arr complete | APT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
#pragma HLS array_partition variable=arr cyclic
|
The right code snippet is:
#pragma HLS array_partition variable=arr 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS array_partition variable=arr 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS array_partition variable=arr cyclic
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pragma HLS array_partition variable=arr 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS array_partition variable=arr complete factor=3
The right code snippet is:
#pragma HLS array_partition variable=arr complete factor=4 | FND |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
#pragma HLS array_partition variable=arr complete factor=3
|
The right code snippet is:
#pragma HLS array_partition variable=arr complete factor=4 | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS array_partition variable=arr complete 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS array_partition variable=arr complete factor=3
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS array_partition variable=arr complete factor=4 | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS array_partition variable=arr complete dim=2
The right code snippet is:
#pragma HLS array_partition variable=arr complete 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
#pragma HLS array_partition variable=arr complete dim=2
|
The right code snippet is:
#pragma HLS array_partition variable=arr complete 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS array_partition variable=arr complete 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS array_partition variable=arr complete dim=2
The high-level-synthesis bug type of the code is: DID
The right code snippet is:
#pragma HLS array_partition variable=arr complete 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
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, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS interface ap_fifo port=return
The right code snippet is:
#pragma HLS interface ap_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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
#pragma HLS interface ap_fifo port=return
|
The right code snippet is:
#pragma HLS interface ap_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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS interface ap_fifo 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS interface ap_fifo port=return
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
#pragma HLS interface ap_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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS interface m_axi port=arr offset=slave
The right code snippet is:
#pragma HLS interface m_axi port=arr | RAMB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
#pragma HLS interface m_axi port=arr offset=slave
|
The right code snippet is:
#pragma HLS interface m_axi port=arr | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS interface m_axi port=arr 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS interface m_axi port=arr offset=slave
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
#pragma HLS interface m_axi port=arr | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS interface bram port=arr
The right code snippet is:
#pragma HLS interface ap_memory port=arr | SMA |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
#pragma HLS interface bram port=arr
|
The right code snippet is:
#pragma HLS interface ap_memory port=arr | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS interface bram port=arr
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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS interface bram port=arr
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
#pragma HLS interface ap_memory port=arr | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS interface s_axilite port=arr bundle=control
The right code snippet is:
#pragma HLS interface axis port=arr | AMS |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
The wrong part of the code is:
#pragma HLS interface s_axilite port=arr bundle=control
|
The right code snippet is:
#pragma HLS interface axis port=arr | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS interface s_axilite port=arr bundle=control
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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
The wrong part of the code is:
#pragma HLS interface s_axilite port=arr bundle=control
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
#pragma HLS interface axis port=arr | 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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
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, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
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, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
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 Modulo(int a, int b, int& c) {
c = a - (b * (a / b));
}
```
|
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<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) >= in.range(1,... |
The wrong part of the code is:
priority = (in.range(3,2) >= in.range(1,0)) ? 3 :
(in.range(3,2) == in.range(1,0)) ? 2 :
1;
The right code snippet is:
priority = (in.range(3,2) > in.range(1,0)) ? 3 :
(in.range(3,2) == in.range... | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) >= in.range(1,0)) ?... |
The right code snippet is:
priority = (in.range(3,2) > in.range(1,0)) ? 3 :
(in.range(3,2) == in.range(1,0)) ? 2 :
1; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) >= ... |
The wrong part of the code is:
priority = (in.range(3,2) >= in.range(1,0)) ? 3 :
(in.range(3,2) == in.range(1,0)) ? 2 :
1;
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
priority = (in.range(3,2) >= in.range(1,0)) ? 3 :
(in.range(3,2) == in.range(1,0)) ? 2 :
1;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
priority = (in.range(3,2) > in.range(1,0)... | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
static ap_uint<4> johnson;
The right code snippet is:
static ap_uint<4> johnson = 1; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
static ap_uint<4> johnson = 1; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
static ap_uint<4> johnson;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
static ap_uint<4> johnson;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static ap_uint<4> johnson = 1; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
Q = johnson << 5;
The right code snippet is:
Q = johnson; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
Q = johnson; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
Q = johnson << 5;
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
Q = johnson << 5;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
Q = johnson; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
switch(johnson) {
case 1: johnson = 3; break;
case 3: johnson = 7; break;
case 7: johnson = 14; break;
case 14: johnson = 12; break;
case 12: johnson = 8; break;
}
The right code snippet is:
switch(johnson) {
case 1: joh... | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
switch(johnson) {
case 1: johnson = 3; break;
case 3: johnson = 7; break;
case 7: johnson = 14; break;
case 14: johnson = 12; break;
case 12: johnson = 8; break;
case 8: johnson = 1; break;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
switch(johnson) {
case 1: johnson = 3; break;
case 3: johnson = 7; break;
case 7: johnson = 14; break;
case 14: johnson = 12; break;
case 12: johnson = 8; break;
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
switch(johnson) {
case 1: johnson = 3; break;
case 3: johnson = 7; break;
case 7: johnson = 14; break;
case 14: johnson = 12; break;
case 12: johnson = 8; break;
}
The high-level-synthesis bug type of the code is: 'INF'
The righ... | 'INF' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.