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 binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out = 1; break;... |
The wrong part of the code is:
case 10: bcd_out = 9; break;
The right code snippet is:
case 9: bcd_out = 9; break; | '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 binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out = 1; break;
... |
The right code snippet is:
case 9: bcd_out = 9; 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:
```
#include "ap_int.h"
void binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out ... |
The wrong part of the code is:
case 10: bcd_out = 9; 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:
```
#include "ap_int.h"
void binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out... |
The wrong part of the code is:
case 10: bcd_out = 9; break;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
case 9: bcd_out = 9; 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:
```
#include "ap_int.h"
void binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out = 1; break;... |
The wrong part of the code is:
ap_uint<4> binary_reg;
The right code snippet is:
static ap_uint<4> binary_reg = 0; | '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 binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out = 1; break;
... |
The right code snippet is:
static ap_uint<4> binary_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:
```
#include "ap_int.h"
void binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out ... |
The wrong part of the code is:
ap_uint<4> binary_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:
```
#include "ap_int.h"
void binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out... |
The wrong part of the code is:
ap_uint<4> binary_reg;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static ap_uint<4> binary_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:
```
#include "ap_int.h"
void binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out = 1; break;... |
The wrong part of the code is:
binary_reg = binary_reg << 5;
The right code snippet is:
binary_reg = binary_reg + 1; | '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 binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out = 1; break;
... |
The right code snippet is:
binary_reg = binary_reg + 1; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out ... |
The wrong part of the code is:
binary_reg = binary_reg << 5;
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out... |
The wrong part of the code is:
binary_reg = binary_reg << 5;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
binary_reg = binary_reg + 1; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out = 1; break;... |
The wrong part of the code is:
while(slowena == 1) {
binary_reg = binary_reg + 1;
}
The right code snippet is:
if(slowena == 1) {
binary_reg = binary_reg + 1;
} | '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 binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out = 1; break;
... |
The right code snippet is:
if(slowena == 1) {
binary_reg = binary_reg + 1;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include "ap_int.h"
void binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out ... |
The wrong part of the code is:
while(slowena == 1) {
binary_reg = binary_reg + 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:
```
#include "ap_int.h"
void binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out... |
The wrong part of the code is:
while(slowena == 1) {
binary_reg = binary_reg + 1;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if(slowena == 1) {
binary_reg = binary_reg + 1;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include "ap_int.h"
void binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out = 1; break;... |
The wrong part of the code is:
static int binary_reg = 0;
The right code snippet is:
static ap_uint<4> binary_reg = 0; | '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 binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out = 1; break;
... |
The right code snippet is:
static ap_uint<4> binary_reg = 0; | '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 binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out ... |
The wrong part of the code is:
static int binary_reg = 0;
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 binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out... |
The wrong part of the code is:
static int binary_reg = 0;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
static ap_uint<4> binary_reg = 0; | '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 binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out = 1; break;... |
The wrong part of the code is:
static ap_uint<4> binary_reg;
The right code snippet is:
static ap_uint<4> binary_reg = 0; | '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 binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out = 1; break;
... |
The right code snippet is:
static ap_uint<4> binary_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:
```
#include "ap_int.h"
void binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out = 0; break;
case 1: bcd_out ... |
The wrong part of the code is:
static ap_uint<4> binary_reg;
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 binary_to_bcd(ap_uint<4> binary_in, ap_uint<4>& bcd_out) {
switch(binary_in) {
case 0: bcd_out... |
The wrong part of the code is:
static ap_uint<4> binary_reg;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static ap_uint<4> binary_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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // numb... |
The wrong part of the code is:
ctrl[0] = data[8] & data[1]; // Control signal 1
The right code snippet is:
ctrl[0] = data[0] & data[1]; // Control signal 1 | 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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of... |
The right code snippet is:
ctrl[0] = data[0] & data[1]; // Control signal 1 | 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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m =... |
The wrong part of the code is:
ctrl[0] = data[8] & data[1]; // Control signal 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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; //... |
The wrong part of the code is:
ctrl[0] = data[8] & data[1]; // Control signal 1
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
ctrl[0] = data[0] & data[1]; // Control signal 1 | 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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // numb... |
The wrong part of the code is:
// Define control signals as Boolean functions of the input signals
bool temp;
ctrl[0] = temp & data[1]; // Control signal 1
The right code snippet is:
// Define control signals as Boolean functions of the input signals
ctrl[0] = data[0] & data[1]; // Control signal 1 | 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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of... |
The right code snippet is:
// Define control signals as Boolean functions of the input signals
ctrl[0] = data[0] & data[1]; // Control signal 1 | 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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m =... |
The wrong part of the code is:
// Define control signals as Boolean functions of the input signals
bool temp;
ctrl[0] = temp & data[1]; // Control signal 1
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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; //... |
The wrong part of the code is:
// Define control signals as Boolean functions of the input signals
bool temp;
ctrl[0] = temp & data[1]; // Control signal 1
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
// Define control signals as Boolean functions of the input s... | 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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // numb... |
The wrong part of the code is:
ctrl[1] = data[2] << 4 | data[3]; // Control signal 2
The right code snippet is:
ctrl[1] = data[2] | data[3]; // Control signal 2 | SHFT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of... |
The right code snippet is:
ctrl[1] = data[2] | data[3]; // Control signal 2 | 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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m =... |
The wrong part of the code is:
ctrl[1] = data[2] << 4 | data[3]; // Control signal 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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; //... |
The wrong part of the code is:
ctrl[1] = data[2] << 4 | data[3]; // Control signal 2
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
ctrl[1] = data[2] | data[3]; // Control signal 2 | SHFT |
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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // numb... |
The wrong part of the code is:
// Write data to the LCD
while(true) {
// Write data to the LCD
}
The right code snippet is:
// Write data to the LCD
if (ctrl[0]) {
// Write data to the LCD
} | INF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of... |
The right code snippet is:
// Write data to the LCD
if (ctrl[0]) {
// Write data to the LCD
} | 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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m =... |
The wrong part of the code is:
// Write data to the LCD
while(true) {
// Write data to the LCD
}
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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; //... |
The wrong part of the code is:
// Write data to the LCD
while(true) {
// Write data to the LCD
}
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
// Write data to the LCD
if (ctrl[0]) {
// Write data to the LCD
} | INF |
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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // numb... |
The wrong part of the code is:
unsigned char temp1 = data[4];
unsigned char temp2 = data[5];
ctrl[2] = temp1 ^ temp2; // Control signal 3
The right code snippet is:
ctrl[2] = data[4] ^ data[5]; // Control signal 3 | 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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of... |
The right code snippet is:
ctrl[2] = data[4] ^ data[5]; // Control signal 3 | 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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m =... |
The wrong part of the code is:
unsigned char temp1 = data[4];
unsigned char temp2 = data[5];
ctrl[2] = temp1 ^ temp2; // Control signal 3
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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; //... |
The wrong part of the code is:
unsigned char temp1 = data[4];
unsigned char temp2 = data[5];
ctrl[2] = temp1 ^ temp2; // Control signal 3
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
ctrl[2] = data[4] ^ data[5]; // Control signal 3 | USE |
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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // numb... |
The wrong part of the code is:
// Read data from the LCD
if (ctrl[1]) {
// Read data from the LCD
// Read data from the LCD
}
The right code snippet is:
// Read data from the LCD
if (ctrl[1]) {
// Read data from the LCD
} | MLU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of... |
The right code snippet is:
// Read data from the LCD
if (ctrl[1]) {
// Read data from the LCD
} | 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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m =... |
The wrong part of the code is:
// Read data from the LCD
if (ctrl[1]) {
// Read data from the LCD
// Read data from the LCD
}
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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; //... |
The wrong part of the code is:
// Read data from the LCD
if (ctrl[1]) {
// Read data from the LCD
// Read data from the LCD
}
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
// Read data from the LCD
if (ctrl[1]) {
// Read data from the LCD
} | MLU |
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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 0; // number of data signals
const int m = 3; // numb... |
The wrong part of the code is:
const int n = 0; // number of data signals
The right code snippet is:
const int n = 8; // number of data signals | ZERO |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 0; // number of data signals
const int m = 3; // number of... |
The right code snippet is:
const int n = 8; // number of data signals | 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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 0; // number of data signals
const int m =... |
The wrong part of the code is:
const int n = 0; // number of data signals
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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 0; //... |
The wrong part of the code is:
const int n = 0; // number of data signals
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
const int n = 8; // number of data signals | 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 s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // numb... |
The wrong part of the code is:
bool buffer[8];
for(int i = 0; i < 4; i++) {
buffer[i] = data[i];
}
ctrl[2] = buffer[4] ^ buffer[5]; // Control signal 3
The right code snippet is:
// Define control signals as Boolean functions of the input signals
ctrl[2] = data[4] ^ data[5]; // Control signal 3 | BUF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of... |
The right code snippet is:
// Define control signals as Boolean functions of the input signals
ctrl[2] = data[4] ^ data[5]; // Control signal 3 | 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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m =... |
The wrong part of the code is:
bool buffer[8];
for(int i = 0; i < 4; i++) {
buffer[i] = data[i];
}
ctrl[2] = buffer[4] ^ buffer[5]; // Control signal 3
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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; //... |
The wrong part of the code is:
bool buffer[8];
for(int i = 0; i < 4; i++) {
buffer[i] = data[i];
}
ctrl[2] = buffer[4] ^ buffer[5]; // Control signal 3
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
// Define control signals as Boolean functions of the input si... | BUF |
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 s_axilite port=ctrl bundle=DATA_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // numb... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=DATA_BUS
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | APT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=DATA_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | 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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=DATA_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m =... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=DATA_BUS
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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=DATA_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; //... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=DATA_BUS
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | APT |
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 ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=1
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; /... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | FND |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=1
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // num... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | 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:
#pragma HLS ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=1
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const i... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: FND | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=1
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n =... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | FND |
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 ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=2
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; /... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=2
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | DID |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=2
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // num... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | 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:
#pragma HLS ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=2
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const i... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=2
The high-level-synthesis bug type of the code is: DID | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=2
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n =... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=ctrl cyclic factor=3 dim=2
The high-level-synthesis bug type of the code is: DID
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | DID |
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 DATAFLOW
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of control signals
void LCD_drive... |
The wrong part of the code is:
#pragma HLS DATAFLOW
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | DFP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS DATAFLOW
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of control signals
void LCD_driver(boo... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | 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:
#pragma HLS DATAFLOW
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of control signals
voi... |
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:
#pragma HLS DATAFLOW
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m =... |
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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | DFP |
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 s_axilite port=ctrl bundle=CTRL_BUS depth=8
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3;... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS depth=8
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | IDAP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS depth=8
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // n... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | 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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS depth=8
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS depth=8
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:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS depth=8
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS depth=8
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | IDAP |
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 m_axi port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number o... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=ctrl bundle=CTRL_BUS
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | RAMB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE m_axi port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of con... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | 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:
#pragma HLS INTERFACE m_axi port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; ... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=ctrl bundle=CTRL_BUS
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:
#pragma HLS INTERFACE m_axi port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // num... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=ctrl bundle=CTRL_BUS
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | RAMB |
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 bram port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=ctrl bundle=CTRL_BUS
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | SMA |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE bram port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of cont... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | 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:
#pragma HLS INTERFACE bram port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; /... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=ctrl bundle=CTRL_BUS
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:
#pragma HLS INTERFACE bram port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // numb... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=ctrl bundle=CTRL_BUS
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | SMA |
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 axis port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=ctrl bundle=CTRL_BUS
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | AMS |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE axis port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of cont... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | AMS |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE axis port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; /... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=ctrl bundle=CTRL_BUS
The high-level-synthesis bug type of the code is: AMS | AMS |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE axis port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // numb... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=ctrl bundle=CTRL_BUS
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS | AMS |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // numb... |
The wrong part of the code is:
#pragma HLS pipeline II=2
void LCD_driver(bool data[n], bool ctrl[m]) {
The right code snippet is:
void LCD_driver(bool data[n], bool ctrl[m]) { | MLP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m = 3; // number of... |
The right code snippet is:
void LCD_driver(bool data[n], bool ctrl[m]) { | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; // number of data signals
const int m =... |
The wrong part of the code is:
#pragma HLS pipeline II=2
void LCD_driver(bool data[n], bool ctrl[m]) {
The high-level-synthesis bug type of the code is: MLP | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=ctrl bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS
const int n = 8; //... |
The wrong part of the code is:
#pragma HLS pipeline II=2
void LCD_driver(bool data[n], bool ctrl[m]) {
The high-level-synthesis bug type of the code is: MLP
The right code snippet is:
void LCD_driver(bool data[n], bool ctrl[m]) { | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <hls_math.h>
const int MEM_SIZE = 65536;
typedef ap_uint<8> uint8_t;
typedef ap_uint<16> uint16_t;
typedef ap_uint<32> uint32_t;
typedef ap_uint<48> uint48_t;
void memory... |
The wrong part of the code is:
data[addr + MEM_SIZE] = idata;
Bug_type:
'INIT'
The right code snippet is:
data[addr] = idata; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_math.h>
const int MEM_SIZE = 65536;
typedef ap_uint<8> uint8_t;
typedef ap_uint<16> uint16_t;
typedef ap_uint<32> uint32_t;
typedef ap_uint<48> uint48_t;
void memory(bool... |
The right code snippet is:
data[addr] = idata; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <hls_math.h>
const int MEM_SIZE = 65536;
typedef ap_uint<8> uint8_t;
typedef ap_uint<16> uint16_t;
typedef ap_uint<32> uint32_t;
typedef ap_uint<48> uint48_t;
... |
The wrong part of the code is:
data[addr + MEM_SIZE] = idata;
Bug_type:
'INIT'
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <hls_math.h>
const int MEM_SIZE = 65536;
typedef ap_uint<8> uint8_t;
typedef ap_uint<16> uint16_t;
typedef ap_uint<32> uint... |
The wrong part of the code is:
data[addr + MEM_SIZE] = idata;
Bug_type:
'INIT'
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
data[addr] = idata; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void dff_async_reset_set_enable(
bool D,
bool CLK,
bool RESET,
bool SET,
bool EN,
bool &Q,
bool &QBAR
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
Q = Q_reg + 1;
The right code snippet is:
Q = Q_reg; | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void dff_async_reset_set_enable(
bool D,
bool CLK,
bool RESET,
bool SET,
bool EN,
bool &Q,
bool &QBAR
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
Q = Q_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:
void dff_async_reset_set_enable(
bool D,
bool CLK,
bool RESET,
bool SET,
bool EN,
bool &Q,
bool &QBAR
) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
Q = Q_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:
void dff_async_reset_set_enable(
bool D,
bool CLK,
bool RESET,
bool SET,
bool EN,
bool &Q,
bool &QBAR
) {
... |
The wrong part of the code is:
Q = Q_reg + 1;
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
Q = Q_reg; | OOB |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.