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 mux4to1(bool in0, bool in1, bool in2, bool in3, ap_uint<2> sel, bool& out) {
switch(sel) {
case 0: out = in0; break;
case 1: out = in1; break;
case 2: ... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=in
The right code snippet is:
No suitable snippet found. | AMS |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void mux4to1(bool in0, bool in1, bool in2, bool in3, ap_uint<2> sel, bool& out) {
switch(sel) {
case 0: out = in0; break;
case 1: out = in1; break;
case 2: out =... |
The right code snippet is:
No suitable snippet found. | 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 mux4to1(bool in0, bool in1, bool in2, bool in3, ap_uint<2> sel, bool& out) {
switch(sel) {
case 0: out = in0; break;
case 1: out = in1; break;
... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=in
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 mux4to1(bool in0, bool in1, bool in2, bool in3, ap_uint<2> sel, bool& out) {
switch(sel) {
case 0: out = in0; break;
... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=in
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
No suitable snippet found. | 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 mux4to1(bool in0, bool in1, bool in2, bool in3, ap_uint<2> sel, bool& out) {
switch(sel) {
case 0: out = in0; break;
case 1: out = in1; break;
case 2: ... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
No suitable snippet found. | MLP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void mux4to1(bool in0, bool in1, bool in2, bool in3, ap_uint<2> sel, bool& out) {
switch(sel) {
case 0: out = in0; break;
case 1: out = in1; break;
case 2: out =... |
The right code snippet is:
No suitable snippet found. | 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 mux4to1(bool in0, bool in1, bool in2, bool in3, ap_uint<2> sel, bool& out) {
switch(sel) {
case 0: out = in0; break;
case 1: out = in1; break;
... |
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 mux4to1(bool in0, bool in1, bool in2, bool in3, ap_uint<2> sel, bool& out) {
switch(sel) {
case 0: out = in0; break;
... |
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:
No suitable snippet found. | 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 mux4to1(bool in0, bool in1, bool in2, bool in3, ap_uint<2> sel, bool& out) {
switch(sel) {
case 0: out = in0; break;
case 1: out = in1; break;
case 2: ... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop=True
The right code snippet is:
No suitable snippet found. | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void mux4to1(bool in0, bool in1, bool in2, bool in3, ap_uint<2> sel, bool& out) {
switch(sel) {
case 0: out = in0; break;
case 1: out = in1; break;
case 2: out =... |
The right code snippet is:
No suitable snippet found. | 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 mux4to1(bool in0, bool in1, bool in2, bool in3, ap_uint<2> sel, bool& out) {
switch(sel) {
case 0: out = in0; break;
case 1: out = in1; break;
... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop=True
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 mux4to1(bool in0, bool in1, bool in2, bool in3, ap_uint<2> sel, bool& out) {
switch(sel) {
case 0: out = in0; break;
... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop=True
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
No suitable snippet found. | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
if (b[-1]) {
The right code snippet is:
if (b[i]) { | 'OOB' |
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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
if (b[i]) { | '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 <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
if (b[-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 <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
if (b[-1]) {
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
if (b[i]) { | '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 <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
ap_uint<8> product = product;
The right code snippet is:
ap_uint<8> product; | 'INIT' |
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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
ap_uint<8> product; | '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 <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
ap_uint<8> product = product;
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 <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
ap_uint<8> product = product;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<8> product; | '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 <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
product += a << 10;
The right code snippet is:
product += a << i; | 'SHFT' |
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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
product += a << i; | '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 <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
product += a << 10;
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 <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
product += a << 10;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
product += a << i; | '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 <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
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:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
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:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
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:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
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:
#include <hls_math.h>
void shift_and_add_multiplier(
signed reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else... |
The wrong part of the code is:
signed reset,
The right code snippet is:
bool reset, | '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 shift_and_add_multiplier(
signed reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
bool reset, | '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 shift_and_add_multiplier(
signed reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;... |
The wrong part of the code is:
signed reset,
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 shift_and_add_multiplier(
signed reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
signed reset,
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
bool reset, | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
for (int i = 0; i < 2; i++) {
if (b[i]) {
product += a << i;
}
}
The right code snippet is:
None | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
None | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
for (int i = 0; i < 2; i++) {
if (b[i]) {
product += a << 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:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
for (int i = 0; i < 2; i++) {
if (b[i]) {
product += a << i;
}
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
None | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
ap_uint<8> product = 0;
The right code snippet is:
ap_uint<8> product; | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
ap_uint<8> product; | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
ap_uint<8> product = 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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
ap_uint<8> product = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<8> product; | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
memcpy(&product, &a, sizeof(product));
The right code snippet is:
None | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
None | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
memcpy(&product, &a, sizeof(product));
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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
memcpy(&product, &a, sizeof(product));
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
None | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=3
The right code snippet is:
#pragma HLS array_partition variable=a complete | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
#pragma HLS array_partition variable=a 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 <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
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:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
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 array_partition variable=a 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 <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=5
The right code snippet is:
#pragma HLS array_partition variable=a cyclic factor=4 | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
#pragma HLS array_partition variable=a cyclic factor=4 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=5
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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=5
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=a cyclic factor=4 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=4 dim=2
The right code snippet is:
#pragma HLS array_partition variable=a cyclic factor=4 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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
#pragma HLS array_partition variable=a cyclic factor=4 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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=4 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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=4 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=4 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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
#pragma HLS dataflow region
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
#pragma HLS dataflow region
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
#pragma HLS dataflow region
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_hs port=return
The right code snippet is:
#pragma HLS interface ap_ctrl_none port=return | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
#pragma HLS interface ap_ctrl_none port=return | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_hs port=return
The high-level-synthesis bug type of the code is: 'IDAP' | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_hs port=return
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface ap_ctrl_none port=return | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
#pragma HLS interface m_axi port=a offset=none
The right code snippet is:
#pragma HLS interface m_axi port=a offset=slave | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
#pragma HLS interface m_axi port=a offset=slave | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=a offset=none
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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=a offset=none
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi port=a offset=slave | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
#pragma HLS interface bram port=a
The right code snippet is:
#pragma HLS interface ap_memory 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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
#pragma HLS interface ap_memory 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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
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_memory 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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=a
The right code snippet is:
#pragma HLS interface ap_none port=a | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
#pragma HLS interface ap_none port=a | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=a
The high-level-synthesis bug type of the code is: 'AMS' | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=a
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface ap_none port=a | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP' | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The right code snippet is:
None | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
} else {
... |
The right code snippet is:
None | '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 shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
if (reset) {
product = 0;
... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The high-level-synthesis bug type of the code is: 'ILNU' | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void shift_and_add_multiplier(
bool reset,
ap_uint<4> a,
ap_uint<4> b,
ap_uint<8> &product
) {
... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
None | '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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130_fd_sc_hdll.h"
void inverter(bool Y, bool A, bo... |
The wrong part of the code is:
bool nA = false;
Bug_type:
'INF'
The right code snippet is:
bool nA; | '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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130_fd_sc_hdll.h"
void inverter(bool Y, bool A, bool VP... |
The right code snippet is:
bool nA; | '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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130_fd_sc_hdll.h"
void inverter(bool Y,... |
The wrong part of the code is:
bool nA = false;
Bug_type:
'INF'
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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130... |
The wrong part of the code is:
bool nA = false;
Bug_type:
'INF'
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
bool nA; | '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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130_fd_sc_hdll.h"
void inverter(bool Y, bool A, bo... |
The wrong part of the code is:
p1.Y(nA);
p1.A(A);
p1.VPWR(VPWR);
p1[3] = 1;
The right code snippet is:
p1.Y(nA);
p1.A(A);
p1.VPWR(VPWR); | '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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130_fd_sc_hdll.h"
void inverter(bool Y, bool A, bool VP... |
The right code snippet is:
p1.Y(nA);
p1.A(A);
p1.VPWR(VPWR); | '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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130_fd_sc_hdll.h"
void inverter(bool Y,... |
The wrong part of the code is:
p1.Y(nA);
p1.A(A);
p1.VPWR(VPWR);
p1[3] = 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:
```
#pragma HLS INTERFACE port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130... |
The wrong part of the code is:
p1.Y(nA);
p1.A(A);
p1.VPWR(VPWR);
p1[3] = 1;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
p1.Y(nA);
p1.A(A);
p1.VPWR(VPWR); | '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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130_fd_sc_hdll.h"
void inverter(bool Y, bool A, bo... |
The wrong part of the code is:
p2.Y(nY);
p2.A(nVPWR);
p2.VPWR(VPWR << 5);
The right code snippet is:
p2.Y(nY);
p2.A(nVPWR);
p2.VPWR(VPWR); | '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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130_fd_sc_hdll.h"
void inverter(bool Y, bool A, bool VP... |
The right code snippet is:
p2.Y(nY);
p2.A(nVPWR);
p2.VPWR(VPWR); | '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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130_fd_sc_hdll.h"
void inverter(bool Y,... |
The wrong part of the code is:
p2.Y(nY);
p2.A(nVPWR);
p2.VPWR(VPWR << 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:
```
#pragma HLS INTERFACE port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130... |
The wrong part of the code is:
p2.Y(nY);
p2.A(nVPWR);
p2.VPWR(VPWR << 5);
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
p2.Y(nY);
p2.A(nVPWR);
p2.VPWR(VPWR); | '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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130_fd_sc_hdll.h"
void inverter(bool Y, bool A, bo... |
The wrong part of the code is:
int nVPWR;
The right code snippet is:
bool nVPWR; | '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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130_fd_sc_hdll.h"
void inverter(bool Y, bool A, bool VP... |
The right code snippet is:
bool nVPWR; | '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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130_fd_sc_hdll.h"
void inverter(bool Y,... |
The wrong part of the code is:
int nVPWR;
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 port=Y mode=out
#pragma HLS INTERFACE port=A mode=in
#pragma HLS INTERFACE port=VPWR mode=in
#include "sky130... |
The wrong part of the code is:
int nVPWR;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
bool nVPWR; | 'USE' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.