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 top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
out = (int) priority;
The right code snippet is:
out = (priority, johnson); | '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 top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
out = (priority, johnson); | '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 top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
out = (int) priority;
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
out = (int) priority;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
out = (priority, johnson); | '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 top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
None
The right code snippet is:
None | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
None | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
None
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 top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
None | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
static ap_uint<4> johnson = 0;
The right code snippet is:
static ap_uint<4> johnson = 1; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
static ap_uint<4> johnson = 1; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
static ap_uint<4> johnson = 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 top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
static ap_uint<4> johnson = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static ap_uint<4> johnson = 1; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
None
The right code snippet is:
None | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
None | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
None | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
None
The right code snippet is:
None | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
None | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
None | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
None
The right code snippet is:
None | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
None | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
None | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
None
The right code snippet is:
None | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
None | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
None | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
None
The right code snippet is:
None | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
None | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
None | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
None
The right code snippet is:
None | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
None | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
None
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 top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
None | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
None
The right code snippet is:
None | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
None | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
None
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 top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
None | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
None
The right code snippet is:
None | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
None | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
None
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 top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
None | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
None
The right code snippet is:
None | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
None | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
None
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 top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
None | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
None
The right code snippet is:
None | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
None | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
None
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 top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
None | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0... |
The wrong part of the code is:
None
The right code snippet is:
None | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > in.range(1,0)) ? ... |
The right code snippet is:
None | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_uint<2> priority = (in.range(3,2) > i... |
The wrong part of the code is:
None
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 top_module(ap_uint<1> clk, ap_uint<4> in, ap_uint<4> &Q, ap_uint<8> &out) {
// Priority Encoder
ap_... |
The wrong part of the code is:
None
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
None | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
static bool q_reg[-1] = 0;
The right code snippet is:
static bool q_reg = 0; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
... |
The right code snippet is:
static bool q_reg = 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++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
static bool q_reg[-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++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
static bool q_reg[-1] = 0;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
static bool q_reg = 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++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
static bool q_reg;
The right code snippet is:
static bool 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++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
... |
The right code snippet is:
static bool 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++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
static bool 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++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
static bool q_reg;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static bool 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++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
q_n_reg = D << 10;
The right code snippet is:
q_n_reg = ~D; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
... |
The right code snippet is:
q_n_reg = ~D; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
q_n_reg = D << 10;
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
q_n_reg = D << 10;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
q_n_reg = ~D; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
while (1) {
q_reg = D;
q_n_reg = ~D;
}
The right code snippet is:
if (!RESET_B) {
q_reg = 0;
q_n_reg = 1;
} else if (!SET_B) {
q_reg = 1;
q_n_reg = 0;
} else {
q_reg = D;
q_n_reg = ~D;
} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
... |
The right code snippet is:
if (!RESET_B) {
q_reg = 0;
q_n_reg = 1;
} else if (!SET_B) {
q_reg = 1;
q_n_reg = 0;
} else {
q_reg = D;
q_n_reg = ~D;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
while (1) {
q_reg = D;
q_n_reg = ~D;
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
while (1) {
q_reg = D;
q_n_reg = ~D;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (!RESET_B) {
q_reg = 0;
q_n_reg = 1;
} else if (!SET_B) {
q_reg = 1;
q_n_reg = 0;
} else {
q_reg = D;
q_n_reg =... | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
Q = (int)q_reg;
The right code snippet is:
Q = q_reg; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
... |
The right code snippet is:
Q = q_reg; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
Q = (int)q_reg;
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
Q = (int)q_reg;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
Q = q_reg; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
if (!RESET_B) {
q_reg = 0;
q_n_reg = 1;
} else if (!SET_B) {
q_reg = 1;
} else {
q_reg = D;
q_n_reg = ~D;
}
The right code snippet is:
if (!RESET_B) {
q_reg = 0;
q_n_reg = 1;
} else if (!SET_B) {
q_reg = 1;
q_n_reg = 0;
} else {
q_r... | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
... |
The right code snippet is:
if (!RESET_B) {
q_reg = 0;
q_n_reg = 1;
} else if (!SET_B) {
q_reg = 1;
q_n_reg = 0;
} else {
q_reg = D;
q_n_reg = ~D;
} | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
if (!RESET_B) {
q_reg = 0;
q_n_reg = 1;
} else if (!SET_B) {
q_reg = 1;
} else {
q_reg = D;
q_n_reg = ~D;
}
The high-level-synthesis bug type of the code is: 'MLU' | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
if (!RESET_B) {
q_reg = 0;
q_n_reg = 1;
} else if (!SET_B) {
q_reg = 1;
} else {
q_reg = D;
q_n_reg = ~D;
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
if (!RESET_B) {
q_reg = 0;
q_n_reg = 1;
} else if... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
static bool q_reg = 1;
The right code snippet is:
static bool q_reg = 0; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
... |
The right code snippet is:
static bool q_reg = 0; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
static bool q_reg = 1;
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
static bool q_reg = 1;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static bool q_reg = 0; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
Q = q_n_reg;
The right code snippet is:
Q = q_reg; | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
... |
The right code snippet is:
Q = q_reg; | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
Q = q_n_reg;
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
Q = q_n_reg;
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
Q = q_reg; | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
// no suitable code snippet found for this bug type
The right code snippet is:
// no suitable code snippet found for this bug type | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
... |
The right code snippet is:
// no suitable code snippet found for this bug type | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
// no suitable code snippet found for this bug type
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
// no suitable code snippet found for this bug type
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
// no suitable code snippet found for this bug type | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
// no suitable code snippet found for this bug type
The right code snippet is:
// no suitable code snippet found for this bug type | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
... |
The right code snippet is:
// no suitable code snippet found for this bug type | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
// no suitable code snippet found for this bug type
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
// no suitable code snippet found for this bug type
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
// no suitable code snippet found for this bug type | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
// no suitable code snippet found for this bug type
The right code snippet is:
// no suitable code snippet found for this bug type | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
... |
The right code snippet is:
// no suitable code snippet found for this bug type | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
// no suitable code snippet found for this bug type
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void d_ff_async(
bool D,
bool SET_B,
bool RESET_B,
bool CLK,
bool &Q,
bool &Q_N
) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
// no suitable code snippet found for this bug type
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
// no suitable code snippet found for this bug type | 'DID' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.