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:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=OUT1 cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS array_partition variable=OUT1 cyclic factor=2 dim=1 | FND |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The right code snippet is:
#pragma HLS array_partition variable=OUT1 cyclic factor=2 dim=1 | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=OUT1 cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: FND | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1... |
The wrong part of the code is:
#pragma HLS array_partition variable=OUT1 cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS array_partition variable=OUT1 cyclic factor=2 dim=1 | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=OUT1 cyclic factor=2 dim=2
The right code snippet is:
#pragma HLS array_partition variable=OUT1 cyclic factor=2 dim=1 | DID |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The right code snippet is:
#pragma HLS array_partition variable=OUT1 cyclic factor=2 dim=1 | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=OUT1 cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: DID | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1... |
The wrong part of the code is:
#pragma HLS array_partition variable=OUT1 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=OUT1 cyclic factor=2 dim=1 | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The wrong part of the code is:
#pragma HLS dataflow pipeline II=2
The right code snippet is:
#pragma HLS dataflow | DFP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The right code snippet is:
#pragma HLS dataflow | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
... |
The wrong part of the code is:
#pragma HLS dataflow pipeline II=2
The high-level-synthesis bug type of the code is: DFP | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1... |
The wrong part of the code is:
#pragma HLS dataflow pipeline II=2
The high-level-synthesis bug type of the code is: DFP
The right code snippet is:
#pragma HLS dataflow | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=OUT1
The right code snippet is:
#pragma HLS interface ap_none port=OUT1 | IDAP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The right code snippet is:
#pragma HLS interface ap_none port=OUT1 | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=OUT1
The high-level-synthesis bug type of the code is: IDAP | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=OUT1
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
#pragma HLS interface ap_none port=OUT1 | IDAP |
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 bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=OUT1 offset=slave
The right code snippet is:
#pragma HLS interface m_axi port=OUT1 | RAMB |
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 bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The right code snippet is:
#pragma HLS interface m_axi port=OUT1 | 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:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=OUT1 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:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1... |
The wrong part of the code is:
#pragma HLS interface m_axi port=OUT1 offset=slave
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
#pragma HLS interface m_axi port=OUT1 | RAMB |
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 bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The wrong part of the code is:
#pragma HLS interface bram port=OUT1
The right code snippet is:
#pragma HLS interface ap_fifo port=OUT1 | SMA |
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 bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The right code snippet is:
#pragma HLS interface ap_fifo port=OUT1 | 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:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
... |
The wrong part of the code is:
#pragma HLS interface bram port=OUT1
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:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1... |
The wrong part of the code is:
#pragma HLS interface bram port=OUT1
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
#pragma HLS interface ap_fifo port=OUT1 | SMA |
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 bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=OUT1
The right code snippet is:
#pragma HLS interface ap_none port=OUT1 | AMS |
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 bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The right code snippet is:
#pragma HLS interface ap_none port=OUT1 | 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:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=OUT1
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:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=OUT1
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
#pragma HLS interface ap_none port=OUT1 | 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>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
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:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
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:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
... |
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:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1... |
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:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The wrong part of the code is:
case 9:
for (int i = 0; i < 2; i++) {
OUT1 = 2;
OUT2 = 1;
}
break;
The right code snippet is:
case 9:
OUT1 = 2;
OUT2 = 1;
break; | ILNU |
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 bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
break;
... |
The right code snippet is:
case 9:
OUT1 = 2;
OUT2 = 1;
break; | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1 = 0;
OUT2 = 0;
... |
The wrong part of the code is:
case 9:
for (int i = 0; i < 2; i++) {
OUT1 = 2;
OUT2 = 1;
}
break;
The high-level-synthesis bug type of the code is: ILNU | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void bcd_code(ap_uint<4> A, ap_uint<4>& OUT1, ap_uint<4>& OUT2) {
switch (A) {
case 0:
OUT1... |
The wrong part of the code is:
case 9:
for (int i = 0; i < 2; i++) {
OUT1 = 2;
OUT2 = 1;
}
break;
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
case 9:
OUT1 = 2;
OUT2 = 1;
break; | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
i... |
The wrong part of the code is:
if (in[4] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[3] == 1) {
out[1] = 1;
} else if (in[2] == 1) {
out[0] = 1;
}
The right code snippet is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[2] == 1) {
out[1] = 1;
} else if (in[1] == ... | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
if (in... |
The right code snippet is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[2] == 1) {
out[1] = 1;
} else if (in[1] == 1) {
out[0] = 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:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;... |
The wrong part of the code is:
if (in[4] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[3] == 1) {
out[1] = 1;
} else if (in[2] == 1) {
out[0] = 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:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out... |
The wrong part of the code is:
if (in[4] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[3] == 1) {
out[1] = 1;
} else if (in[2] == 1) {
out[0] = 1;
}
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
}... | '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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
i... |
The wrong part of the code is:
int a;
out[0] = a;
out[1] = a;
The right code snippet is:
out[0] = 0;
out[1] = 0; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
if (in... |
The right code snippet is:
out[0] = 0;
out[1] = 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:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;... |
The wrong part of the code is:
int a;
out[0] = a;
out[1] = a;
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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out... |
The wrong part of the code is:
int a;
out[0] = a;
out[1] = a;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
out[0] = 0;
out[1] = 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:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
i... |
The wrong part of the code is:
if (in[3] == 1) {
out[1] = 1 << 2;
out[0] = 1 << 3;
} else if (in[2] == 1) {
out[1] = 1 << 4;
} else if (in[1] == 1) {
out[0] = 1 << 5;
}
The right code snippet is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[2] == 1) {
out[1] = 1;
... | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
if (in... |
The right code snippet is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[2] == 1) {
out[1] = 1;
} else if (in[1] == 1) {
out[0] = 1;
} | '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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;... |
The wrong part of the code is:
if (in[3] == 1) {
out[1] = 1 << 2;
out[0] = 1 << 3;
} else if (in[2] == 1) {
out[1] = 1 << 4;
} else if (in[1] == 1) {
out[0] = 1 << 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:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out... |
The wrong part of the code is:
if (in[3] == 1) {
out[1] = 1 << 2;
out[0] = 1 << 3;
} else if (in[2] == 1) {
out[1] = 1 << 4;
} else if (in[1] == 1) {
out[0] = 1 << 5;
}
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
if (in[3] == 1) {
out[1] =... | '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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
i... |
The wrong part of the code is:
while(1){
//infinite loop
}
The right code snippet is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[2] == 1) {
out[1] = 1;
} else if (in[1] == 1) {
out[0] = 1;
} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
if (in... |
The right code snippet is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[2] == 1) {
out[1] = 1;
} else if (in[1] == 1) {
out[0] = 1;
} | '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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;... |
The wrong part of the code is:
while(1){
//infinite loop
}
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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out... |
The wrong part of the code is:
while(1){
//infinite loop
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[2] == 1) {
out[1] = 1;
} else if (in[1] == 1) {
out[0] = 1;
} | '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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
i... |
The wrong part of the code is:
if ((unsigned int)in[3] == 1) {
out[1] = (unsigned int)1;
out[0] = (unsigned int)1;
} else if ((unsigned int)in[2] == 1) {
out[1] = (unsigned int)1;
} else if ((unsigned int)in[1] == 1) {
out[0] = (unsigned int)1;
}
The right code snippet is:
if (in[3] == ... | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
if (in... |
The right code snippet is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[2] == 1) {
out[1] = 1;
} else if (in[1] == 1) {
out[0] = 1;
} | '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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;... |
The wrong part of the code is:
if ((unsigned int)in[3] == 1) {
out[1] = (unsigned int)1;
out[0] = (unsigned int)1;
} else if ((unsigned int)in[2] == 1) {
out[1] = (unsigned int)1;
} else if ((unsigned int)in[1] == 1) {
out[0] = (unsigned int)1;
}
The high-level-synthesis bug type of the cod... | '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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out... |
The wrong part of the code is:
if ((unsigned int)in[3] == 1) {
out[1] = (unsigned int)1;
out[0] = (unsigned int)1;
} else if ((unsigned int)in[2] == 1) {
out[1] = (unsigned int)1;
} else if ((unsigned int)in[1] == 1) {
out[0] = (unsigned int)1;
}
The high-level-synthesis bug type of the cod... | '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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
i... |
The wrong part of the code is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[2] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[1] == 1) {
out[0] = 1;
out[1] = 1;
}
The right code snippet is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[2] == 1) {
... | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
if (in... |
The right code snippet is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[2] == 1) {
out[1] = 1;
} else if (in[1] == 1) {
out[0] = 1;
} | '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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;... |
The wrong part of the code is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[2] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[1] == 1) {
out[0] = 1;
out[1] = 1;
}
The high-level-synthesis bug type of the code is: 'MLU' | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out... |
The wrong part of the code is:
if (in[3] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[2] == 1) {
out[1] = 1;
out[0] = 1;
} else if (in[1] == 1) {
out[0] = 1;
out[1] = 1;
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
if (in[3] == 1) {
... | '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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
i... |
The wrong part of the code is:
out[0] = 0;
out[1] = 1;
The right code snippet is:
out[0] = 0;
out[1] = 0; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;
if (in... |
The right code snippet is:
out[0] = 0;
out[1] = 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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out
out[0] = 0;
out[1] = 0;... |
The wrong part of the code is:
out[0] = 0;
out[1] = 1;
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 priority_encoder (int in[4], int out[2]) {
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=out... |
The wrong part of the code is:
out[0] = 0;
out[1] = 1;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
out[0] = 0;
out[1] = 0; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE a... |
The wrong part of the code is:
count[5]++;
The right code snippet is:
count++; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
count++; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS ... |
The wrong part of the code is:
count[5]++;
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
count[5]++;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
count++; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE a... |
The wrong part of the code is:
ap_uint<4> &count = 1;
The right code snippet is:
ap_uint<4> &count; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
ap_uint<4> &count; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS ... |
The wrong part of the code is:
ap_uint<4> &count = 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
ap_uint<4> &count = 1;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<4> &count; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE a... |
The wrong part of the code is:
if (en) {
while(true) {
count++;
}
}
The right code snippet is:
if (en) {
count++;
} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (en) {
count++;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS ... |
The wrong part of the code is:
if (en) {
while(true) {
count++;
}
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
if (en) {
while(true) {
count++;
}
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (en) {
count++;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE a... |
The wrong part of the code is:
signed bool clk, bool rst, bool en, ap_uint<4> &count
The right code snippet is:
bool clk, bool rst, bool en, ap_uint<4> &count | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
bool clk, bool rst, bool en, ap_uint<4> &count | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS ... |
The wrong part of the code is:
signed bool clk, bool rst, bool en, ap_uint<4> &count
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
signed bool clk, bool rst, bool en, ap_uint<4> &count
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
bool clk, bool rst, bool en, ap_uint<4> &count | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE a... |
The wrong part of the code is:
if (en) {
count++;
count++;
}
The right code snippet is:
if (en) {
count++;
} | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (en) {
count++;
} | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS ... |
The wrong part of the code is:
if (en) {
count++;
count++;
}
The high-level-synthesis bug type of the code is: 'MLU' | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
if (en) {
count++;
count++;
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
if (en) {
count++;
} | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE a... |
The wrong part of the code is:
ap_uint<4> &count = 0;
The right code snippet is:
ap_uint<4> &count; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
ap_uint<4> &count; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS ... |
The wrong part of the code is:
ap_uint<4> &count = 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
ap_uint<4> &count = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<4> &count; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE a... |
The wrong part of the code is:
memcpy(dst, src+size/2, size);
The right code snippet is:
memcpy(dst, src, size); | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
memcpy(dst, src, size); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS ... |
The wrong part of the code is:
memcpy(dst, src+size/2, size);
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
memcpy(dst, src+size/2, size);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
memcpy(dst, src, size); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS array_partition variable=count cyclic dim=0
The right code snippet is:
#pragma HLS array_partition variable=count complete dim=0 | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
#pragma HLS array_partition variable=count complete dim=0 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS array_partition variable=count cyclic dim=0
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS array_partition variable=count cyclic dim=0
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=count complete dim=0 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS array_partition variable=count complete dim=1
The right code snippet is:
#pragma HLS array_partition variable=count complete dim=0 | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
#pragma HLS array_partition variable=count complete dim=0 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=en
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS array_partition variable=count complete dim=1
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS array_partition variable=count complete dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=count complete dim=0 | 'FND' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.