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_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none po... |
The wrong part of the code is:
memcpy(dest, src+N, N*sizeof(int));
The right code snippet is:
memcpy(dest, src, N*sizeof(int)); | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none port=re... |
The right code snippet is:
memcpy(dest, src, N*sizeof(int)); | '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_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_c... |
The wrong part of the code is:
memcpy(dest, src+N, N*sizeof(int));
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_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bo... |
The wrong part of the code is:
memcpy(dest, src+N, N*sizeof(int));
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
memcpy(dest, src, N*sizeof(int)); | '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_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none po... |
The wrong part of the code is:
#pragma HLS array_partition variable=count factor=3
The right code snippet is:
#pragma HLS array_partition variable=count complete | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none port=re... |
The right code snippet is:
#pragma HLS array_partition variable=count complete | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_c... |
The wrong part of the code is:
#pragma HLS array_partition variable=count factor=3
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bo... |
The wrong part of the code is:
#pragma HLS array_partition variable=count factor=3
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=count complete | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none po... |
The wrong part of the code is:
#pragma HLS array_partition variable=count complete dim=2
The right code snippet is:
#pragma HLS array_partition variable=count complete dim=1 | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none port=re... |
The right code snippet is:
#pragma HLS array_partition variable=count complete dim=1 | '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_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_c... |
The wrong part of the code is:
#pragma HLS array_partition variable=count complete 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:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bo... |
The wrong part of the code is:
#pragma HLS array_partition variable=count complete dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=count complete dim=1 | '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_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none po... |
The wrong part of the code is:
#pragma HLS dataflow region
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none port=re... |
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_c... |
The wrong part of the code is:
#pragma HLS dataflow region
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_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bo... |
The wrong part of the code is:
#pragma HLS dataflow region
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none po... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=reset bundle=DATA_BUS
The right code snippet is:
#pragma HLS interface s_axilite port=reset 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:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none port=re... |
The right code snippet is:
#pragma HLS interface s_axilite port=reset 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:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_c... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=reset bundle=DATA_BUS
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_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bo... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=reset bundle=DATA_BUS
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface s_axilite port=reset 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:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none po... |
The wrong part of the code is:
#pragma HLS interface bram port=count
The right code snippet is:
#pragma HLS interface axis register both port=count | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none port=re... |
The right code snippet is:
#pragma HLS interface axis register both port=count | '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_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_c... |
The wrong part of the code is:
#pragma HLS interface bram port=count
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_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bo... |
The wrong part of the code is:
#pragma HLS interface bram port=count
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface axis register both port=count | '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_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none po... |
The wrong part of the code is:
#pragma HLS interface ap_none port=reset
The right code snippet is:
#pragma HLS interface s_axilite port=reset 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:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none port=re... |
The right code snippet is:
#pragma HLS interface s_axilite port=reset 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:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_c... |
The wrong part of the code is:
#pragma HLS interface ap_none port=reset
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_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bo... |
The wrong part of the code is:
#pragma HLS interface ap_none port=reset
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface s_axilite port=reset 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:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none po... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_ctrl_none port=re... |
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bool clk) {
#pragma HLS INTERFACE ap_c... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP' | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_axi_sdata.h>
#define N 4
typedef ap_axis<32, 2, 5, 6> intSdCh;
void binary_up_counter(bool reset, intSdCh& count, bo... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
data_out = mem[rd_ptr + 1];
The right code snippet is:
data_out = mem[rd_ptr]; | 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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
data_out = mem[rd_ptr]; | 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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
data_out = mem[rd_ptr + 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
data_out = mem[rd_ptr + 1];
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
data_out = mem[rd_ptr]; | 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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
static uint8_t wr_ptr, rd_ptr, count;
The right code snippet is:
static uint8_t wr_ptr = 0, rd_ptr = 0, count = 0; | 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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
static uint8_t wr_ptr = 0, rd_ptr = 0, count = 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:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
static uint8_t wr_ptr, rd_ptr, count;
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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
static uint8_t wr_ptr, rd_ptr, count;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
static uint8_t wr_ptr = 0, rd_ptr = 0, count = 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:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
gray = bin << (bin >> 1);
The right code snippet is:
gray = bin ^ (bin >> 1); | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
gray = bin ^ (bin >> 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:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
gray = bin << (bin >> 1);
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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
gray = bin << (bin >> 1);
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
gray = bin ^ (bin >> 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:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
while(0){
// infinite loop
}
The right code snippet is:
while(1){
// infinite loop
} | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
while(1){
// infinite loop
} | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
while(0){
// infinite loop
}
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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
while(0){
// infinite loop
}
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
while(1){
// infinite loop
} | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
typedef signed char uint8_t;
The right code snippet is:
typedef unsigned char uint8_t; | 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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
typedef unsigned char uint8_t; | 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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
typedef signed char uint8_t;
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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
typedef signed char uint8_t;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
typedef unsigned char uint8_t; | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
for (int i=0; i<DEPTH-1; i++) {
// loop code
}
The right code snippet is:
for (int i=0; i<DEPTH; i++) {
// loop code
} | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
for (int i=0; i<DEPTH; i++) {
// loop 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:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
for (int i=0; i<DEPTH-1; i++) {
// loop code
}
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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
for (int i=0; i<DEPTH-1; i++) {
// loop code
}
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
for (int i=0; i<DEPTH; i++) {
// loop code
} | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
static uint8_t wr_ptr = {0};
The right code snippet is:
static uint8_t wr_ptr = 0; | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
static uint8_t wr_ptr = 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:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
static uint8_t wr_ptr = {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:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
static uint8_t wr_ptr = {0};
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
static uint8_t wr_ptr = 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
mem[wr_ptr+DEPTH] = data_in;
The right code snippet is:
mem[wr_ptr] = data_in; | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
mem[wr_ptr] = data_in; | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
mem[wr_ptr+DEPTH] = data_in;
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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
mem[wr_ptr+DEPTH] = data_in;
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
mem[wr_ptr] = data_in; | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem cyclic
The right code snippet is:
#pragma HLS array_partition variable=mem complete | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
#pragma HLS array_partition variable=mem complete | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem cyclic
The high-level-synthesis bug type of the code is: APT | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem cyclic
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pragma HLS array_partition variable=mem complete | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem factor=3
The right code snippet is:
#pragma HLS array_partition variable=mem complete | FND |
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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
#pragma HLS array_partition variable=mem complete | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem factor=3
The high-level-synthesis bug type of the code is: FND | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem factor=3
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS array_partition variable=mem complete | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem dim=2
The right code snippet is:
#pragma HLS array_partition variable=mem complete | DID |
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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
#pragma HLS array_partition variable=mem complete | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem 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 INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem dim=2
The high-level-synthesis bug type of the code is: DID
The right code snippet is:
#pragma HLS array_partition variable=mem complete | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
The right code snippet is:
#pragma HLS dataflow | DFP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
#pragma HLS dataflow | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
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 INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
The high-level-synthesis bug type of the code is: DFP
The right code snippet is:
#pragma HLS dataflow | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=empty
The right code snippet is:
#pragma HLS interface ap_none port=empty | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
#pragma HLS interface ap_none port=empty | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=empty
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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=empty
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
#pragma HLS interface ap_none port=empty | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
#pragma HLS interface m_axi port=mem random
The right code snippet is:
#pragma HLS interface m_axi port=mem | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
#pragma HLS interface m_axi port=mem | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
#pragma HLS interface m_axi port=mem random
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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
#pragma HLS interface m_axi port=mem random
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
#pragma HLS interface m_axi port=mem | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
#pragma HLS interface bram port=data_in
The right code snippet is:
#pragma HLS interface ap_none port=data_in | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
#pragma HLS interface ap_none port=data_in | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
#pragma HLS interface bram port=data_in
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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
#pragma HLS interface bram port=data_in
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
#pragma HLS interface ap_none port=data_in | 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 ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=mem
The right code snippet is:
#pragma HLS interface ap_fifo port=mem | AMS |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
#pragma HLS interface ap_fifo port=mem | AMS |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=mem
The high-level-synthesis bug type of the code is: AMS | AMS |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=mem
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
#pragma HLS interface ap_fifo port=mem | AMS |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragm... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
#pragma HLS pipeline II=1 | MLP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd_clk
#pragma HLS... |
The right code snippet is:
#pragma HLS pipeline II=1 | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#pragma HLS INTERFACE s_axilite port=rd... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: MLP | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=aclr
#pragma HLS INTERFACE s_axilite port=data_in
#p... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: MLP
The right code snippet is:
#pragma HLS pipeline II=1 | MLP |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.