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_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl_n... |
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_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl_none p... |
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_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFAC... |
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_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE a... |
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_vld port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=a
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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_vld port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl_none po... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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_vld port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=a
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_vld port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=a
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl_n... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=data depth=512
The right code snippet is:
#pragma HLS INTERFACE m_axi port=data depth=1024 | '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_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl_none p... |
The right code snippet is:
#pragma HLS INTERFACE m_axi port=data depth=1024 | '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_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=data depth=512
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_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=data depth=512
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS INTERFACE m_axi port=data depth=1024 | '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=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl_none... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=a
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl_none port... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=a
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=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=a
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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_memory port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=a
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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_memory port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl_none... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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_memory port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=a
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_memory port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=a
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl_n... |
The wrong part of the code is:
#pragma HLS PIPELINE II=2
The right code snippet is:
#pragma HLS PIPELINE | '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_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl_none p... |
The right code snippet is:
#pragma HLS PIPELINE | '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_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFAC... |
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_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE a... |
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 | '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_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl_n... |
The wrong part of the code is:
#pragma HLS UNROLL factor=2
The right code snippet is:
#pragma HLS UNROLL | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_ctrl_none p... |
The right code snippet is:
#pragma HLS UNROLL | '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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS UNROLL factor=2
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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS UNROLL factor=2
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
#pragma HLS UNROLL | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void divider(bool &Y, bool &Z, bool X) {
#pragma HLS INTERFACE ap_none port=Y
#pragma HLS INTERFACE ap_none port=Z
#pragma HLS INTERFACE ap_none port=X
static unsig... |
The wrong part of the code is:
static unsigned int counter_1;
Bug_type:
INF
The right code snippet is:
static unsigned int counter_1 = 0; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void divider(bool &Y, bool &Z, bool X) {
#pragma HLS INTERFACE ap_none port=Y
#pragma HLS INTERFACE ap_none port=Z
#pragma HLS INTERFACE ap_none port=X
static unsigned i... |
The right code snippet is:
static unsigned int counter_1 = 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:
```
void divider(bool &Y, bool &Z, bool X) {
#pragma HLS INTERFACE ap_none port=Y
#pragma HLS INTERFACE ap_none port=Z
#pragma HLS INTERFACE ap_none port=X
s... |
The wrong part of the code is:
static unsigned int counter_1;
Bug_type:
INF
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:
```
void divider(bool &Y, bool &Z, bool X) {
#pragma HLS INTERFACE ap_none port=Y
#pragma HLS INTERFACE ap_none port=Z
#pragm... |
The wrong part of the code is:
static unsigned int counter_1;
Bug_type:
INF
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
static unsigned int counter_1 = 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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
if (sel == 0) {
if (fb_clk_divider > ref_clk_divider + 1) {
phase_detector_output = fb_clk_divider - ref_clk_divider;
} else {
phase_detector_output = ref_clk_divider - fb_clk_divider;
}
} else {
if (fb_clk_divider > delay_line_output + 1) {
ph... | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
if (sel == 0) {
if (fb_clk_divider > ref_clk_divider) {
phase_detector_output = fb_clk_divider - ref_clk_divider;
} else {
phase_detector_output = ref_clk_divider - fb_clk_divider;
}
} else {
if (fb_clk_divider > delay_line_output) {
phase_detector... | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
if (sel == 0) {
if (fb_clk_divider > ref_clk_divider + 1) {
phase_detector_output = fb_clk_divider - ref_clk_divider;
} else {
phase_detector_output = ref_clk_divider - fb_clk_divider;
}
} else {
if (fb_clk_divider > delay_line_output + 1) {
ph... | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
if (sel == 0) {
if (fb_clk_divider > ref_clk_divider + 1) {
phase_detector_output = fb_clk_divider - ref_clk_divider;
} else {
phase_detector_output = ref_clk_divider - fb_clk_divider;
}
} else {
if (fb_clk_divider > delay_line_output + 1) {
ph... | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
int delay_output;
The right code snippet is:
int delay_output = 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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
int delay_output = 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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
int delay_output;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
int delay_output;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
int delay_output = 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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
vco_output = vco_phase << 33;
The right code snippet is:
vco_output = vco_phase >> 31; | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
vco_output = vco_phase >> 31; | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
vco_output = vco_phase << 33;
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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
vco_output = vco_phase << 33;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
vco_output = vco_phase >> 31; | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
#pragma HLS PIPELINE
fb_clk_divider_func();
}
The right code snippet is:
for (int i = 0; i < cycles; i++) {
#pragma HLS PIPELINE
fb_clk_divider_func();
} | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
for (int i = 0; i < cycles; i++) {
#pragma HLS PIPELINE
fb_clk_divider_func();
} | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
#pragma HLS PIPELINE
fb_clk_divider_func();
}
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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
#pragma HLS PIPELINE
fb_clk_divider_func();
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
for (int i = 0; i < cycles; i++) {
#pragma HLS PIPELINE
fb_clk_divider_func();
} | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
void delay_line_func(int sel, int ref_clk) {
if (sel == -1) {
delay_line_input = ref_clk;
delay_line_output = delay_line_input;
}
}
The right code snippet is:
void delay_line_func(int sel, int ref_clk) {
if (sel == 1) {
delay_line_input = ref_clk;
de... | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
void delay_line_func(int sel, int ref_clk) {
if (sel == 1) {
delay_line_input = ref_clk;
delay_line_output = delay_line_input;
}
} | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
void delay_line_func(int sel, int ref_clk) {
if (sel == -1) {
delay_line_input = ref_clk;
delay_line_output = delay_line_input;
}
}
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
void delay_line_func(int sel, int ref_clk) {
if (sel == -1) {
delay_line_input = ref_clk;
delay_line_output = delay_line_input;
}
}
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
void delay_line_func(int sel, int ref_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:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS unroll factor=2
for (int i = 0; i < cycles; i++) {
fb_clk_divider_func();
fb_clk_divider_func();
}
The right code snippet is:
for (int i = 0; i < cycles; i++) {
#pragma HLS PIPELINE
fb_clk_divider_func();
} | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
for (int i = 0; i < cycles; i++) {
#pragma HLS PIPELINE
fb_clk_divider_func();
} | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS unroll factor=2
for (int i = 0; i < cycles; i++) {
fb_clk_divider_func();
fb_clk_divider_func();
}
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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS unroll factor=2
for (int i = 0; i < cycles; i++) {
fb_clk_divider_func();
fb_clk_divider_func();
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < cycles; i++) {
#pragma HLS PIPELINE
... | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
const int delay_detector_gain = 0;
The right code snippet is:
const int delay_detector_gain = 100; | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
const int delay_detector_gain = 100; | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
const int delay_detector_gain = 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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
const int delay_detector_gain = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
const int delay_detector_gain = 100; | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
void PLL_DLL(int ref_clk, int fb_clk, int sel, int out_clk) {
The right code snippet is:
void PLL_DLL(int ref_clk, int fb_clk, int sel, int& out_clk) { | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
void PLL_DLL(int ref_clk, int fb_clk, int sel, int& out_clk) { | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
void PLL_DLL(int ref_clk, int fb_clk, int sel, int out_clk) {
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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
void PLL_DLL(int ref_clk, int fb_clk, int sel, int out_clk) {
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
void PLL_DLL(int ref_clk, int fb_clk, int sel, int& out_clk) { | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS array_partition variable=delay_line_input cyclic dim=1
The right code snippet is:
#pragma HLS array_partition variable=delay_line_input 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:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
#pragma HLS array_partition variable=delay_line_input 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:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS array_partition variable=delay_line_input cyclic 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:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS array_partition variable=delay_line_input cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=delay_line_input 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:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS array_partition variable=delay_line_input complete dim=2
The right code snippet is:
#pragma HLS array_partition variable=delay_line_input complete dim=1 | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
#pragma HLS array_partition variable=delay_line_input complete 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:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS array_partition variable=delay_line_input complete dim=2
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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS array_partition variable=delay_line_input complete dim=2
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=delay_line_input complete 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:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS array_partition variable=delay_line_input complete dim=0
The right code snippet is:
#pragma HLS array_partition variable=delay_line_input 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:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
#pragma HLS array_partition variable=delay_line_input 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:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS array_partition variable=delay_line_input complete dim=0
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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS array_partition variable=delay_line_input complete dim=0
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=delay_line_input 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:
#pragma HLS INTERFACE ap_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
void PLL_DLL(int ref_clk, int fb_clk, int sel, int& out_clk) {
#pragma HLS DATAFLOW II=2
The right code snippet is:
void PLL_DLL(int ref_clk, int fb_clk, int sel, int& out_clk) {
#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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
void PLL_DLL(int ref_clk, int fb_clk, int sel, int& out_clk) {
#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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
void PLL_DLL(int ref_clk, int fb_clk, int sel, int& out_clk) {
#pragma HLS DATAFLOW II=2
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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
void PLL_DLL(int ref_clk, int fb_clk, int sel, int& out_clk) {
#pragma HLS DATAFLOW II=2
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
void PLL_DLL(int ref_clk, int fb_clk, int sel, int& out_clk) {
#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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=ref_clk
The right code snippet is:
#pragma HLS interface ap_none port=ref_clk | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
#pragma HLS interface ap_none port=ref_clk | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=ref_clk
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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=ref_clk
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface ap_none port=ref_clk | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS interface m_axi port=ref_clk offset=slave depth=
The right code snippet is:
#pragma HLS interface m_axi port=ref_clk offset=slave depth=256 | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The right code snippet is:
#pragma HLS interface m_axi port=ref_clk offset=slave depth=256 | '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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS interface m_axi port=ref_clk offset=slave depth=
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_none port=ref_clk
#pragma HLS INTERFACE ap_none port=fb_clk
#pragma HLS INTERFACE ap_none port=sel
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS interface m_axi port=ref_clk offset=slave depth=
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi port=ref_clk offset=slave depth=256 | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void top_module(ap_uint<4> A, ap_uint<4> B, bool& eq, bool& gt, bool C, ap_uint<4> D, ap_uint<4>& final_output) {
// 4-bit magnitude comparator
ap_uint<4>... |
The wrong part of the code is:
ap_uint<4> shifted_value = (C == 0) ? (A << D+1) : (A >> D+1);
The right code snippet is:
ap_uint<4> shifted_value = (C == 0) ? (A << D) : (A >> D); | '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 top_module(ap_uint<4> A, ap_uint<4> B, bool& eq, bool& gt, bool C, ap_uint<4> D, ap_uint<4>& final_output) {
// 4-bit magnitude comparator
ap_uint<4> eq_t... |
The right code snippet is:
ap_uint<4> shifted_value = (C == 0) ? (A << D) : (A >> D); | '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 top_module(ap_uint<4> A, ap_uint<4> B, bool& eq, bool& gt, bool C, ap_uint<4> D, ap_uint<4>& final_output) {
// 4-bit magnitude comparator
... |
The wrong part of the code is:
ap_uint<4> shifted_value = (C == 0) ? (A << D+1) : (A >> D+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_int.h>
void top_module(ap_uint<4> A, ap_uint<4> B, bool& eq, bool& gt, bool C, ap_uint<4> D, ap_uint<4>& final_output) {
... |
The wrong part of the code is:
ap_uint<4> shifted_value = (C == 0) ? (A << D+1) : (A >> D+1);
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
ap_uint<4> shifted_value = (C == 0) ? (A << D) : (A >> D); | '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 top_module(ap_uint<4> A, ap_uint<4> B, bool eq; bool gt; bool C, ap_uint<4> D, ap_uint<4>& final_output) {
// 4-bit magnitude comparator
ap_uint<4> e... |
The wrong part of the code is:
bool eq; bool gt;
The right code snippet is:
bool& eq, bool& gt, | '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 top_module(ap_uint<4> A, ap_uint<4> B, bool eq; bool gt; bool C, ap_uint<4> D, ap_uint<4>& final_output) {
// 4-bit magnitude comparator
ap_uint<4> eq_tem... |
The right code snippet is:
bool& eq, bool& gt, | '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 top_module(ap_uint<4> A, ap_uint<4> B, bool eq; bool gt; bool C, ap_uint<4> D, ap_uint<4>& final_output) {
// 4-bit magnitude comparator
a... |
The wrong part of the code is:
bool eq; bool gt;
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 top_module(ap_uint<4> A, ap_uint<4> B, bool eq; bool gt; bool C, ap_uint<4> D, ap_uint<4>& final_output) {
... |
The wrong part of the code is:
bool eq; bool gt;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
bool& eq, bool& gt, | '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 top_module(ap_uint<4> A, ap_uint<4> B, bool& eq, bool& gt, bool C, ap_uint<4> D, ap_uint<4>& final_output) {
// 4-bit magnitude comparator
ap_uint<4>... |
The wrong part of the code is:
ap_uint<4> shifted_value = (C == 0) ? (A << 5) : (A >> 5);
The right code snippet is:
ap_uint<4> shifted_value = (C == 0) ? (A << D) : (A >> D); | '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 top_module(ap_uint<4> A, ap_uint<4> B, bool& eq, bool& gt, bool C, ap_uint<4> D, ap_uint<4>& final_output) {
// 4-bit magnitude comparator
ap_uint<4> eq_t... |
The right code snippet is:
ap_uint<4> shifted_value = (C == 0) ? (A << D) : (A >> D); | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void top_module(ap_uint<4> A, ap_uint<4> B, bool& eq, bool& gt, bool C, ap_uint<4> D, ap_uint<4>& final_output) {
// 4-bit magnitude comparator
... |
The wrong part of the code is:
ap_uint<4> shifted_value = (C == 0) ? (A << 5) : (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 top_module(ap_uint<4> A, ap_uint<4> B, bool& eq, bool& gt, bool C, ap_uint<4> D, ap_uint<4>& final_output) {
... |
The wrong part of the code is:
ap_uint<4> shifted_value = (C == 0) ? (A << 5) : (A >> 5);
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
ap_uint<4> shifted_value = (C == 0) ? (A << D) : (A >> D); | 'SHFT' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.