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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE m_axi port=din
#pragma HLS INTERFACE m_axi port=wr_en
#pragma HLS INTERFACE m_axi port... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=din
#pragma HLS INTERFACE m_axi port=wr_en
#pragma HLS INTERFACE m_axi port=rd_en
#pragma HLS INTERFACE m_axi port=dout
#pragma HLS INTERFACE m_axi port=full
#pragma HLS INTERFACE m_axi port=empty
The right code snippet is:
#pragma HLS INT... | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE m_axi port=din
#pragma HLS INTERFACE m_axi port=wr_en
#pragma HLS INTERFACE m_axi port=rd_e... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none port=rd_en
#pragma HLS INTERFACE ap_none port=dout
#pragma HLS INTERFACE ap_none port=full
#pragma HLS INTERFACE ap_none port=empty | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE m_axi port=din
#pragma HLS INTERFACE m_axi port=wr_en
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=din
#pragma HLS INTERFACE m_axi port=wr_en
#pragma HLS INTERFACE m_axi port=rd_en
#pragma HLS INTERFACE m_axi port=dout
#pragma HLS INTERFACE m_axi port=full
#pragma HLS INTERFACE m_axi port=empty
The high-level-synthesis bug type of the code ... | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE m_axi port=din
#pragma HLS INTERFACE m... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=din
#pragma HLS INTERFACE m_axi port=wr_en
#pragma HLS INTERFACE m_axi port=rd_en
#pragma HLS INTERFACE m_axi port=dout
#pragma HLS INTERFACE m_axi port=full
#pragma HLS INTERFACE m_axi port=empty
The high-level-synthesis bug type of the code ... | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
typedef struct {
ap_uint<DATA_WIDTH> data[FIFO_DEPTH];
} fifo_mem_t;
The right code snippet is:
typedef struct {
ap_uint<DATA_WIDTH> data;
} fifo_mem_t; | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
typedef struct {
ap_uint<DATA_WIDTH> data;
} fifo_mem_t; | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
typedef struct {
ap_uint<DATA_WIDTH> data[FIFO_DEPTH];
} fifo_mem_t;
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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
typedef struct {
ap_uint<DATA_WIDTH> data[FIFO_DEPTH];
} fifo_mem_t;
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
typedef struct {
ap_uint<DATA_WIDTH> data;
} fifo_mem_t; | '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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4;
const int... |
The wrong part of the code is:
hc_visible = ((hc < (hpixels - hfp)) && (hc > (hsc + hbp + 1))) ? (hc - (hsc + hbp)) : 0;
The right code snippet is:
hc_visible = ((hc < (hpixels - hfp)) && (hc > (hsc + hbp))) ? (hc - (hsc + hbp)) : 0; | '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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4;
const int vbp ... |
The right code snippet is:
hc_visible = ((hc < (hpixels - hfp)) && (hc > (hsc + hbp))) ? (hc - (hsc + hbp)) : 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:
```
#include <ap_int.h>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4... |
The wrong part of the code is:
hc_visible = ((hc < (hpixels - hfp)) && (hc > (hsc + hbp + 1))) ? (hc - (hsc + hbp)) : 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:
```
#include <ap_int.h>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;... |
The wrong part of the code is:
hc_visible = ((hc < (hpixels - hfp)) && (hc > (hsc + hbp + 1))) ? (hc - (hsc + hbp)) : 0;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
hc_visible = ((hc < (hpixels - hfp)) && (hc > (hsc + hbp))) ? (hc - (hsc + hbp)) : 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:
```
#include <ap_int.h>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4;
const int... |
The wrong part of the code is:
static ap_uint<10> hc;
static ap_uint<10> vc;
The right code snippet is:
static ap_uint<10> hc = 0;
static ap_uint<10> vc = 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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4;
const int vbp ... |
The right code snippet is:
static ap_uint<10> hc = 0;
static ap_uint<10> vc = 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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4... |
The wrong part of the code is:
static ap_uint<10> hc;
static ap_uint<10> vc;
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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;... |
The wrong part of the code is:
static ap_uint<10> hc;
static ap_uint<10> vc;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static ap_uint<10> hc = 0;
static ap_uint<10> vc = 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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4;
const int... |
The wrong part of the code is:
hs = (hc < (hsc + 1)) ? 0 : 1;
vs = (vc < (vsc + 1)) ? 0 : 1;
The right code snippet is:
hs = (hc < hsc) ? 0 : 1;
vs = (vc < vsc) ? 0 : 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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4;
const int vbp ... |
The right code snippet is:
hs = (hc < hsc) ? 0 : 1;
vs = (vc < vsc) ? 0 : 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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4... |
The wrong part of the code is:
hs = (hc < (hsc + 1)) ? 0 : 1;
vs = (vc < (vsc + 1)) ? 0 : 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:
```
#include <ap_int.h>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;... |
The wrong part of the code is:
hs = (hc < (hsc + 1)) ? 0 : 1;
vs = (vc < (vsc + 1)) ? 0 : 1;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
hs = (hc < hsc) ? 0 : 1;
vs = (vc < vsc) ? 0 : 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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4;
const int... |
The wrong part of the code is:
if(hc == 0) {
if(vc == vlines)
vc_next = 0;
else
vc_next = vc;
} else
while(1);
The right code snippet is:
if(hc == 0) {
if(vc == vlines)
vc_next = 0;
else
vc_next = vc + 1;
} else
vc_next = vc; | '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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4;
const int vbp ... |
The right code snippet is:
if(hc == 0) {
if(vc == vlines)
vc_next = 0;
else
vc_next = vc + 1;
} else
vc_next = vc; | '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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4... |
The wrong part of the code is:
if(hc == 0) {
if(vc == vlines)
vc_next = 0;
else
vc_next = vc;
} else
while(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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;... |
The wrong part of the code is:
if(hc == 0) {
if(vc == vlines)
vc_next = 0;
else
vc_next = vc;
} else
while(1);
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if(hc == 0) {
if(vc == vlines)
vc_next = 0;
else
vc_n... | '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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4;
const int... |
The wrong part of the code is:
int hc_next;
int vc_next;
The right code snippet is:
ap_uint<10> hc_next;
ap_uint<10> vc_next; | '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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4;
const int vbp ... |
The right code snippet is:
ap_uint<10> hc_next;
ap_uint<10> vc_next; | '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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4... |
The wrong part of the code is:
int hc_next;
int vc_next;
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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;... |
The wrong part of the code is:
int hc_next;
int vc_next;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_uint<10> hc_next;
ap_uint<10> vc_next; | '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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4;
const int... |
The wrong part of the code is:
static ap_uint<10> hc = 1;
static ap_uint<10> vc = 1;
The right code snippet is:
static ap_uint<10> hc = 0;
static ap_uint<10> vc = 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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4;
const int vbp ... |
The right code snippet is:
static ap_uint<10> hc = 0;
static ap_uint<10> vc = 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>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;
const int vfp = 3;
const int vsc = 4... |
The wrong part of the code is:
static ap_uint<10> hc = 1;
static ap_uint<10> vc = 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:
```
#include <ap_int.h>
const int hpixels = 1360;
const int vlines = 805;
const int hfp = 64;
const int hsc = 104;
const int hbp = 168;... |
The wrong part of the code is:
static ap_uint<10> hc = 1;
static ap_uint<10> vc = 1;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static ap_uint<10> hc = 0;
static ap_uint<10> vc = 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:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_clk
) {
#p... |
The wrong part of the code is:
if (pd_out) {
cp_out += 2; // accessing array out of bounds
} else {
cp_out -= 1;
}
The right code snippet is:
if (pd_out) {
cp_out += 1;
} else {
cp_out -= 1;
} | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_clk
) {
#pragma... |
The right code snippet is:
if (pd_out) {
cp_out += 1;
} else {
cp_out -= 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:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_c... |
The wrong part of the code is:
if (pd_out) {
cp_out += 2; // accessing array out of bounds
} else {
cp_out -= 1;
}
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool r... |
The wrong part of the code is:
if (pd_out) {
cp_out += 2; // accessing array out of bounds
} else {
cp_out -= 1;
}
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
if (pd_out) {
cp_out += 1;
} else {
cp_out -= 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:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_clk
) {
#p... |
The wrong part of the code is:
static ap_uint<8> lf_out; // variable not initialized
lf_out += cp_out;
The right code snippet is:
static ap_uint<8> lf_out = 0;
lf_out += cp_out; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_clk
) {
#pragma... |
The right code snippet is:
static ap_uint<8> lf_out = 0;
lf_out += cp_out; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_c... |
The wrong part of the code is:
static ap_uint<8> lf_out; // variable not initialized
lf_out += cp_out;
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_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool r... |
The wrong part of the code is:
static ap_uint<8> lf_out; // variable not initialized
lf_out += cp_out;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static ap_uint<8> lf_out = 0;
lf_out += cp_out; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_clk
) {
#p... |
The wrong part of the code is:
if (reset) {
while(1); // infinite loop
cp_out = 0;
lf_out = 0;
vco_count = 0;
}
The right code snippet is:
if (reset) {
cp_out = 0;
lf_out = 0;
vco_count = 0;
} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_clk
) {
#pragma... |
The right code snippet is:
if (reset) {
cp_out = 0;
lf_out = 0;
vco_count = 0;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_c... |
The wrong part of the code is:
if (reset) {
while(1); // infinite loop
cp_out = 0;
lf_out = 0;
vco_count = 0;
}
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_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool r... |
The wrong part of the code is:
if (reset) {
while(1); // infinite loop
cp_out = 0;
lf_out = 0;
vco_count = 0;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (reset) {
cp_out = 0;
lf_out = 0;
vco_count = 0;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_clk
) {
#p... |
The wrong part of the code is:
pd_out = (ap_int<2>)ref_clk ^ locked_clk; // unintended sign extension
The right code snippet is:
pd_out = ref_clk ^ locked_clk; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_clk
) {
#pragma... |
The right code snippet is:
pd_out = ref_clk ^ locked_clk; | '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_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_c... |
The wrong part of the code is:
pd_out = (ap_int<2>)ref_clk ^ locked_clk; // unintended sign extension
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_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool r... |
The wrong part of the code is:
pd_out = (ap_int<2>)ref_clk ^ locked_clk; // unintended sign extension
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
pd_out = ref_clk ^ locked_clk; | '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_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_clk
) {
#p... |
The wrong part of the code is:
#pragma HLS array_partition variable=cp_out cyclic dim=0 // incorrect partition type
The right code snippet is:
#pragma HLS array_partition variable=cp_out complete dim=0 | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_clk
) {
#pragma... |
The right code snippet is:
#pragma HLS array_partition variable=cp_out complete dim=0 | '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_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_c... |
The wrong part of the code is:
#pragma HLS array_partition variable=cp_out cyclic dim=0 // incorrect partition 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:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool r... |
The wrong part of the code is:
#pragma HLS array_partition variable=cp_out cyclic dim=0 // incorrect partition type
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=cp_out complete dim=0 | '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_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_clk
) {
#p... |
The wrong part of the code is:
#pragma HLS unroll factor=3 // inner loops not fully unrolled
The right code snippet is:
#pragma HLS unroll factor=2 | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_clk
) {
#pragma... |
The right code snippet is:
#pragma HLS unroll factor=2 | '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_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool reset,
bool enable,
bool &locked_c... |
The wrong part of the code is:
#pragma HLS unroll factor=3 // inner loops not fully unrolled
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_fixed.h>
const int N = 2; // multiplication factor
const int M = 1; // division factor
void PLL(
bool ref_clk,
bool r... |
The wrong part of the code is:
#pragma HLS unroll factor=3 // inner loops not fully unrolled
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
#pragma HLS unroll factor=2 | 'ILNU' |
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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The wrong part of the code is:
ap_uint<4> digit1 = P(5, 2);
The right code snippet is:
ap_uint<4> digit1 = P(3, 0); | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The right code snippet is:
ap_uint<4> digit1 = P(3, 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:
```
#include <ap_int.h>
void bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b11110... |
The wrong part of the code is:
ap_uint<4> digit1 = P(5, 2);
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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000;... |
The wrong part of the code is:
ap_uint<4> digit1 = P(5, 2);
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
ap_uint<4> digit1 = P(3, 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:
```
#include <ap_int.h>
void bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The wrong part of the code is:
ap_uint<7> seg1 = 0;
The right code snippet is:
ap_uint<7> seg1; | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The right code snippet is:
ap_uint<7> seg1; | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b11110... |
The wrong part of the code is:
ap_uint<7> seg1 = 0;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000;... |
The wrong part of the code is:
ap_uint<7> seg1 = 0;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<7> seg1; | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The wrong part of the code is:
ap_uint<4> A_shifted = A << 5;
The right code snippet is:
ap_uint<4> A; | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The right code snippet is:
ap_uint<4> A; | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b11110... |
The wrong part of the code is:
ap_uint<4> A_shifted = A << 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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000;... |
The wrong part of the code is:
ap_uint<4> A_shifted = A << 5;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
ap_uint<4> A; | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
The right code snippet is:
for (int i = 0; i < 10; i++) { | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The right code snippet is:
for (int i = 0; i < 10; i++) { | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b11110... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000;... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
for (int i = 0; i < 10; i++) { | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The wrong part of the code is:
ap_int<16> P_signed = P;
The right code snippet is:
ap_uint<16> P; | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The right code snippet is:
ap_uint<16> P; | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b11110... |
The wrong part of the code is:
ap_int<16> P_signed = P;
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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000;... |
The wrong part of the code is:
ap_int<16> P_signed = P;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_uint<16> P; | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The wrong part of the code is:
for (int i = 0; i < 4; i+=2) {
#pragma HLS UNROLL
// loop body
}
The right code snippet is:
for (int i = 0; i < 4; i++) {
#pragma HLS UNROLL
// loop body
} | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The right code snippet is:
for (int i = 0; i < 4; i++) {
#pragma HLS UNROLL
// loop body
} | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b11110... |
The wrong part of the code is:
for (int i = 0; i < 4; i+=2) {
#pragma HLS UNROLL
// loop body
}
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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000;... |
The wrong part of the code is:
for (int i = 0; i < 4; i+=2) {
#pragma HLS UNROLL
// loop body
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < 4; i++) {
#pragma HLS UNROLL
// loop body
} | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The wrong part of the code is:
ap_uint<16> P = 5;
The right code snippet is:
ap_uint<16> P = 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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The right code snippet is:
ap_uint<16> P = 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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b11110... |
The wrong part of the code is:
ap_uint<16> P = 5;
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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000;... |
The wrong part of the code is:
ap_uint<16> P = 5;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<16> P = 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:
```
#include <ap_int.h>
void bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The wrong part of the code is:
ap_uint<4> digit1 = P(7, 4);
The right code snippet is:
ap_uint<4> digit1 = P(3, 0); | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The right code snippet is:
ap_uint<4> digit1 = P(3, 0); | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b11110... |
The wrong part of the code is:
ap_uint<4> digit1 = P(7, 4);
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000;... |
The wrong part of the code is:
ap_uint<4> digit1 = P(7, 4);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
ap_uint<4> digit1 = P(3, 0); | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=seg cyclic factor=2 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=seg complete dim=1 | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=seg complete dim=1 | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b11110... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=seg cyclic factor=2 dim=1
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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000;... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=seg cyclic factor=2 dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=seg complete dim=1 | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=P cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=P cyclic factor=4 dim=1 | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=P cyclic factor=4 dim=1 | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b11110... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=P 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:
```
#include <ap_int.h>
void bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000;... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=P cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=P cyclic factor=4 dim=1 | '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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=P cyclic factor=5 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=P cyclic factor=4 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_int.h>
void bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b1111001; break;
... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=P cyclic factor=4 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_int.h>
void bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000; break;
case 1: SEG = 0b11110... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=P cyclic factor=5 dim=1
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 bcd_to_7seg_decoder(ap_uint<4> BCD, ap_uint<7> &SEG) {
switch (BCD) {
case 0: SEG = 0b1000000;... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=P cyclic factor=5 dim=1
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=P cyclic factor=4 dim=1 | 'DID' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.