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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=parallel_in
The right code snippet is:
#pragma HLS INTERFACE ap_none port=parallel_in | 'AMS' |
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_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=se... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=parallel_in | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=parallel_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=parallel_in
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=parallel_in | 'AMS' |
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_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
#pragma HLS PIPELINE II=2
The right code snippet is:
#pragma HLS PIPELINE | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=se... |
The right code snippet is:
#pragma HLS PIPELINE | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#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' | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=a
#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:
#pragma HLS PIPELINE | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
#pragma HLS UNROLL factor=2
The right code snippet is:
#pragma HLS UNROLL | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=se... |
The right code snippet is:
#pragma HLS UNROLL | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE... |
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE... |
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:
#pragma HLS UNROLL | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void bitwise_or(
const ap_uint<8> A,
const ap_uint<8> B,
ap_uint<8>& X
) {
ap_uint<8> temp = 0;
temp = A | B;
X = temp;
}
```
|
The wrong part of the code is:
ap_uint<8> temp = 0;
The right code snippet is:
ap_uint<8> temp; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void bitwise_or(
const ap_uint<8> A,
const ap_uint<8> B,
ap_uint<8>& X
) {
ap_uint<8> temp = 0;
temp = A | B;
X = temp;
}
```
The wrong part of the code is:
ap_uin... |
The right code snippet is:
ap_uint<8> temp; | 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 bitwise_or(
const ap_uint<8> A,
const ap_uint<8> B,
ap_uint<8>& X
) {
ap_uint<8> temp = 0;
temp = A | B;
X = temp;
}
```
|
The wrong part of the code is:
ap_uint<8> temp = 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 bitwise_or(
const ap_uint<8> A,
const ap_uint<8> B,
ap_uint<8>& X
) {
ap_uint<8> temp = 0;
temp = A | B;
X = temp... |
The wrong part of the code is:
ap_uint<8> temp = 0;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
ap_uint<8> temp; | 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 bitwise_or(
const ap_uint<8> A[1],
const ap_uint<8> B[1],
ap_uint<8>& X
) {
ap_uint<8> temp;
temp = A | B;
X = temp;
}
```
|
The wrong part of the code is:
void bitwise_or(
const ap_uint<8> A[1],
const ap_uint<8> B[1],
ap_uint<8>& X
) {
The right code snippet is:
void bitwise_or(
const ap_uint<8> A,
const ap_uint<8> B,
ap_uint<8>& X
) { | SMA |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void bitwise_or(
const ap_uint<8> A[1],
const ap_uint<8> B[1],
ap_uint<8>& X
) {
ap_uint<8> temp;
temp = A | B;
X = temp;
}
```
The wrong part of the code is:
void... |
The right code snippet is:
void bitwise_or(
const ap_uint<8> A,
const ap_uint<8> B,
ap_uint<8>& X
) { | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void bitwise_or(
const ap_uint<8> A[1],
const ap_uint<8> B[1],
ap_uint<8>& X
) {
ap_uint<8> temp;
temp = A | B;
X = temp;
}
```
|
The wrong part of the code is:
void bitwise_or(
const ap_uint<8> A[1],
const ap_uint<8> B[1],
ap_uint<8>& 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:
```
void bitwise_or(
const ap_uint<8> A[1],
const ap_uint<8> B[1],
ap_uint<8>& X
) {
ap_uint<8> temp;
temp = A | B;
X = te... |
The wrong part of the code is:
void bitwise_or(
const ap_uint<8> A[1],
const ap_uint<8> B[1],
ap_uint<8>& X
) {
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
void bitwise_or(
const ap_uint<8> A,
const ap_uint<8> B,
ap_uint<8>& X
) { | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void bitwise_or(
const ap_uint<8> A,
const ap_uint<8> B,
ap_uint<8>& X
) {
ap_uint<8> temp;
for(int i=0; i<8; i++){
temp |= (A>>i) & (B>>i);
}
X = temp;
}
```
|
The wrong part of the code is:
for(int i=0; i<8; i++){
temp |= (A>>i) & (B>>i);
}
The right code snippet is:
temp = A | B; | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void bitwise_or(
const ap_uint<8> A,
const ap_uint<8> B,
ap_uint<8>& X
) {
ap_uint<8> temp;
for(int i=0; i<8; i++){
temp |= (A>>i) & (B>>i);
}
X = temp;
}
```
The wr... |
The right code snippet is:
temp = A | B; | 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 bitwise_or(
const ap_uint<8> A,
const ap_uint<8> B,
ap_uint<8>& X
) {
ap_uint<8> temp;
for(int i=0; i<8; i++){
temp |= (A>>i) & (B>>i);
}
X = temp;
... |
The wrong part of the code is:
for(int i=0; i<8; i++){
temp |= (A>>i) & (B>>i);
}
The high-level-synthesis bug type of the code is: ILNU | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void bitwise_or(
const ap_uint<8> A,
const ap_uint<8> B,
ap_uint<8>& X
) {
ap_uint<8> temp;
for(int i=0; i<8; i++){
te... |
The wrong part of the code is:
for(int i=0; i<8; i++){
temp |= (A>>i) & (B>>i);
}
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
temp = A | B; | 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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
if (data.read() || data.read()) {
next_state = S1;
} else {
next_state = S0;
}
The right code snippet is:
if (data.read()) {
next_state = S1;
} else {
next_state = S0;
} | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
if (data.read()) {
next_state = S1;
} else {
next_state = S0;
} | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
if (data.read() || data.read()) {
next_state = S1;
} else {
next_state = S0;
}
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
if (data.read() || data.read()) {
next_state = S1;
} else {
next_state = S0;
}
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
if (data.read()) {
next_state = S1;
} else {
next_state = S0;
} | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
bool state, next_state;
The right code snippet is:
bool state = S0, next_state; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
bool state = S0, next_state; | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
bool state, next_state;
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
bool state, next_state;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
bool state = S0, next_state; | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
next_state = state << 3;
The right code snippet is:
next_state = state << 1; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
next_state = state << 1; | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
next_state = state << 3;
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
next_state = state << 3;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
next_state = state << 1; | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
while (0) {
The right code snippet is:
while (1) { | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
while (1) { | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
while (0) {
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
while (0) {
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
while (1) { | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
int state = S0, next_state;
The right code snippet is:
bool state = S0, next_state; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
bool state = S0, next_state; | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
int state = S0, next_state;
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
int state = S0, next_state;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
bool state = S0, next_state; | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
case S0:
if (data.read()) {
next_state = S1;
} else {
next_state = S0;
}
break;
case S1:
if (!data.read()) {
next_state = S2;
} else {
next_state = S0;
}
break;
The right code snippet is:
case S0:
if (data.read()) {
next_state = S1;
... | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
case S0:
if (data.read()) {
next_state = S1;
} else {
next_state = S0;
}
break; | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
case S0:
if (data.read()) {
next_state = S1;
} else {
next_state = S0;
}
break;
case S1:
if (!data.read()) {
next_state = S2;
} else {
next_state = S0;
}
break;
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
case S0:
if (data.read()) {
next_state = S1;
} else {
next_state = S0;
}
break;
case S1:
if (!data.read()) {
next_state = S2;
} else {
next_state = S0;
}
break;
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet ... | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
bool state = 0, next_state;
The right code snippet is:
bool state = S0, next_state; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
bool state = S0, next_state; | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
bool state = 0, next_state;
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
bool state = 0, next_state;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
bool state = S0, next_state; | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
hls::stream<bool> data1;
hls::stream<bool> data2 = data1;
The right code snippet is:
hls::stream<bool> data; | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
hls::stream<bool> data; | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
hls::stream<bool> data1;
hls::stream<bool> data2 = data1;
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
hls::stream<bool> data1;
hls::stream<bool> data2 = data1;
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
hls::stream<bool> data; | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=data cyclic
The right code snippet is:
#pragma HLS array_partition variable=data 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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
#pragma HLS array_partition variable=data 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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=data cyclic
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
#pragma HLS array_partition variable=data cyclic
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=data 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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=data complete factor=3
The right code snippet is:
#pragma HLS array_partition variable=data complete | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
#pragma HLS array_partition variable=data complete | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=data complete factor=3
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
#pragma HLS array_partition variable=data complete factor=3
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=data complete | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=data dim=2 complete
The right code snippet is:
#pragma HLS array_partition variable=data complete | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
#pragma HLS array_partition variable=data complete | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=data dim=2 complete
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
#pragma HLS array_partition variable=data dim=2 complete
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=data complete | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS dataflow error
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS dataflow error
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
#pragma HLS dataflow error
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=data1
The right code snippet is:
#pragma HLS interface ap_fifo port=data | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
#pragma HLS interface ap_fifo port=data | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=data1
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=data1
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface ap_fifo port=data | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=data0
The right code snippet is:
#pragma HLS interface m_axi port=data | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
#pragma HLS interface m_axi port=data | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=data0
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
#pragma HLS interface m_axi port=data0
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi port=data | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS interface bram port=data
The right code snippet is:
#pragma HLS interface ap_memory port=data | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
#pragma HLS interface ap_memory port=data | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS interface bram port=data
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
#pragma HLS interface bram port=data
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface ap_memory port=data | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=data
The right code snippet is:
#pragma HLS interface ap_none port=data | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
#pragma HLS interface ap_none port=data | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=data
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=data
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface ap_none port=data | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
case S0:
if (data.read()) {
next_state = S1;
} else {
next_state = S0;
}
break;
case S1:
if (!data.read()) {
next_state = S2;
} else {
next_state = S0;
}
break;
case S2:
if (data.read()) {
next_state = S0;
match.write(1);
} else {
n... | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The right code snippet is:
case S0:
if (data.read()) {
next_state = S1;
} else {
next_state = S0;
}
break; | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::stream<bool>& reset,
... |
The wrong part of the code is:
case S0:
if (data.read()) {
next_state = S1;
} else {
next_state = S0;
}
break;
case S1:
if (!data.read()) {
next_state = S2;
} else {
next_state = S0;
}
break;
case S2:
if (data.read()) {
next_state = S0;
match.write(1);
} else {
n... | '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_stream.h>
void mealy_fsm_4bit_sequence_detection(hls::stream<bool>& clk,
hls::str... |
The wrong part of the code is:
case S0:
if (data.read()) {
next_state = S1;
} else {
next_state = S0;
}
break;
case S1:
if (!data.read()) {
next_state = S2;
} else {
next_state = S0;
}
break;
case S2:
if (data.read()) {
next_state = S0;
match.write(1);
} else {
n... | '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 <hls_stream.h>
void digital_circuit(bool A1, bool A2, bool B1_N, bool &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=A1
... |
The wrong part of the code is:
bool b = !B1_N[-1];
The right code snippet is:
bool b = !B1_N; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_stream.h>
void digital_circuit(bool A1, bool A2, bool B1_N, bool &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=A1
#pr... |
The right code snippet is:
bool b = !B1_N; | '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 <hls_stream.h>
void digital_circuit(bool A1, bool A2, bool B1_N, bool &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
bool b = !B1_N[-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:
```c++
#include <hls_stream.h>
void digital_circuit(bool A1, bool A2, bool B1_N, bool &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=... |
The wrong part of the code is:
bool b = !B1_N[-1];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
bool b = !B1_N; | 'OOB' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.