instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void pre_decoder(
ap_uint<6> addr_i,
bool &pre_dec_o,
bool &pre_dec_err_o
) {
#pragma HLS INTERFACE ap_none port=addr_i
#pragma HLS INTERFACE ap_none port=pre_d... |
The wrong part of the code is:
int pre_dec_err = false;
The right code snippet is:
bool pre_dec_err = false; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void pre_decoder(
ap_uint<6> addr_i,
bool &pre_dec_o,
bool &pre_dec_err_o
) {
#pragma HLS INTERFACE ap_none port=addr_i
#pragma HLS INTERFACE ap_none port=pre_dec_o
... |
The right code snippet is:
bool pre_dec_err = false; | '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 pre_decoder(
ap_uint<6> addr_i,
bool &pre_dec_o,
bool &pre_dec_err_o
) {
#pragma HLS INTERFACE ap_none port=addr_i
#pragma HLS INTERFACE ap_none... |
The wrong part of the code is:
int pre_dec_err = false;
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 pre_decoder(
ap_uint<6> addr_i,
bool &pre_dec_o,
bool &pre_dec_err_o
) {
#pragma HLS INTERFACE ap_none port=add... |
The wrong part of the code is:
int pre_dec_err = false;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
bool pre_dec_err = false; | '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 pre_decoder(
ap_uint<6> addr_i,
bool &pre_dec_o,
bool &pre_dec_err_o
) {
#pragma HLS INTERFACE ap_none port=addr_i
#pragma HLS INTERFACE ap_none port=pre_d... |
The wrong part of the code is:
bool pre_dec = 0;
The right code snippet is:
bool pre_dec = false; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void pre_decoder(
ap_uint<6> addr_i,
bool &pre_dec_o,
bool &pre_dec_err_o
) {
#pragma HLS INTERFACE ap_none port=addr_i
#pragma HLS INTERFACE ap_none port=pre_dec_o
... |
The right code snippet is:
bool pre_dec = false; | '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 pre_decoder(
ap_uint<6> addr_i,
bool &pre_dec_o,
bool &pre_dec_err_o
) {
#pragma HLS INTERFACE ap_none port=addr_i
#pragma HLS INTERFACE ap_none... |
The wrong part of the code is:
bool pre_dec = 0;
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void pre_decoder(
ap_uint<6> addr_i,
bool &pre_dec_o,
bool &pre_dec_err_o
) {
#pragma HLS INTERFACE ap_none port=add... |
The wrong part of the code is:
bool pre_dec = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
bool pre_dec = false; | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE... |
The wrong part of the code is:
ap_uint<2> result;
The right code snippet is:
result = 0; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_c... |
The right code snippet is:
result = 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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HL... |
The wrong part of the code is:
ap_uint<2> result;
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS ... |
The wrong part of the code is:
ap_uint<2> result;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
result = 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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE... |
The wrong part of the code is:
result = (ap_int<2>)A > (ap_int<2>)B;
The right code snippet is:
result = 1; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_c... |
The right code snippet is:
result = 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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HL... |
The wrong part of the code is:
result = (ap_int<2>)A > (ap_int<2>)B;
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS ... |
The wrong part of the code is:
result = (ap_int<2>)A > (ap_int<2>)B;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
result = 1; | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE... |
The wrong part of the code is:
while (1) {}
The right code snippet is:
result = 2; | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_c... |
The right code snippet is:
result = 2; | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HL... |
The wrong part of the code is:
while (1) {}
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS ... |
The wrong part of the code is:
while (1) {}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
result = 2; | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
if (A[i] == B[i]) {
result[i] = 0;
} else if (A[i] > B[i]) {
result[i] = 1;
} else {
result[i] = 2;
}
}
The right code snippet is:
if (A == B) { | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_c... |
The right code snippet is:
if (A == B) { | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HL... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
if (A[i] == B[i]) {
result[i] = 0;
} else if (A[i] > B[i]) {
result[i] = 1;
} else {
result[i] = 2;
}
}
The high-level-synthesis bug type of the code is: 'ILNU' | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS ... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
if (A[i] == B[i]) {
result[i] = 0;
} else if (A[i] > B[i]) {
result[i] = 1;
} else {
result[i] = 2;
}
}
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
if (A == B) { | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=3
#pragma HLS INTERFACE ap_none port=B
#pr... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=3
The right code snippet is:
#pragma HLS INTERFACE ap_none port=A | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=3
#pragma HLS INTERFACE ap_none port=B
#pragma ... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=A | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=3
#pragma HLS INTERFACE ap_none p... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=3
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS ARRAY_PARTITION variable=A cyclic facto... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=3
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=A | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE m_axi port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=A
The right code snippet is:
#pragma HLS INTERFACE ap_none port=A | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE m_axi port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_ctr... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=A | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE m_axi port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=A
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE m_axi port=A
#pragma HLS IN... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=A
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=A | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#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=result
The right code snippet is:
#pragma HLS INTERFACE ap_none port=result | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_c... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=result | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HL... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=result
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=result
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=result | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=A
The right code snippet is:
#pragma HLS INTERFACE ap_none port=A | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_c... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=A | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HL... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=A
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=A
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=A | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE... |
The wrong part of the code is:
if (A[3] == B[3]) {
The right code snippet is:
if (A == B) { | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_c... |
The right code snippet is:
if (A == B) { | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HL... |
The wrong part of the code is:
if (A[3] == B[3]) {
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS ... |
The wrong part of the code is:
if (A[3] == B[3]) {
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
if (A == B) { | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#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 dataflow invalid
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_c... |
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HL... |
The wrong part of the code is:
#pragma HLS dataflow invalid
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS dataflow invalid
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result = 0;
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTE... |
The wrong part of the code is:
ap_uint<2> &result = 0;
The right code snippet is:
ap_uint<2> &result | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result = 0;
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE... |
The right code snippet is:
ap_uint<2> &result | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result = 0;
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#prag... |
The wrong part of the code is:
ap_uint<2> &result = 0;
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result = 0;
) {
#pragma HLS INTERFACE ap_none port=A
#pragma... |
The wrong part of the code is:
ap_uint<2> &result = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<2> &result | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#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 dataflow invalid
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_c... |
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HL... |
The wrong part of the code is:
#pragma HLS dataflow invalid
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS dataflow invalid
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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS pipeline II=2
}
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS pipeline II=2
}
The right code snippet is:
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) { | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS pipeline II=2
}
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) { | '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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS pipeline II=2
}
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#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 mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS pipeline II=2
}
#pragma HLS INTERFACE... |
The wrong part of the code is:
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
) {
#pragma HLS pipeline II=2
}
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
void mag_comparator (
ap_uint<3> A,
ap_uint<3> B,
ap_uint<2> &result
)... | '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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_u... |
The wrong part of the code is:
data1_reg = regfile[rs1_reg+1];
data2_reg = regfile[rs2_reg-1];
The right code snippet is:
data1_reg = regfile[rs1_reg];
data2_reg = regfile[rs2_reg]; | '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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_uint<3... |
The right code snippet is:
data1_reg = regfile[rs1_reg];
data2_reg = regfile[rs2_reg]; | '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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> ... |
The wrong part of the code is:
data1_reg = regfile[rs1_reg+1];
data2_reg = regfile[rs2_reg-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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5... |
The wrong part of the code is:
data1_reg = regfile[rs1_reg+1];
data2_reg = regfile[rs2_reg-1];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
data1_reg = regfile[rs1_reg];
data2_reg = regfile[rs2_reg]; | '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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_u... |
The wrong part of the code is:
ap_uint<32> data1_reg = 0;
ap_uint<32> data2_reg = 0;
data1_reg = data1_reg + 1;
The right code snippet is:
ap_uint<32> data1_reg;
ap_uint<32> data2_reg; | '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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_uint<3... |
The right code snippet is:
ap_uint<32> data1_reg;
ap_uint<32> data2_reg; | '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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> ... |
The wrong part of the code is:
ap_uint<32> data1_reg = 0;
ap_uint<32> data2_reg = 0;
data1_reg = data1_reg + 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:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5... |
The wrong part of the code is:
ap_uint<32> data1_reg = 0;
ap_uint<32> data2_reg = 0;
data1_reg = data1_reg + 1;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<32> data1_reg;
ap_uint<32> data2_reg; | '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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_u... |
The wrong part of the code is:
result_reg = data1_reg << 33;
The right code snippet is:
result_reg = data1_reg & data2_reg; | '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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_uint<3... |
The right code snippet is:
result_reg = data1_reg & data2_reg; | '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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> ... |
The wrong part of the code is:
result_reg = data1_reg << 33;
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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5... |
The wrong part of the code is:
result_reg = data1_reg << 33;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
result_reg = data1_reg & data2_reg; | '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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_u... |
The wrong part of the code is:
while (data1_reg == data2_reg) {
// some code here
}
The right code snippet is:
while (1) {
// some code here
} | '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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_uint<3... |
The right code snippet is:
while (1) {
// some code here
} | '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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> ... |
The wrong part of the code is:
while (data1_reg == data2_reg) {
// some code here
}
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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5... |
The wrong part of the code is:
while (data1_reg == data2_reg) {
// some code here
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
while (1) {
// some code here
} | 'INF' |
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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_u... |
The wrong part of the code is:
ap_int<8> x = -128;
ap_uint<8> y = x;
The right code snippet is:
ap_int<8> x = 128;
ap_uint<8> y = x; | 'USE' |
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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_uint<3... |
The right code snippet is:
ap_int<8> x = 128;
ap_uint<8> y = x; | '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:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> ... |
The wrong part of the code is:
ap_int<8> x = -128;
ap_uint<8> y = x;
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:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5... |
The wrong part of the code is:
ap_int<8> x = -128;
ap_uint<8> y = x;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_int<8> x = 128;
ap_uint<8> y = x; | 'USE' |
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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_u... |
The wrong part of the code is:
for (int i = 0; i < 7; i++) {
// some code here
}
for (int i = 7; i < 8; i++) {
// some code here
}
The right code snippet is:
for (int i = 0; i < 8; i++) {
// some code here
} | 'MLU' |
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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_uint<3... |
The right code snippet is:
for (int i = 0; i < 8; i++) {
// some code here
} | '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:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> ... |
The wrong part of the code is:
for (int i = 0; i < 7; i++) {
// some code here
}
for (int i = 7; i < 8; i++) {
// some code here
}
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:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5... |
The wrong part of the code is:
for (int i = 0; i < 7; i++) {
// some code here
}
for (int i = 7; i < 8; i++) {
// some code here
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < 8; i++) {
// some code here
} | 'MLU' |
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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_u... |
The wrong part of the code is:
ap_uint<32> data1_reg;
The right code snippet is:
ap_uint<32> data1_reg = 0; | 'ZERO' |
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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_uint<3... |
The right code snippet is:
ap_uint<32> data1_reg = 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:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> ... |
The wrong part of the code is:
ap_uint<32> data1_reg;
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:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5... |
The wrong part of the code is:
ap_uint<32> data1_reg;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<32> data1_reg = 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:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_u... |
The wrong part of the code is:
memcpy(buffer1 + 512, buffer2, 1024);
The right code snippet is:
memcpy(buffer1, buffer2, 1024); | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_uint<3... |
The right code snippet is:
memcpy(buffer1, buffer2, 1024); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> ... |
The wrong part of the code is:
memcpy(buffer1 + 512, buffer2, 1024);
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5... |
The wrong part of the code is:
memcpy(buffer1 + 512, buffer2, 1024);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
memcpy(buffer1, buffer2, 1024); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_u... |
The wrong part of the code is:
#pragma HLS array_partition variable=regfile cyclic
The right code snippet is:
#pragma HLS array_partition variable=regfile complete | 'APT' |
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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_uint<3... |
The right code snippet is:
#pragma HLS array_partition variable=regfile 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:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> ... |
The wrong part of the code is:
#pragma HLS array_partition variable=regfile 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:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5... |
The wrong part of the code is:
#pragma HLS array_partition variable=regfile cyclic
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=regfile 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:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_u... |
The wrong part of the code is:
#pragma HLS array_partition variable=regfile factor=3
The right code snippet is:
#pragma HLS array_partition variable=regfile complete | '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 pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> data2, ap_uint<3... |
The right code snippet is:
#pragma HLS array_partition variable=regfile complete | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5> rd, ap_uint<32> data1, ap_uint<32> ... |
The wrong part of the code is:
#pragma HLS array_partition variable=regfile 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:
#include <ap_int.h>
void pipeline(ap_uint<1> reset, ap_uint<8> instruction, ap_uint<3> stage, ap_uint<5> rs1, ap_uint<5> rs2, ap_uint<5... |
The wrong part of the code is:
#pragma HLS array_partition variable=regfile factor=3
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=regfile complete | 'FND' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.