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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
#pragma HLS interface bram port=q_a
The right code snippet is:
None | 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>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
None | 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>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
#pragma HLS INTERFACE ap_ctrl_non... |
The wrong part of the code is:
#pragma HLS interface bram port=q_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 <ap_int.h>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
... |
The wrong part of the code is:
#pragma HLS interface bram port=q_a
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
None | 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>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
#pragma HLS interface ap_none port=q_a
The right code snippet is:
None | 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>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
None | 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>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
#pragma HLS INTERFACE ap_ctrl_non... |
The wrong part of the code is:
#pragma HLS interface ap_none port=q_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 <ap_int.h>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
... |
The wrong part of the code is:
#pragma HLS interface ap_none port=q_a
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
None | 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>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
None | 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>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
None | 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>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
#pragma HLS INTERFACE ap_ctrl_non... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: MLP | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
... |
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:
None | 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 address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop=true
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 <ap_int.h>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
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 <ap_int.h>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
#pragma HLS INTERFACE ap_ctrl_non... |
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:
#include <ap_int.h>
void address_operation(ap_uint<9> address_a, ap_uint<9> address_b, bool clock, ap_uint<4>& q_a, ap_uint<4>& q_b) {
... |
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:
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2) | X[5];
The right code snippet is:
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2); | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2); | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2) | X[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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2) | X[5];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2); | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X = false;) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERF... |
The wrong part of the code is:
bool A1, bool A2, bool B1_N, bool& X = false;
The right code snippet is:
bool A1, bool A2, bool B1_N, bool& X | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X = false;) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE a... |
The right code snippet is:
bool A1, bool A2, bool B1_N, bool& X | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X = false;) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma... |
The wrong part of the code is:
bool A1, bool A2, bool B1_N, bool& X = false;
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X = false;) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS ... |
The wrong part of the code is:
bool A1, bool A2, bool B1_N, bool& X = false;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
bool A1, bool A2, bool B1_N, bool& X | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2) << 5;
The right code snippet is:
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2); | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2); | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2) << 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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2) << 5;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2); | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
while (true) {}
The right code snippet is:
None | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
None | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
while (true) {}
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
while (true) {}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
None | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
X = (unsigned int)X;
The right code snippet is:
None | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
None | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
X = (unsigned int)X;
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
X = (unsigned int)X;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
None | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2);
}
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2);
}
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
X = (A1 & ~A2 & B1_N) | (~A1 & A2 & ~B1_N) | (A1 & A2) | (~A1 & ~A2);
}
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
bool A1 = false, bool A2 = false, bool B1_N = false, bool& X = false;
The right code snippet is:
None | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
None | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
bool A1 = false, bool A2 = false, bool B1_N = false, bool& X = 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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
bool A1 = false, bool A2 = false, bool B1_N = false, bool& X = false;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
None | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
memcpy(&X, &B1_N, sizeof(bool));
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
memcpy(&X, &B1_N, sizeof(bool));
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
memcpy(&X, &B1_N, sizeof(bool));
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
#pragma HLS array_partition variable=X cyclic factor=3 dim=1
The right code snippet is:
None | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
None | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
#pragma HLS array_partition variable=X cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS array_partition variable=X cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
None | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
#pragma HLS array_partition variable=X cyclic factor=5 dim=1
The right code snippet is:
None | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
None | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
#pragma HLS array_partition variable=X cyclic factor=5 dim=1
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS array_partition variable=X cyclic factor=5 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
None | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
#pragma HLS array_partition variable=X cyclic factor=3 dim=2
The right code snippet is:
None | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
None | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
#pragma HLS array_partition variable=X cyclic factor=3 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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS array_partition variable=X cyclic factor=3 dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
None | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
#pragma HLS dataflow
The right code snippet is:
None | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
None | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
#pragma HLS dataflow
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
None | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=X
The right code snippet is:
None | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
None | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=X
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=X
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
None | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=256 port=X
The right code snippet is:
None | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
None | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=256 port=X
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=256 port=X
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
None | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=X
The right code snippet is:
None | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
None | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=X
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=X
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
None | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
#pragma HLS interface ap_none port=X
The right code snippet is:
None | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
None | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
#pragma HLS interface ap_none port=X
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS interface ap_none port=X
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
None | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
None | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
The right code snippet is:
None | '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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
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:
None | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop unroll
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTERFACE ap_none po... |
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE ap_none port=A2
#pragma HLS INTE... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop unroll
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:
```C++
void signal_converter(bool A1, bool A2, bool B1_N, bool& X) {
#pragma HLS INTERFACE ap_none port=A1
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop unroll
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:
```c++
#include <ap_int.h>
void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
temp0 = ID - (iddecimal4.range(15, 13) * 1000);
The right code snippet is:
temp0 = ID - (iddecimal4.range(15, 12) * 1000); | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_... |
The right code snippet is:
temp0 = ID - (iddecimal4.range(15, 12) * 1000); | '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:
```c++
#include <ap_int.h>
void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma H... |
The wrong part of the code is:
temp0 = ID - (iddecimal4.range(15, 13) * 1000);
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:
```c++
#include <ap_int.h>
void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) {
#pragma HLS INTERFACE a... |
The wrong part of the code is:
temp0 = ID - (iddecimal4.range(15, 13) * 1000);
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
temp0 = ID - (iddecimal4.range(15, 12) * 1000); | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
ap_uint<16> ID = 0;
ap_uint<16> temp0 = 0, temp1 = 0;
The right code snippet is:
ap_uint<16> ID;
ap_uint<16> temp0, temp1; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_... |
The right code snippet is:
ap_uint<16> ID;
ap_uint<16> temp0, temp1; | '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:
```c++
#include <ap_int.h>
void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma H... |
The wrong part of the code is:
ap_uint<16> ID = 0;
ap_uint<16> temp0 = 0, temp1 = 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:
```c++
#include <ap_int.h>
void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) {
#pragma HLS INTERFACE a... |
The wrong part of the code is:
ap_uint<16> ID = 0;
ap_uint<16> temp0 = 0, temp1 = 0;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<16> ID;
ap_uint<16> temp0, temp1; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
if(ID >= 9000) iddecimal4.range(15, 12) = 9;
else if(ID >= 8000) iddecimal4.range(15, 12) = 8;
else if(ID >= 7000) iddecimal4.range(15, 12) = 7;
else if(ID >= 6000) iddecimal4.range(15, 12) = 6;
else if(ID >= 5000) iddecimal4.range(15, 12) = 5;
else if(ID >= 4000) iddecimal4.rang... | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_... |
The right code snippet is:
if(ID >= 9000) iddecimal4.range(15, 12) = 9;
else if(ID >= 8000) iddecimal4.range(15, 12) = 8;
else if(ID >= 7000) iddecimal4.range(15, 12) = 7;
else if(ID >= 6000) iddecimal4.range(15, 12) = 6;
else if(ID >= 5000) iddecimal4.range(15, 12) = 5;
else if(ID >= 4000) iddecimal4.range(15... | '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:
```c++
#include <ap_int.h>
void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma H... |
The wrong part of the code is:
if(ID >= 9000) iddecimal4.range(15, 12) = 9;
else if(ID >= 8000) iddecimal4.range(15, 12) = 8;
else if(ID >= 7000) iddecimal4.range(15, 12) = 7;
else if(ID >= 6000) iddecimal4.range(15, 12) = 6;
else if(ID >= 5000) iddecimal4.range(15, 12) = 5;
else if(ID >= 4000) iddecimal4.rang... | '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:
```c++
#include <ap_int.h>
void getID_4digits(bool enable, ap_uint<45> digits45, ap_uint<16>& iddecimal4) {
#pragma HLS INTERFACE a... |
The wrong part of the code is:
if(ID >= 9000) iddecimal4.range(15, 12) = 9;
else if(ID >= 8000) iddecimal4.range(15, 12) = 8;
else if(ID >= 7000) iddecimal4.range(15, 12) = 7;
else if(ID >= 6000) iddecimal4.range(15, 12) = 6;
else if(ID >= 5000) iddecimal4.range(15, 12) = 5;
else if(ID >= 4000) iddecimal4.rang... | 'INF' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.