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>
#pragma HLS interface ap_ctrl_none port=return
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
CLK... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_none port=return
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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>
#pragma HLS interface ap_ctrl_none port=return
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
CLK_EN =... |
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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>
#pragma HLS interface ap_ctrl_none port=return
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_E... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_none port=return
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
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>
#pragma HLS interface ap_ctrl_none port=return
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_none port=return
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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>
#pragma HLS interface m_axi depth=1024 port=ENCLK offset=slave bundle=my_interface
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=1024 port=ENCLK offset=slave bundle=my_interface
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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>
#pragma HLS interface m_axi depth=1024 port=ENCLK offset=slave bundle=my_interface
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> sta... |
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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>
#pragma HLS interface m_axi depth=1024 port=ENCLK offset=slave bundle=my_interface
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=1024 port=ENCLK offset=slave bundle=my_interface
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
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>
#pragma HLS interface m_axi depth=1024 port=ENCLK offset=slave bundle=my_interface
void clock_gate(
bool CLK,
b... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=1024 port=ENCLK offset=slave bundle=my_interface
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
void clock_gate(
bool CLK,
boo... | 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>
#pragma HLS interface axis port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
CLK_EN = EN ... |
The wrong part of the code is:
#pragma HLS interface axis port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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>
#pragma HLS interface axis port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
CLK_EN = EN & sta... |
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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>
#pragma HLS interface axis port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
C... |
The wrong part of the code is:
#pragma HLS interface axis port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
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>
#pragma HLS interface axis port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uin... |
The wrong part of the code is:
#pragma HLS interface axis port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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>
#pragma HLS interface s_axilite port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
CLK_EN ... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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>
#pragma HLS interface s_axilite port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
CLK_EN = EN ... |
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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>
#pragma HLS interface s_axilite port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
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>
#pragma HLS interface s_axilite port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
a... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=ENCLK
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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>
#pragma HLS pipeline II=2
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
CLK_EN = EN & state[1];
... |
The wrong part of the code is:
#pragma HLS pipeline II=2
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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>
#pragma HLS pipeline II=2
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
CLK_EN = EN & state[1];
if... |
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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>
#pragma HLS pipeline II=2
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
CLK_EN = EN &... |
The wrong part of the code is:
#pragma HLS pipeline II=2
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
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>
#pragma HLS pipeline II=2
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state =... |
The wrong part of the code is:
#pragma HLS pipeline II=2
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
The high-level-synthesis bug type of the code is: MLP
The right code snippet is:
void clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) { | 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 clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
CLK_EN = EN & state[1];
if (CLK_EN) {
if (s... |
The wrong part of the code is:
case 2: // TEST ENABLED
if (TE) {
state = 1; // ENABLED
}
else {
state = 2; // TEST ENABLED
}
break;
The right code snippet is:
case 2: // TEST ENABLED
if (!TE) {
state = 1; // ENABLED
}... | 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 clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
CLK_EN = EN & state[1];
if (CLK_EN) {
if (state ... |
The right code snippet is:
case 2: // TEST ENABLED
if (!TE) {
state = 1; // ENABLED
}
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 clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
CLK_EN = EN & state[1];
if (CLK_EN) ... |
The wrong part of the code is:
case 2: // TEST ENABLED
if (TE) {
state = 1; // ENABLED
}
else {
state = 2; // TEST ENABLED
}
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 clock_gate(
bool CLK,
bool EN,
bool TE,
bool &ENCLK
) {
ap_uint<2> state = 0;
bool CLK_EN;
CL... |
The wrong part of the code is:
case 2: // TEST ENABLED
if (TE) {
state = 1; // ENABLED
}
else {
state = 2; // TEST ENABLED
}
break;
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
case 2: // TEST ENABLED
... | 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
R[5] = tmp % 2;
The right code snippet is:
R[i] = tmp % 2; | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
R[i] = tmp % 2; | 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
R[5] = tmp % 2;
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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
R[5] = tmp % 2;
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
R[i] = tmp % 2; | 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
int tmp;
The right code snippet is:
int tmp = 0; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
int tmp = 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
int tmp;
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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
int tmp;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
int tmp = 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
tmp = tmp >> 5;
The right code snippet is:
tmp = tmp / 2; | SHFT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
tmp = tmp / 2; | 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
tmp = tmp >> 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
tmp = tmp >> 5;
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
tmp = tmp / 2; | 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
for (int i = 0; i >= 0; i--) {
The right code snippet is:
for (int i = 0; i < 4; i++) { | INF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
for (int i = 0; i < 4; i++) { | 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
for (int i = 0; i >= 0; i--) {
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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
for (int i = 0; i >= 0; i--) {
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
for (int i = 0; i < 4; i++) { | 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
Cout = (unsigned int)A[i] < B[i] ? 0 : 1;
The right code snippet is:
Cout = (A[i] < B[i]) ? 0 : 1; | USE |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
Cout = (A[i] < B[i]) ? 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
Cout = (unsigned int)A[i] < B[i] ? 0 : 1;
The high-level-synthesis bug type of the code is: USE | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
Cout = (unsigned int)A[i] < B[i] ? 0 : 1;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
Cout = (A[i] < B[i]) ? 0 : 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
#pragma HLS unroll factor(2)
for (int i = 0; i < 4; i++) {
The right code snippet is:
for (int i = 0; i < 4; i++) { | MLU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
for (int i = 0; i < 4; 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:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
#pragma HLS unroll factor(2)
for (int i = 0; i < 4; i++) {
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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS unroll factor(2)
for (int i = 0; i < 4; i++) {
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
for (int i = 0; i < 4; 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:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
int tmp = 1;
The right code snippet is:
int tmp = 0; | ZERO |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
int tmp = 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
int tmp = 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
int tmp = 1;
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
int tmp = 0; | ZERO |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
R[i] = A[i + 4] - B[i + 4];
The right code snippet is:
R[i] = A[i] - B[i]; | BUF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
R[i] = A[i] - B[i]; | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
R[i] = A[i + 4] - B[i + 4];
The high-level-synthesis bug type of the code is: BUF | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
R[i] = A[i + 4] - B[i + 4];
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
R[i] = A[i] - B[i]; | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=2 dim=2
The right code snippet is:
#pragma HLS array_partition variable=A cyclic factor=2 dim=1 | APT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
#pragma HLS array_partition variable=A cyclic factor=2 dim=1 | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=2 dim=2
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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pragma HLS array_partition variable=A cyclic factor=2 dim=1 | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS array_partition variable=A 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:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
#pragma HLS array_partition variable=A 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:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
#pragma HLS array_partition variable=A 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:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS array_partition variable=A 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=A 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:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=2 dim=2
The right code snippet is:
#pragma HLS array_partition variable=A 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:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
#pragma HLS array_partition variable=A 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:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
#pragma HLS array_partition variable=A 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:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS array_partition variable=A 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=A 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:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
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:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
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:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
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:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=A,B,C,R,Cout
The right code snippet is:
#pragma HLS interface ap_none port=A,B,C,R,Cout | IDAP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
#pragma HLS interface ap_none port=A,B,C,R,Cout | 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=A,B,C,R,Cout
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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=A,B,C,R,Cout
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
#pragma HLS interface ap_none port=A,B,C,R,Cout | 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
#pragma HLS interface m_axi port=A,B,C,R,Cout offset=slave
The right code snippet is:
#pragma HLS interface m_axi port=A,B,C,R,Cout | RAMB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
#pragma HLS interface m_axi port=A,B,C,R,Cout | 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=A,B,C,R,Cout offset=slave
The high-level-synthesis bug type of the code is: RAMB | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS interface m_axi port=A,B,C,R,Cout offset=slave
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
#pragma HLS interface m_axi port=A,B,C,R,Cout | 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
#pragma HLS interface bram port=A,B,C,R,Cout
The right code snippet is:
#pragma HLS interface ap_none port=A,B,C,R,Cout | SMA |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
#pragma HLS interface ap_none port=A,B,C,R,Cout | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
#pragma HLS interface bram port=A,B,C,R,Cout
The high-level-synthesis bug type of the code is: SMA | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS interface bram port=A,B,C,R,Cout
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
#pragma HLS interface ap_none port=A,B,C,R,Cout | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=A,B,C,R,Cout
The right code snippet is:
#pragma HLS interface ap_none port=A,B,C,R,Cout | AMS |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
#pragma HLS interface ap_none port=A,B,C,R,Cout | 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=A,B,C,R,Cout
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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=A,B,C,R,Cout
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
#pragma HLS interface ap_none port=A,B,C,R,Cout | 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 addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
#pragma HLS pipeline | MLP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
#pragma HLS pipeline | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: MLP | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: MLP
The right code snippet is:
#pragma HLS pipeline | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1... |
The wrong part of the code is:
#pragma HLS unroll(full)
for (int i = 0; i < 4; i++) {
The right code snippet is:
for (int i = 0; i < 4; i++) { | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
if (C == 1) {
... |
The right code snippet is:
for (int i = 0; i < 4; i++) { | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
#pragma HLS unroll(full)
for (int i = 0; i < 4; i++) {
The high-level-synthesis bug type of the code is: ILNU | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
void addsub(int A[4], int B[4], int C, int R[4], int& Cout) {
#pragma HLS INTERFACE ap_none port=A,B,C,R,Cout
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS unroll(full)
for (int i = 0; i < 4; i++) {
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
for (int i = 0; i < 4; i++) { | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=din1
#pragma HLS INTERFACE ap_none port=din2
#pragma HLS INTERFACE ap_none port=din3
#pragma HLS INTERFACE ap_none port=din4
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
ap_uint<8> mux_1_0 = (sel[2] == 0) ? din1 : din2;
The right code snippet is:
ap_uint<8> mux_1_0 = (sel[0] == 0) ? din1 : din2; | '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=din1
#pragma HLS INTERFACE ap_none port=din2
#pragma HLS INTERFACE ap_none port=din3
#pragma HLS INTERFACE ap_none port=din4
#pragma HLS INTERFACE ap_none... |
The right code snippet is:
ap_uint<8> mux_1_0 = (sel[0] == 0) ? din1 : din2; | '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=din1
#pragma HLS INTERFACE ap_none port=din2
#pragma HLS INTERFACE ap_none port=din3
#pragma HLS INTERFACE ap_none port=din4
#pragma HLS I... |
The wrong part of the code is:
ap_uint<8> mux_1_0 = (sel[2] == 0) ? din1 : din2;
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=din1
#pragma HLS INTERFACE ap_none port=din2
#pragma HLS INTERFACE ap_none port=din3
#pragma HLS INTE... |
The wrong part of the code is:
ap_uint<8> mux_1_0 = (sel[2] == 0) ? din1 : din2;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
ap_uint<8> mux_1_0 = (sel[0] == 0) ? din1 : din2; | 'OOB' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.