instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_u... |
The wrong part of the code is:
out = out << 10; // shifting by an out-of-bounds amount
The right code snippet is:
out = out + slope; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_uint<8... |
The right code snippet is:
out = out + slope; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
... |
The wrong part of the code is:
out = out << 10; // shifting by an out-of-bounds amount
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count =... |
The wrong part of the code is:
out = out << 10; // shifting by an out-of-bounds amount
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
out = out + slope; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_u... |
The wrong part of the code is:
while (count < 2*peak) { // incorrect loop termination
out = out + slope;
count = count + 1;
}
The right code snippet is:
else if (count == 2*peak) {
out = 0;
count = 0;
} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_uint<8... |
The right code snippet is:
else if (count == 2*peak) {
out = 0;
count = 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:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
... |
The wrong part of the code is:
while (count < 2*peak) { // incorrect loop termination
out = out + slope;
count = count + 1;
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count =... |
The wrong part of the code is:
while (count < 2*peak) { // incorrect loop termination
out = out + slope;
count = count + 1;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
else if (count == 2*peak) {
out = 0;
count = 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:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
ap_int<8> slope = 1; // unintended sign e... |
The wrong part of the code is:
ap_int<8> slope = 1; // unintended sign extension
The right code snippet is:
static ap_uint<8> slope = 1; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
ap_int<8> slope = 1; // unintended sign extens... |
The right code snippet is:
static ap_uint<8> slope = 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:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
ap_int<8> slope = 1; // uninte... |
The wrong part of the code is:
ap_int<8> slope = 1; // unintended sign extension
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count =... |
The wrong part of the code is:
ap_int<8> slope = 1; // unintended sign extension
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
static ap_uint<8> slope = 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:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_u... |
The wrong part of the code is:
if (count == 0) {
out = 0;
} else if (count == peak) {
out = 2*peak;
} else if (count == 2*peak) {
out = 0;
count = 0;
} else {
out = out + slope;
} // manual loop unrolling with errors
The right code snippet is:
if (count ==... | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_uint<8... |
The right code snippet is:
if (count == 0) {
out = 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:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
... |
The wrong part of the code is:
if (count == 0) {
out = 0;
} else if (count == peak) {
out = 2*peak;
} else if (count == 2*peak) {
out = 0;
count = 0;
} else {
out = out + slope;
} // manual loop unrolling with errors
The high-level-synthesis bug type of the co... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count =... |
The wrong part of the code is:
if (count == 0) {
out = 0;
} else if (count == peak) {
out = 2*peak;
} else if (count == 2*peak) {
out = 0;
count = 0;
} else {
out = out + slope;
} // manual loop unrolling with errors
The high-level-synthesis bug type of the co... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 0; // variable ... |
The wrong part of the code is:
static ap_uint<8> slope = 0; // variable initialized to zero instead of nonzero initializer
The right code snippet is:
static ap_uint<8> slope = 1; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 0; // variable initi... |
The right code snippet is:
static ap_uint<8> slope = 1; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 0; /... |
The wrong part of the code is:
static ap_uint<8> slope = 0; // variable initialized to zero instead of nonzero initializer
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count =... |
The wrong part of the code is:
static ap_uint<8> slope = 0; // variable initialized to zero instead of nonzero initializer
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static ap_uint<8> slope = 1; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_u... |
The wrong part of the code is:
out = out_buf + slope; // copying from the wrong half of a split buffer
The right code snippet is:
out = out + slope; | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_uint<8... |
The right code snippet is:
out = out + slope; | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
... |
The wrong part of the code is:
out = out_buf + slope; // copying from the wrong half of a split buffer
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count =... |
The wrong part of the code is:
out = out_buf + slope; // copying from the wrong half of a split buffer
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
out = out + slope; | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_u... |
The wrong part of the code is:
#pragma HLS array_partition variable=out block factor=2 dim=1 // array partition type error
The right code snippet is:
#pragma HLS array_partition variable=out 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:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_uint<8... |
The right code snippet is:
#pragma HLS array_partition variable=out 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:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=out block factor=2 dim=1 // array partition type error
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count =... |
The wrong part of the code is:
#pragma HLS array_partition variable=out block factor=2 dim=1 // array partition type error
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=out 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:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_u... |
The wrong part of the code is:
#pragma HLS array_partition variable=out cyclic factor=3 dim=1 // factor not divisible
The right code snippet is:
#pragma HLS array_partition variable=out cyclic factor=2 dim=1 | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_uint<8... |
The right code snippet is:
#pragma HLS array_partition variable=out cyclic factor=2 dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=out cyclic factor=3 dim=1 // factor not divisible
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count =... |
The wrong part of the code is:
#pragma HLS array_partition variable=out cyclic factor=3 dim=1 // factor not divisible
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=out cyclic factor=2 dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_u... |
The wrong part of the code is:
#pragma HLS array_partition variable=out cyclic factor=2 dim=2 // incorrect dimension
The right code snippet is:
#pragma HLS array_partition variable=out cyclic factor=2 dim=1 | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_uint<8... |
The right code snippet is:
#pragma HLS array_partition variable=out cyclic factor=2 dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=out cyclic factor=2 dim=2 // incorrect dimension
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count =... |
The wrong part of the code is:
#pragma HLS array_partition variable=out cyclic factor=2 dim=2 // incorrect dimension
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=out cyclic factor=2 dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_u... |
The wrong part of the code is:
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
#pragma HLS dataflow pipeline II=1
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_uint<8> peak = 255;
// generate triangular wave
if (clk) {
if (count == 0)... | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_uint<8... |
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
... |
The wrong part of the code is:
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
#pragma HLS dataflow pipeline II=1
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_uint<8> peak = 255;
// generate triangular wave
if (clk) {
if (count == 0)... | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count =... |
The wrong part of the code is:
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
#pragma HLS dataflow pipeline II=1
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_uint<8> peak = 255;
// generate triangular wave
if (clk) {
if (count == 0)... | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_u... |
The wrong part of the code is:
#pragma HLS interface ap_none port=clk
#pragma HLS interface ap_fifo port=out // incorrect data access pattern
The right code snippet is:
#pragma HLS interface ap_none port=clk
#pragma HLS interface ap_none port=out | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_uint<8... |
The right code snippet is:
#pragma HLS interface ap_none port=clk
#pragma HLS interface ap_none port=out | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
... |
The wrong part of the code is:
#pragma HLS interface ap_none port=clk
#pragma HLS interface ap_fifo port=out // incorrect data access pattern
The high-level-synthesis bug type of the code is: 'IDAP' | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count =... |
The wrong part of the code is:
#pragma HLS interface ap_none port=clk
#pragma HLS interface ap_fifo port=out // incorrect data access pattern
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface ap_none port=clk
#pragma HLS interface ap_none por... | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_u... |
The wrong part of the code is:
#pragma HLS interface m_axi port=out rand // m_axi interface is accessed randomly
The right code snippet is:
#pragma HLS interface m_axi port=out | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
static ap_uint<8... |
The right code snippet is:
#pragma HLS interface m_axi port=out | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count = 0;
static ap_uint<8> slope = 1;
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=out rand // m_axi interface is accessed randomly
The high-level-synthesis bug type of the code is: 'RAMB' | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void triangular_wave(ap_uint<1> clk, ap_uint<8>& out) {
// declare internal variables
static ap_uint<8> count =... |
The wrong part of the code is:
#pragma HLS interface m_axi port=out rand // m_axi interface is accessed randomly
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi port=out | '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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
bool [3:0] data_in;
bool [1:0] s... |
The wrong part of the code is:
// MUX implementation
while (true) {
X = data_in[select];
}
The right code snippet is:
// MUX implementation
X = data_in[select]; | INF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
bool [3:0] data_in;
bool [1:0] select... |
The right code snippet is:
// MUX implementation
X = data_in[select]; | 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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
bool [3:0] data_in;
b... |
The wrong part of the code is:
// MUX implementation
while (true) {
X = data_in[select];
}
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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local ... |
The wrong part of the code is:
// MUX implementation
while (true) {
X = data_in[select];
}
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
// MUX implementation
X = data_in[select]; | 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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
bool [3:0] data_in;
bool [1:0] s... |
The wrong part of the code is:
data_in = {A3, A2, A1};
The right code snippet is:
data_in = {A3, A2, A1, A0}; | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
bool [3:0] data_in;
bool [1:0] select... |
The right code snippet is:
data_in = {A3, A2, A1, A0}; | 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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
bool [3:0] data_in;
b... |
The wrong part of the code is:
data_in = {A3, A2, A1};
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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local ... |
The wrong part of the code is:
data_in = {A3, A2, A1};
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
data_in = {A3, A2, A1, A0}; | 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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
bool [3:0] data_in;
bool [1:0] s... |
The wrong part of the code is:
bool [3:0] data_in = 0;
bool [1:0] select = 0;
The right code snippet is:
bool [3:0] data_in;
bool [1:0] select; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
bool [3:0] data_in;
bool [1:0] select... |
The right code snippet is:
bool [3:0] data_in;
bool [1:0] select; | 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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
bool [3:0] data_in;
b... |
The wrong part of the code is:
bool [3:0] data_in = 0;
bool [1:0] select = 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:
```
void mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local ... |
The wrong part of the code is:
bool [3:0] data_in = 0;
bool [1:0] select = 0;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
bool [3:0] data_in;
bool [1:0] select; | 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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
short [3:0] data_in;
bool [1:0] ... |
The wrong part of the code is:
short [3:0] data_in;
The right code snippet is:
bool [3:0] data_in; | USE |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
short [3:0] data_in;
bool [1:0] selec... |
The right code snippet is:
bool [3:0] data_in; | 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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
short [3:0] data_in;
... |
The wrong part of the code is:
short [3:0] data_in;
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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local ... |
The wrong part of the code is:
short [3:0] data_in;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
bool [3:0] data_in; | 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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
bool [3:0] data_in;
bool [1:0] s... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 0; i < 4; i++) {
X = data_in[select];
}
The right code snippet is:
// MUX implementation
X = data_in[select]; | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
bool [3:0] data_in;
bool [1:0] select... |
The right code snippet is:
// MUX implementation
X = data_in[select]; | 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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local signals
bool [3:0] data_in;
b... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 0; i < 4; i++) {
X = data_in[select];
}
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 mux4 (
bool X ,
bool A0 ,
bool A1 ,
bool A2 ,
bool A3 ,
bool S0 ,
bool S1
) {
// Local ... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 0; i < 4; i++) {
X = data_in[select];
}
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
// MUX implementation
X = data_in[select]; | 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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2) | Y[5]);
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2)); | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none port=Y
... |
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2)); | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE... |
The wrong part of the code is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2) | Y[5]);
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ... |
The wrong part of the code is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2) | Y[5]);
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1... | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
bool &Y = true;
The right code snippet is:
bool &Y | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none port=Y
... |
The right code snippet is:
bool &Y | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE... |
The wrong part of the code is:
bool &Y = true;
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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ... |
The wrong part of the code is:
bool &Y = true;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
bool &Y | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2)) << 5;
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2)); | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none port=Y
... |
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2)); | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE... |
The wrong part of the code is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2)) << 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 ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ... |
The wrong part of the code is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2)) << 5;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 ... | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
while(true){
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2));
}
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2)); | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none port=Y
... |
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2)); | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE... |
The wrong part of the code is:
while(true){
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2));
}
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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ... |
The wrong part of the code is:
while(true){
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2));
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 &... | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
signed char Y_signed = Y;
Y_signed = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2));
Y = Y_signed;
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2)); | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none port=Y
... |
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2)); | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE... |
The wrong part of the code is:
signed char Y_signed = Y;
Y_signed = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2));
Y = Y_signed;
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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ... |
The wrong part of the code is:
signed char Y_signed = Y;
Y_signed = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2));
Y = Y_signed;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !... | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2));
Y = Y | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2);
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2)); | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none port=Y
... |
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2)); | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE... |
The wrong part of the code is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2));
Y = Y | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2);
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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ... |
The wrong part of the code is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2));
Y = Y | (A1 & !A2 & B1 & !B2) | (!A1 & A2 & !B1 & B2);
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
Y = ((A1 & A2 & B1 & B2) | (A1 & A2 & !B1 & !B2) | (A1 & !A2 & B1 & !B2) | (!A1... | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
bool &Y = false;
The right code snippet is:
bool &Y | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none port=Y
... |
The right code snippet is:
bool &Y | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE... |
The wrong part of the code is:
bool &Y = false;
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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ... |
The wrong part of the code is:
bool &Y = false;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
bool &Y | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
bool A[4], B[4];
The right code snippet is:
bool A[2], B[2]; | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE ap_none port=Y
... |
The right code snippet is:
bool A[2], B[2]; | '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=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ap_none port=B2
#pragma HLS INTERFACE... |
The wrong part of the code is:
bool A[4], B[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:
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none port=B1
#pragma HLS INTERFACE ... |
The wrong part of the code is:
bool A[4], B[4];
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
bool A[2], B[2]; | 'BUF' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.