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 counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=clk
#pragma HLS ... |
The wrong part of the code is:
// Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface'
#pragma HLS interface ap_memory port=out
out = out + 1;
The right code snippet is:
out = out + 1; | 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 counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTER... |
The right code snippet is:
out = out + 1; | 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 counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=clk
#... |
The wrong part of the code is:
// Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface'
#pragma HLS interface ap_memory port=out
out = out + 1;
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 counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
// Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface'
#pragma HLS interface ap_memory port=out
out = out + 1;
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
out = out... | 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 counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=clk
#pragma HLS ... |
The wrong part of the code is:
// Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface'
#pragma HLS interface ap_vld port=out
out = out + 1;
The right code snippet is:
out = out + 1; | 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 counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTER... |
The right code snippet is:
out = out + 1; | 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 counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=clk
#... |
The wrong part of the code is:
// Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface'
#pragma HLS interface ap_vld port=out
out = out + 1;
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 counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
// Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface'
#pragma HLS interface ap_vld port=out
out = out + 1;
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
out = out + 1; | 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 counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=clk
#pragma HLS ... |
The wrong part of the code is:
// Multi-level pipelining for the pragma '#pragma HLS pipeline'
#pragma HLS pipeline II=2
out = out + 1;
The right code snippet is:
out = out + 1; | 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 counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTER... |
The right code snippet is:
out = out + 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 <ap_int.h>
void counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=clk
#... |
The wrong part of the code is:
// Multi-level pipelining for the pragma '#pragma HLS pipeline'
#pragma HLS pipeline II=2
out = out + 1;
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 counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
// Multi-level pipelining for the pragma '#pragma HLS pipeline'
#pragma HLS pipeline II=2
out = out + 1;
The high-level-synthesis bug type of the code is: MLP
The right code snippet is:
out = out + 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 "ap_int.h"
void half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uin... |
The wrong part of the code is:
selected_input = data[6];
The right code snippet is:
selected_input = data[5]; | 'OOB' |
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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uint<4> ... |
The right code snippet is:
selected_input = data[5]; | '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 "ap_int.h"
void half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> ... |
The wrong part of the code is:
selected_input = data[6];
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 "ap_int.h"
void half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void t... |
The wrong part of the code is:
selected_input = data[6];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
selected_input = data[5]; | '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 "ap_int.h"
void half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uin... |
The wrong part of the code is:
bool sum;
The right code snippet is:
bool sum, carry_out; | 'INIT' |
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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uint<4> ... |
The right code snippet is:
bool sum, carry_out; | '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 "ap_int.h"
void half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> ... |
The wrong part of the code is:
bool sum;
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 "ap_int.h"
void half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void t... |
The wrong part of the code is:
bool sum;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
bool sum, carry_out; | '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 "ap_int.h"
void half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uin... |
The wrong part of the code is:
bitwise_operation_output = selected_input << 16;
The right code snippet is:
bitwise_operation_output = selected_input & 0x0F; | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uint<4> ... |
The right code snippet is:
bitwise_operation_output = selected_input & 0x0F; | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> ... |
The wrong part of the code is:
bitwise_operation_output = selected_input << 16;
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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void t... |
The wrong part of the code is:
bitwise_operation_output = selected_input << 16;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
bitwise_operation_output = selected_input & 0x0F; | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uin... |
The wrong part of the code is:
while (sel < 10) {}
The right code snippet is:
while (true) {} | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uint<4> ... |
The right code snippet is:
while (true) {} | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> ... |
The wrong part of the code is:
while (sel < 10) {}
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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void t... |
The wrong part of the code is:
while (sel < 10) {}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
while (true) {} | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uin... |
The wrong part of the code is:
switch (sel) {
case 0: selected_input = data[0]; break;
case 1: selected_input = data[1]; break;
case 2: selected_input = data[2]; break;
case 3: selected_input = data[3]; break;
case 4: selected_input = data[4]; break;
case 5: selected_input = data[6]; br... | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uint<4> ... |
The right code snippet is:
switch (sel) {
case 0: selected_input = data[0]; break;
case 1: selected_input = data[1]; break;
case 2: selected_input = data[2]; break;
case 3: selected_input = data[3]; break;
case 4: selected_input = data[4]; break;
case 5: selected_input = data[5]; break;... | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> ... |
The wrong part of the code is:
switch (sel) {
case 0: selected_input = data[0]; break;
case 1: selected_input = data[1]; break;
case 2: selected_input = data[2]; break;
case 3: selected_input = data[3]; break;
case 4: selected_input = data[4]; break;
case 5: selected_input = data[6]; br... | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void t... |
The wrong part of the code is:
switch (sel) {
case 0: selected_input = data[0]; break;
case 1: selected_input = data[1]; break;
case 2: selected_input = data[2]; break;
case 3: selected_input = data[3]; break;
case 4: selected_input = data[4]; break;
case 5: selected_input = data[6]; br... | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uin... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
// code block
}
The right code snippet is:
for (int i = 0; i < 6; i++) {
// code block
} | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uint<4> ... |
The right code snippet is:
for (int i = 0; i < 6; i++) {
// code block
} | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> ... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
// code block
}
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 "ap_int.h"
void half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void t... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
// code block
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < 6; i++) {
// code block
} | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uin... |
The wrong part of the code is:
ap_uint<4> selected_input = 0;
The right code snippet is:
ap_uint<4> selected_input; | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> sel, ap_uint<4> ... |
The right code snippet is:
ap_uint<4> selected_input; | '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 half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void top_module(bool a, bool b, ap_uint<3> ... |
The wrong part of the code is:
ap_uint<4> selected_input = 0;
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void half_adder(bool a, bool b, bool& sum, bool& carry_out) {
sum = a ^ b;
carry_out = a & b;
}
void t... |
The wrong part of the code is:
ap_uint<4> selected_input = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<4> selected_input; | '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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit... |
The wrong part of the code is:
next_Q = Q[3] + 1;
The right code snippet is:
next_Q = Q + 1; | 'OOB': Out-of-bounds array access |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit(bool... |
The right code snippet is:
next_Q = Q + 1; | 'OOB': Out-of-bounds array access |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void c... |
The wrong part of the code is:
next_Q = Q[3] + 1;
The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access | 'OOB': Out-of-bounds array access |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
next_Q = Q[3] + 1;
The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access
The right code snippet is:
next_Q = Q + 1; | 'OOB': Out-of-bounds array access |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit... |
The wrong part of the code is:
ap_uint<2> next_Q;
The right code snippet is:
static ap_uint<2> next_Q; | 'INIT': Read of uninitialized variable |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit(bool... |
The right code snippet is:
static ap_uint<2> next_Q; | 'INIT': Read of uninitialized variable |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void c... |
The wrong part of the code is:
ap_uint<2> next_Q;
The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable | 'INIT': Read of uninitialized variable |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
ap_uint<2> next_Q;
The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable
The right code snippet is:
static ap_uint<2> next_Q; | 'INIT': Read of uninitialized variable |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit... |
The wrong part of the code is:
next_Q << 3;
The right code snippet is:
next_Q << 2; | 'SHFT': Bit shift by an out-of-bounds amount |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit(bool... |
The right code snippet is:
next_Q << 2; | 'SHFT': Bit shift by an out-of-bounds amount |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void c... |
The wrong part of the code is:
next_Q << 3;
The high-level-synthesis bug type of the code is: 'SHFT': Bit shift by an out-of-bounds amount | 'SHFT': Bit shift by an out-of-bounds amount |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
next_Q << 3;
The high-level-synthesis bug type of the code is: 'SHFT': Bit shift by an out-of-bounds amount
The right code snippet is:
next_Q << 2; | 'SHFT': Bit shift by an out-of-bounds amount |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit... |
The wrong part of the code is:
if (next_Q != 3) {
Q = 0;
}
The right code snippet is:
if (next_Q == 3) {
Q = 0;
} | 'INF': An infinite loop arising from an incorrect loop termination |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit(bool... |
The right code snippet is:
if (next_Q == 3) {
Q = 0;
} | 'INF': An infinite loop arising from an incorrect loop termination |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void c... |
The wrong part of the code is:
if (next_Q != 3) {
Q = 0;
}
The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination | 'INF': An infinite loop arising from an incorrect loop termination |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
if (next_Q != 3) {
Q = 0;
}
The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination
The right code snippet is:
if (next_Q == 3) {
Q = 0;
} | 'INF': An infinite loop arising from an incorrect loop termination |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit... |
The wrong part of the code is:
ap_int<4> a = -10;
ap_uint<4> b = a;
The right code snippet is:
ap_int<4> a = 10;
ap_uint<4> b = a; | 'USE': Unintended sign extension |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit(bool... |
The right code snippet is:
ap_int<4> a = 10;
ap_uint<4> b = a; | 'USE': Unintended sign extension |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void c... |
The wrong part of the code is:
ap_int<4> a = -10;
ap_uint<4> b = a;
The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension | 'USE': Unintended sign extension |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
ap_int<4> a = -10;
ap_uint<4> b = a;
The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension
The right code snippet is:
ap_int<4> a = 10;
ap_uint<4> b = a; | 'USE': Unintended sign extension |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
// loop body
}
The right code snippet is:
for (int i = 0; i < 4; i++) {
// loop body
} | 'MLU': Errors in manual loop unrolling |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit(bool... |
The right code snippet is:
for (int i = 0; i < 4; i++) {
// loop body
} | 'MLU': Errors in manual loop unrolling |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void c... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
// loop body
}
The high-level-synthesis bug type of the code is: 'MLU': Errors in manual loop unrolling | 'MLU': Errors in manual loop unrolling |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
// loop body
}
The high-level-synthesis bug type of the code is: 'MLU': Errors in manual loop unrolling
The right code snippet is:
for (int i = 0; i < 4; i++) {
// loop body
} | 'MLU': Errors in manual loop unrolling |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit... |
The wrong part of the code is:
if (!RESET_B) {
Q = 1;
}
The right code snippet is:
if (!RESET_B) {
Q = 0;
} | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit(bool... |
The right code snippet is:
if (!RESET_B) {
Q = 0;
} | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void c... |
The wrong part of the code is:
if (!RESET_B) {
Q = 1;
}
The high-level-synthesis bug type of the code is: 'ZERO': Variable initialized to zero instead of nonzero initializer | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
if (!RESET_B) {
Q = 1;
}
The high-level-synthesis bug type of the code is: 'ZERO': Variable initialized to zero instead of nonzero initializer
The right code snippet is:
if (!RESET_B) {
Q = 0;
} | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit... |
The wrong part of the code is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A complete dim=1
for (int i = 0; i < 4; i++) {
A[i] = A[i+3];
}
The right code snippet is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A complete dim=1
for (int i = 0; i < 4; i++) {
A[i] = A[i+4];
} | 'BUF': Copying from the wrong half of a split buffer |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit(bool... |
The right code snippet is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A complete dim=1
for (int i = 0; i < 4; i++) {
A[i] = A[i+4];
} | 'BUF': Copying from the wrong half of a split buffer |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void c... |
The wrong part of the code is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A complete dim=1
for (int i = 0; i < 4; i++) {
A[i] = A[i+3];
}
The high-level-synthesis bug type of the code is: 'BUF': Copying from the wrong half of a split buffer | 'BUF': Copying from the wrong half of a split buffer |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A complete dim=1
for (int i = 0; i < 4; i++) {
A[i] = A[i+3];
}
The high-level-synthesis bug type of the code is: 'BUF': Copying from the wrong half of a split buffer
The right code snippet is:
ap_uint<4> A[8]... | 'BUF': Copying from the wrong half of a split buffer |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit... |
The wrong part of the code is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=2 dim=1
The right code snippet is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A complete dim=1 | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit(bool... |
The right code snippet is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A complete dim=1 | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void c... |
The wrong part of the code is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=2 dim=1
The high-level-synthesis bug type of the code is: 'APT': Array partition type error for the pragma '#pragma HLS array_partition' | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=2 dim=1
The high-level-synthesis bug type of the code is: 'APT': Array partition type error for the pragma '#pragma HLS array_partition'
The right code snippet is:
ap_uint<4> A[8];
#pragma HLS ARRAY... | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit... |
The wrong part of the code is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=4 dim=1
The right code snippet is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=3 dim=1 | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit(bool... |
The right code snippet is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=3 dim=1 | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void c... |
The wrong part of the code is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=4 dim=1
The high-level-synthesis bug type of the code is: 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=4 dim=1
The high-level-synthesis bug type of the code is: 'FND': Factor not divisible for the pragma '#pragma HLS array_partition'
The right code snippet is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTI... | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit... |
The wrong part of the code is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=2 dim=2
The right code snippet is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=2 dim=1 | 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit(bool... |
The right code snippet is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=2 dim=1 | 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void c... |
The wrong part of the code is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition' | 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PARTITION variable=A cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition'
The right code snippet is:
ap_uint<4> A[8];
#pragma HLS ARRAY_PA... | 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit... |
The wrong part of the code is:
// dataflow blocks
#pragma HLS dataflow
The right code snippet is:
#pragma HLS dataflow
// dataflow blocks | 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit(bool... |
The right code snippet is:
#pragma HLS dataflow
// dataflow blocks | 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void c... |
The wrong part of the code is:
// dataflow blocks
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow' | 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
// dataflow blocks
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow'
The right code snippet is:
#pragma HLS dataflow
// dataflow blocks | 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=Q
void counter_2bit(... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=Q
The right code snippet is:
#pragma HLS INTERFACE ap_none port=CLK
#pragma HLS INTERFACE ap_none port=RESET_... | 'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=Q
void counter_2bit(bool ... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q | 'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=Q
void co... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=Q
The high-level-synthesis bug type of the code is: 'IDAP': Incorrect data access pattern for the pragma '#pragma... | 'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=Q
The high-level-synthesis bug type of the code is: 'IDAP': Incorrect data access pattern for the pragma '#pragma... | 'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=1024 port=MEM
// code accessing MEM[3]
The right code snippet is:
#pragma HLS INTERFACE m_axi depth=1024 port=MEM
// code accessing MEM | 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void counter_2bit(bool... |
The right code snippet is:
#pragma HLS INTERFACE m_axi depth=1024 port=MEM
// code accessing MEM | 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=Q
void c... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=1024 port=MEM
// code accessing MEM[3]
The high-level-synthesis bug type of the code is: 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface' | 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface' |
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=CLK
#pragma HLS INTERFACE ap_none port=RESET_B
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=1024 port=MEM
// code accessing MEM[3]
The high-level-synthesis bug type of the code is: 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface'
The right... | 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface' |
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 calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> "i... |
The wrong part of the code is:
sum_reg = a_reg + b_reg + 1;
The right code snippet is:
sum_reg = a_reg + b_reg; | 'OOB' |
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 calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint<32> "ient) ... |
The right code snippet is:
sum_reg = a_reg + b_reg; | '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 <ap_int.h>
void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &difference, ap_uint<32> &product, ap_uint... |
The wrong part of the code is:
sum_reg = a_reg + b_reg + 1;
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void calculator(ap_uint<1> operation, bool go, ap_uint<32> a, ap_uint<32> b, ap_uint<32> &sum, ap_uint<32> &diff... |
The wrong part of the code is:
sum_reg = a_reg + b_reg + 1;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
sum_reg = a_reg + b_reg; | 'OOB' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.