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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
... |
The wrong part of the code is:
bool C4 = ~(S4[3] | S3[3]);
The right code snippet is:
bool C4 = ~(S4[3] & S3[3]); | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
#prag... |
The right code snippet is:
bool C4 = ~(S4[3] & S3[3]); | '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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
bool C4 = ~(S4[3] | S3[3]);
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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
The wrong part of the code is:
bool C4 = ~(S4[3] | S3[3]);
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
bool C4 = ~(S4[3] & S3[3]); | '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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
... |
The wrong part of the code is:
for (int i = 0; i < 4; i+=2) {
#pragma HLS UNROLL
S2[i] = ~(A[i] & B[i] & S1[i]);
S2[i+1] = ~(A[i+1] & B[i+1] & S1[i+1]);
}
The right code snippet is:
for (int i = 0; i < 4; i++) {
#pragma HLS UNROLL
S2[i] = ~(A[i] & B[i] & S1[i]);
} | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
#prag... |
The right code snippet is:
for (int i = 0; i < 4; i++) {
#pragma HLS UNROLL
S2[i] = ~(A[i] & B[i] & S1[i]);
} | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
for (int i = 0; i < 4; i+=2) {
#pragma HLS UNROLL
S2[i] = ~(A[i] & B[i] & S1[i]);
S2[i+1] = ~(A[i+1] & B[i+1] & S1[i+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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
The wrong part of the code is:
for (int i = 0; i < 4; i+=2) {
#pragma HLS UNROLL
S2[i] = ~(A[i] & B[i] & S1[i]);
S2[i+1] = ~(A[i+1] & B[i+1] & S1[i+1]);
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < 4; i++) {
#pragma HLS UNROLL
S2... | '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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
... |
The wrong part of the code is:
bool C1 = ~(S4[3] & S3[3] & 0);
The right code snippet is:
bool C1 = ~(S4[3] & S3[3] & Cin); | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
#prag... |
The right code snippet is:
bool C1 = ~(S4[3] & S3[3] & Cin); | '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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
bool C1 = ~(S4[3] & S3[3] & 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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
The wrong part of the code is:
bool C1 = ~(S4[3] & S3[3] & 0);
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
bool C1 = ~(S4[3] & S3[3] & Cin); | '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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
... |
The wrong part of the code is:
ap_uint<4> S5 = ~(S3 + (C3 << 1) + C2);
The right code snippet is:
ap_uint<4> S5 = ~(S4 + (C3 << 1) + C2); | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
#prag... |
The right code snippet is:
ap_uint<4> S5 = ~(S4 + (C3 << 1) + C2); | '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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
ap_uint<4> S5 = ~(S3 + (C3 << 1) + C2);
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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
The wrong part of the code is:
ap_uint<4> S5 = ~(S3 + (C3 << 1) + C2);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
ap_uint<4> S5 = ~(S4 + (C3 << 1) + C2); | '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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_fifo port=A
... |
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 | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_fifo port=A
#prag... |
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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_fif... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=A
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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=A
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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
... |
The wrong part of the code is:
#pragma HLS array_partition variable=S1 cyclic
The right code snippet is:
#pragma HLS array_partition variable=S1 complete | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
#prag... |
The right code snippet is:
#pragma HLS array_partition variable=S1 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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS array_partition variable=S1 cyclic
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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
The wrong part of the code is:
#pragma HLS array_partition variable=S1 cyclic
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=S1 complete | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
... |
The wrong part of the code is:
#pragma HLS array_partition variable=S1 complete dim=2
The right code snippet is:
#pragma HLS array_partition variable=S1 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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
#prag... |
The right code snippet is:
#pragma HLS array_partition variable=S1 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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS array_partition variable=S1 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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
The wrong part of the code is:
#pragma HLS array_partition variable=S1 complete dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=S1 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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
#prag... |
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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_fifo port=A
... |
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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_fifo port=A
#prag... |
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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_fif... |
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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=A random
The right code snippet is:
#pragma HLS INTERFACE m_axi port=A | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
#prag... |
The right code snippet is:
#pragma HLS INTERFACE m_axi 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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=A random
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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=A random
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS INTERFACE m_axi 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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE bram port=A
#pr... |
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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE bram port=A
#pragma ... |
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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE bram p... |
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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=A
The right code snippet is:
#pragma HLS INTERFACE bram port=A | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
#prag... |
The right code snippet is:
#pragma HLS INTERFACE bram 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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none 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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=A
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE bram 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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
#prag... |
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_non... |
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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
... |
The wrong part of the code is:
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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_none port=A
#prag... |
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:
```
#include <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Cout
) {
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
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 <hls_math.h>
void four_bit_adder(
const ap_uint<4> A,
const ap_uint<4> B,
const bool Cin,
ap_uint<4> &S,
bool &Co... |
The wrong part of the code is:
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:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
mux_out[4] = (sel == 0) ? in0[4] : (sel == 1) ? in1[4] : (sel == 2) ? in2[4] : in3[4];
The right code snippet is:
mux_out[3] = (sel == 0) ? in0[3] : (sel == 1) ? in1[3] : (sel == 2) ? in2[3] : in3[3]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
mux_out[3] = (sel == 0) ? in0[3] : (sel == 1) ? in1[3] : (sel == 2) ? in2[3] : in3[3]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
mux_out[4] = (sel == 0) ? in0[4] : (sel == 1) ? in1[4] : (sel == 2) ? in2[4] : in3[4];
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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
mux_out[4] = (sel == 0) ? in0[4] : (sel == 1) ? in1[4] : (sel == 2) ? in2[4] : in3[4];
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
mux_out[3] = (sel == 0) ? in0[3] : (sel == 1) ? in1[3] : (sel == 2) ? in2[3] : in3[3]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
int mux_out[4] = {0};
The right code snippet is:
int mux_out[4]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
int mux_out[4]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
int mux_out[4] = {0};
The high-level-synthesis bug type of the code is: INIT | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
int mux_out[4] = {0};
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
int mux_out[4]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
out[i] = (en == 1) ? (mux_out[i] << 5) : 0;
The right code snippet is:
out[i] = (en == 1) ? mux_out[i] : 0; | SHFT |
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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
out[i] = (en == 1) ? mux_out[i] : 0; | 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:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
out[i] = (en == 1) ? (mux_out[i] << 5) : 0;
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:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
out[i] = (en == 1) ? (mux_out[i] << 5) : 0;
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
out[i] = (en == 1) ? mux_out[i] : 0; | SHFT |
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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
out[i] = (en == 1) ? mux_out[i] : 0;
}
The right code snippet is:
for (int i = 0; i < 4; i++) {
out[i] = (en == 1) ? mux_out[i] : 0;
} | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
for (int i = 0; i < 4; i++) {
out[i] = (en == 1) ? mux_out[i] : 0;
} | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
out[i] = (en == 1) ? mux_out[i] : 0;
}
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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
out[i] = (en == 1) ? mux_out[i] : 0;
}
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
for (int i = 0; i < 4; i++) {
out[i] = (en == 1) ? mux_out[i] : 0;
} | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
char sel[2];
The right code snippet is:
int sel[2]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
int sel[2]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
char sel[2];
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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
char sel[2];
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
int sel[2]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
out[0] = (en == 1) ? mux_out[0] : 0;
out[1] = (en == 1) ? mux_out[1] : 0;
out[2] = (en == 1) ? mux_out[2] : 0;
out[3] = (en == 1) ? mux_out[3] : 0;
The right code snippet is:
for (int i = 0; i < 4; i++) {
out[i] = (en == 1) ? mux_out[i] : 0;
} | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
for (int i = 0; i < 4; i++) {
out[i] = (en == 1) ? mux_out[i] : 0;
} | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
out[0] = (en == 1) ? mux_out[0] : 0;
out[1] = (en == 1) ? mux_out[1] : 0;
out[2] = (en == 1) ? mux_out[2] : 0;
out[3] = (en == 1) ? mux_out[3] : 0;
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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
out[0] = (en == 1) ? mux_out[0] : 0;
out[1] = (en == 1) ? mux_out[1] : 0;
out[2] = (en == 1) ? mux_out[2] : 0;
out[3] = (en == 1) ? mux_out[3] : 0;
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
for (int i = 0; i < 4; i++) {
out[i] ... | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
int mux_out[4] = {1, 2, 3, 4};
The right code snippet is:
int mux_out[4]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
int mux_out[4]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
int mux_out[4] = {1, 2, 3, 4};
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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
int mux_out[4] = {1, 2, 3, 4};
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
int mux_out[4]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
int in0[2], int in1[2], int in2[2], int in3[2];
The right code snippet is:
int in0[4], int in1[4], int in2[4], int in3[4]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
int in0[4], int in1[4], int in2[4], int in3[4]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
int in0[2], int in1[2], int in2[2], int in3[2];
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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
int in0[2], int in1[2], int in2[2], int in3[2];
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
int in0[4], int in1[4], int in2[4], int in3[4]; | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mux_out cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mux_out complete dim=1 | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mux_out complete dim=1 | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mux_out cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: APT | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mux_out cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mux_out complete dim=1 | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mux_out cyclic factor=5 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mux_out complete dim=1 | 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_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mux_out complete 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:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mux_out cyclic factor=5 dim=1
The high-level-synthesis bug type of the code is: FND | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mux_out cyclic factor=5 dim=1
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mux_out complete 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:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mux_out cyclic factor=2 dim=2
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mux_out 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:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mux_out 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:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mux_out 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:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mux_out 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=mux_out complete dim=1 | DID |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.