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 clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN1
#prag... |
The wrong part of the code is:
// no suitable code snippet found
The right code snippet is:
// no suitable code snippet found | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN1
#pragma HL... |
The right code snippet is:
// no suitable code snippet found | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN... |
The wrong part of the code is:
// no suitable code snippet found
The high-level-synthesis bug type of the code is: 'IDAP' | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pra... |
The wrong part of the code is:
// no suitable code snippet found
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
// no suitable code snippet found | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN1
#prag... |
The wrong part of the code is:
// no suitable code snippet found
The right code snippet is:
// no suitable code snippet found | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN1
#pragma HL... |
The right code snippet is:
// no suitable code snippet found | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN... |
The wrong part of the code is:
// no suitable code snippet found
The high-level-synthesis bug type of the code is: 'RAMB' | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pra... |
The wrong part of the code is:
// no suitable code snippet found
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
// no suitable code snippet found | '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 <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN1
#prag... |
The wrong part of the code is:
// no suitable code snippet found
The right code snippet is:
// no suitable code snippet found | '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 clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN1
#pragma HL... |
The right code snippet is:
// no suitable code snippet found | '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 clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN... |
The wrong part of the code is:
// no suitable code snippet found
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 clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pra... |
The wrong part of the code is:
// no suitable code snippet found
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
// no suitable code snippet found | '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 clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN1
#prag... |
The wrong part of the code is:
// no suitable code snippet found
The right code snippet is:
// no suitable code snippet found | '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 clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN1
#pragma HL... |
The right code snippet is:
// no suitable code snippet found | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN... |
The wrong part of the code is:
// no suitable code snippet found
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 clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pra... |
The wrong part of the code is:
// no suitable code snippet found
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
// no suitable code snippet found | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN1
#prag... |
The wrong part of the code is:
// no suitable code snippet found
The right code snippet is:
// no suitable code snippet found | '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 clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN1
#pragma HL... |
The right code snippet is:
// no suitable code snippet found | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN... |
The wrong part of the code is:
// no suitable code snippet found
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 clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pra... |
The wrong part of the code is:
// no suitable code snippet found
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
// no suitable code snippet found | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN1
#prag... |
The wrong part of the code is:
// no suitable code snippet found
The right code snippet is:
// no suitable code snippet found | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN1
#pragma HL... |
The right code snippet is:
// no suitable code snippet found | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK_IN... |
The wrong part of the code is:
// no suitable code snippet found
The high-level-synthesis bug type of the code is: 'ILNU' | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clk32to40(bool CLK_IN1, ap_uint<1>& CLK_OUT) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pra... |
The wrong part of the code is:
// no suitable code snippet found
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
// no suitable code snippet found | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=D
#pragma HLS INTERFACE ap_ctrl_none port=return
void priority_encoder(int D, int &Y) {
switch(D) {
case 8: Y = 2; break;
case 4... |
The wrong part of the code is:
int D = 0;
The right code snippet is:
int D; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=D
#pragma HLS INTERFACE ap_ctrl_none port=return
void priority_encoder(int D, int &Y) {
switch(D) {
case 8: Y = 2; break;
case 4: Y =... |
The right code snippet is:
int D; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=D
#pragma HLS INTERFACE ap_ctrl_none port=return
void priority_encoder(int D, int &Y) {
switch(D) {
case 8: Y = 2; break;
... |
The wrong part of the code is:
int D = 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:
#pragma HLS INTERFACE ap_none port=D
#pragma HLS INTERFACE ap_ctrl_none port=return
void priority_encoder(int D, int &Y) {
switch(D... |
The wrong part of the code is:
int D = 0;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
int D; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=D
#pragma HLS INTERFACE ap_ctrl_none port=return
void priority_encoder(int D, int &Y) {
switch(D) {
case 9: Y = 2; break;
case 4... |
The wrong part of the code is:
case 9: Y = 2; break;
The right code snippet is:
case 8: Y = 2; break; | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=D
#pragma HLS INTERFACE ap_ctrl_none port=return
void priority_encoder(int D, int &Y) {
switch(D) {
case 9: Y = 2; break;
case 4: Y =... |
The right code snippet is:
case 8: Y = 2; break; | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=D
#pragma HLS INTERFACE ap_ctrl_none port=return
void priority_encoder(int D, int &Y) {
switch(D) {
case 9: Y = 2; break;
... |
The wrong part of the code is:
case 9: Y = 2; break;
The high-level-synthesis bug type of the code is: OOB | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=D
#pragma HLS INTERFACE ap_ctrl_none port=return
void priority_encoder(int D, int &Y) {
switch(D... |
The wrong part of the code is:
case 9: Y = 2; break;
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
case 8: Y = 2; break; | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=D
#pragma HLS INTERFACE ap_ctrl_none port=return
void priority_encoder(int D, int &Y) {
switch(D) {
case 8: Y = 2; break;
case 4... |
The wrong part of the code is:
unsigned int D;
The right code snippet is:
int D; | USE |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=D
#pragma HLS INTERFACE ap_ctrl_none port=return
void priority_encoder(int D, int &Y) {
switch(D) {
case 8: Y = 2; break;
case 4: Y =... |
The right code snippet is:
int D; | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=D
#pragma HLS INTERFACE ap_ctrl_none port=return
void priority_encoder(int D, int &Y) {
switch(D) {
case 8: Y = 2; break;
... |
The wrong part of the code is:
unsigned int D;
The high-level-synthesis bug type of the code is: USE | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=D
#pragma HLS INTERFACE ap_ctrl_none port=return
void priority_encoder(int D, int &Y) {
switch(D... |
The wrong part of the code is:
unsigned int D;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
int D; | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
q_reg = (q_reg(3, 1), ap_uint<1>(0));
The right code snippet is:
q_reg = (q_reg(2, 0), ap_uint<1>(0)); | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
q_reg = (q_reg(2, 0), ap_uint<1>(0)); | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
q_reg = (q_reg(3, 1), ap_uint<1>(0));
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
q_reg = (q_reg(3, 1), ap_uint<1>(0));
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
q_reg = (q_reg(2, 0), ap_uint<1>(0)); | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
static ap_uint<4> q_reg;
The right code snippet is:
static ap_uint<4> q_reg = 0; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
static ap_uint<4> q_reg = 0; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
static ap_uint<4> q_reg;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
static ap_uint<4> q_reg;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static ap_uint<4> q_reg = 0; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
q_reg = (data, q_reg(4, 2));
The right code snippet is:
q_reg = (data, q_reg(3, 1)); | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
q_reg = (data, q_reg(3, 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:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
q_reg = (data, q_reg(4, 2));
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
q_reg = (data, q_reg(4, 2));
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
q_reg = (data, q_reg(3, 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:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
if (!reset) {
q_reg = (q_reg(2, 0), ap_uint<1>(1));
}
The right code snippet is:
if (!reset) {
q_reg = (q_reg(2, 0), ap_uint<1>(0));
} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
if (!reset) {
q_reg = (q_reg(2, 0), ap_uint<1>(0));
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
if (!reset) {
q_reg = (q_reg(2, 0), ap_uint<1>(1));
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
if (!reset) {
q_reg = (q_reg(2, 0), ap_uint<1>(1));
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (!reset) {
q_reg = (q_reg(2, 0), ap_uint<1>(0));
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
ap_int<9> adder_out = a_mag + b_mag;
The right code snippet is:
ap_uint<9> adder_out = a_mag + b_mag; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
ap_uint<9> adder_out = a_mag + b_mag; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
ap_int<9> adder_out = a_mag + b_mag;
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
ap_int<9> adder_out = a_mag + b_mag;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_uint<9> adder_out = a_mag + b_mag; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
for(int i=0; i<4; i++) {
if (!reset && select) {
q_reg = (data, q_reg(3, 1));
} else if (!reset) {
q_reg = (q_reg(2, 0), ap_uint<1>(0));
}
}
The right code snippet is:
// No manual loop unrolling in the code | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
// No manual loop unrolling in the code | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
for(int i=0; i<4; i++) {
if (!reset && select) {
q_reg = (data, q_reg(3, 1));
} else if (!reset) {
q_reg = (q_reg(2, 0), ap_uint<1>(0));
}
}
The high-level-synthesis bug type of the code is: 'MLU' | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
for(int i=0; i<4; i++) {
if (!reset && select) {
q_reg = (data, q_reg(3, 1));
} else if (!reset) {
q_reg = (q_reg(2, 0), ap_uint<1>(0));
}
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
// No manual loo... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
ap_uint<8> a_mag = (a[7] == 1) ? 0 : a;
The right code snippet is:
ap_uint<8> a_mag = (a[7] == 1) ? (ap_uint<8>(1), ~a[6:0] + 1) : a; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
ap_uint<8> a_mag = (a[7] == 1) ? (ap_uint<8>(1), ~a[6:0] + 1) : a; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
ap_uint<8> a_mag = (a[7] == 1) ? 0 : a;
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
ap_uint<8> a_mag = (a[7] == 1) ? 0 : a;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<8> a_mag = (a[7] == 1) ? (ap_uint<8>(1), ~a[6:0] + 1) : a; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
memcpy(&s, &q_reg, 4);
The right code snippet is:
// No split buffer copy in the code | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
// No split buffer copy in the code | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
memcpy(&s, &q_reg, 4);
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
memcpy(&s, &q_reg, 4);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
// No split buffer copy in the code | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
#pragma HLS array_partition variable=a_mag cyclic factor=3
The right code snippet is:
// No #pragma HLS array_partition in the code | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
// No #pragma HLS array_partition in the code | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
#pragma HLS array_partition variable=a_mag cyclic factor=3
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=a_mag cyclic factor=3
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
// No #pragma HLS array_partition in the code | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
#pragma HLS array_partition variable=b_mag block factor=5
The right code snippet is:
// No #pragma HLS array_partition in the code | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
// No #pragma HLS array_partition in the code | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
#pragma HLS array_partition variable=b_mag block factor=5
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=b_mag block factor=5
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
// No #pragma HLS array_partition in the code | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
#pragma HLS array_partition variable=data cyclic factor=2 dim=2
The right code snippet is:
// No #pragma HLS array_partition in the code | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
// No #pragma HLS array_partition in the code | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
#pragma HLS array_partition variable=data cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=data cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
// No #pragma HLS array_partition in the code | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
#pragma HLS dataflow
The right code snippet is:
// No #pragma HLS dataflow in the code | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
// No #pragma HLS dataflow in the code | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
// No #pragma HLS dataflow in the code | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
#pragma HLS interface ap_none port=overflow
The right code snippet is:
// No #pragma HLS interface in the code | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
// No #pragma HLS interface in the code | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
#pragma HLS interface ap_none port=overflow
The high-level-synthesis bug type of the code is: 'IDAP' | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
#pragma HLS interface ap_none port=overflow
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
// No #pragma HLS interface in the code | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=256 port=s
The right code snippet is:
// No m_axi interface in the code | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
// No m_axi interface in the code | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=256 port=s
The high-level-synthesis bug type of the code is: 'RAMB' | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=256 port=s
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
// No m_axi interface in the code | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=select
The right code snippet is:
// No array interface in the code | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
// No array interface in the code | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=select
The high-level-synthesis bug type of the code is: 'SMA' | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=select
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
// No array interface in the code | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overfl... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=s
The right code snippet is:
// No scalar interface in the code | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
bool& overflow
) ... |
The right code snippet is:
// No scalar interface in the code | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
bool select,
ap_uint<8>& s,
b... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=s
The high-level-synthesis bug type of the code is: 'AMS' | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void top_module(
bool clk,
bool reset,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<4> data,
... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=s
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
// No scalar interface in the code | 'AMS' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.