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_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
pipeline_reg[23] = pipeline_reg[22] << 25;
The right code snippet is:
pipeline_reg[23] = pipeline_reg[22]; | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
pipeline_reg[23] = pipeline_reg[22]; | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
pipeline_reg[23] = pipeline_reg[22] << 25;
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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
pipeline_reg[23] = pipeline_reg[22] << 25;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
pipeline_reg[23] = pipeline_reg[22]; | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
The right code snippet is:
for (int i = 0; i < 24; i++) { | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
for (int i = 0; i < 24; 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
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 < 24; 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
unsigned int in_stream;
The right code snippet is:
int in_stream; | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
int in_stream; | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
unsigned int in_stream;
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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
unsigned int in_stream;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
int in_stream; | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
for (int i = 0; i < 25; i++) {
The right code snippet is:
for (int i = 0; i < 24; i++) { | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
for (int i = 0; i < 24; i++) { | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
for (int i = 0; i < 25; i++) {
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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
for (int i = 0; i < 25; i++) {
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < 24; i++) { | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
static int pipeline_reg[24] = {};
The right code snippet is:
static int pipeline_reg[24] = {0}; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
static int pipeline_reg[24] = {0}; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
static int pipeline_reg[24] = {};
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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
static int pipeline_reg[24] = {};
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static int pipeline_reg[24] = {0}; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
pipeline_reg_0 = pipeline_reg[12];
The right code snippet is:
pipeline_reg_0 = pipeline_reg[0]; | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
pipeline_reg_0 = pipeline_reg[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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
pipeline_reg_0 = pipeline_reg[12];
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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
pipeline_reg_0 = pipeline_reg[12];
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
pipeline_reg_0 = pipeline_reg[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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg cyclic
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg complete | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg complete | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg cyclic
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg cyclic
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg complete | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg factor=3
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg complete | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg complete | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg factor=3
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg factor=3
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg complete | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg dim=2
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg complete | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg complete | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg dim=2
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=pipeline_reg complete | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
#pragma HLS DATAFLOW wait
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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
#pragma HLS DATAFLOW wait
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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS DATAFLOW wait
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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=in_stream
#pragm... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=in_stream
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in_stream | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=in_stream
#pragma HLS... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in_stream | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=in_st... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=in_stream
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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=in_stream
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in_stream | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=24 port=pipeline_reg offset=16
The right code snippet is:
#pragma HLS INTERFACE m_axi depth=24 port=pipeline_reg | '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_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
#pragma HLS INTERFACE m_axi depth=24 port=pipeline_reg | '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_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=24 port=pipeline_reg offset=16
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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=24 port=pipeline_reg offset=16
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS INTERFACE m_axi depth=24 port=pipeline_reg | '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_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=pipeline_reg_0
The right code snippet is:
#pragma HLS INTERFACE ap_none port=pipeline_reg_0 | '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_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=pipeline_reg_0 | '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_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=pipeline_reg_0
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_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=pipeline_reg_0
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=pipeline_reg_0 | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=pipeline_reg_0
The right code snippet is:
#pragma HLS INTERFACE ap_none port=pipeline_reg_0 | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=pipeline_reg_0 | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=pipeline_reg_0
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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=pipeline_reg_0
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=pipeline_reg_0 | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
#pragma HLS PIPELINE II=3
The right code snippet is:
#pragma HLS PIPELINE II=1 | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
#pragma HLS PIPELINE II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
#pragma HLS PIPELINE II=3
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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#p... |
The wrong part of the code is:
#pragma HLS PIPELINE II=3
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
#pragma HLS PIPELINE II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#prag... |
The wrong part of the code is:
#pragma HLS UNROLL factor=2
for (int i = 0; i < 24; i+=2) {
The right code snippet is:
for (int i = 0; i < 24; i++) { | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_stream
#pragma HL... |
The right code snippet is:
for (int i = 0; i < 24; i++) { | '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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=in_s... |
The wrong part of the code is:
#pragma HLS UNROLL factor=2
for (int i = 0; i < 24; i+=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_clk port=clk
#pragma HLS INTERFACE ap_clk_enable port=clk_ena
#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 < 24; i+=2) {
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
for (int i = 0; i < 24; i++) { | 'ILNU' |
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_none port=data_in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INT... |
The wrong part of the code is:
unsigned char empty;
Bug_type:
OOB
The right code snippet is:
unsigned char empty = 1; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFAC... |
The right code snippet is:
unsigned char empty = 1; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=wr_en
#pra... |
The wrong part of the code is:
unsigned char empty;
Bug_type:
OOB
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_clk port=clk
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma ... |
The wrong part of the code is:
unsigned char empty;
Bug_type:
OOB
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
unsigned char empty = 1; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4... |
The wrong part of the code is:
if (state == ST_NOSYNC_WAIT0_8) {
if (rx_buf == 2) { // accessing index 2 of rx_buf which is out of bounds
state = ST_NOSYNC_WAIT_STOP;
clk_counter++;
}
}
The right code snippet is:
if (state == ST_NOSYNC_WAIT0_8) {
if (rx_buf == 0) {
... | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4'h2;
... |
The right code snippet is:
if (state == ST_NOSYNC_WAIT0_8) {
if (rx_buf == 0) {
state = ST_NOSYNC_WAIT_STOP;
clk_counter++;
}
} | 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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_... |
The wrong part of the code is:
if (state == ST_NOSYNC_WAIT0_8) {
if (rx_buf == 2) { // accessing index 2 of rx_buf which is out of bounds
state = ST_NOSYNC_WAIT_STOP;
clk_counter++;
}
}
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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_... |
The wrong part of the code is:
if (state == ST_NOSYNC_WAIT0_8) {
if (rx_buf == 2) { // accessing index 2 of rx_buf which is out of bounds
state = ST_NOSYNC_WAIT_STOP;
clk_counter++;
}
}
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
if (sta... | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4... |
The wrong part of the code is:
static ap_uint<4> state;
static ap_uint<32> clk_counter;
static ap_uint<3> bit_counter;
static bool rx_buf;
// uninitialized variables will cause undefined behavior when used
The right code snippet is:
static ap_uint<4> state = ST_NOSYNC;
static ap_uint<32> clk_counter = ... | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4'h2;
... |
The right code snippet is:
static ap_uint<4> state = ST_NOSYNC;
static ap_uint<32> clk_counter = 0;
static ap_uint<3> bit_counter = 0;
static bool rx_buf = 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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_... |
The wrong part of the code is:
static ap_uint<4> state;
static ap_uint<32> clk_counter;
static ap_uint<3> bit_counter;
static bool rx_buf;
// uninitialized variables will cause undefined behavior when used
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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_... |
The wrong part of the code is:
static ap_uint<4> state;
static ap_uint<32> clk_counter;
static ap_uint<3> bit_counter;
static bool rx_buf;
// uninitialized variables will cause undefined behavior when used
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
static ap_u... | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4... |
The wrong part of the code is:
bitperiod_o = clk_counter.range(33, 3); // shifting by an out-of-bounds amount
The right code snippet is:
bitperiod_o = clk_counter.range(31, 3); | SHFT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4'h2;
... |
The right code snippet is:
bitperiod_o = clk_counter.range(31, 3); | 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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_... |
The wrong part of the code is:
bitperiod_o = clk_counter.range(33, 3); // shifting by an out-of-bounds amount
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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_... |
The wrong part of the code is:
bitperiod_o = clk_counter.range(33, 3); // shifting by an out-of-bounds amount
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
bitperiod_o = clk_counter.range(31, 3); | SHFT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4... |
The wrong part of the code is:
while (true) {} // an infinite loop
The right code snippet is:
// none of the loops in the code terminate incorrectly | INF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4'h2;
... |
The right code snippet is:
// none of the loops in the code terminate incorrectly | 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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_... |
The wrong part of the code is:
while (true) {} // an infinite loop
The high-level-synthesis bug type of the code is: INF | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_... |
The wrong part of the code is:
while (true) {} // an infinite loop
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
// none of the loops in the code terminate incorrectly | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4... |
The wrong part of the code is:
signed int &rx_done_tick_o, // unintended sign extension
signed int &dout_bo,
signed int &locked_o,
signed int &bitperiod_o
) {
The right code snippet is:
ap_uint<1> &rx_done_tick_o,
ap_uint<8> &dout_bo,
ap_uint<1> &locked_o,
ap_uint<29> &bitperiod_o
) { | USE |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4'h2;
... |
The right code snippet is:
ap_uint<1> &rx_done_tick_o,
ap_uint<8> &dout_bo,
ap_uint<1> &locked_o,
ap_uint<29> &bitperiod_o
) { | 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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_... |
The wrong part of the code is:
signed int &rx_done_tick_o, // unintended sign extension
signed int &dout_bo,
signed int &locked_o,
signed int &bitperiod_o
) {
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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_... |
The wrong part of the code is:
signed int &rx_done_tick_o, // unintended sign extension
signed int &dout_bo,
signed int &locked_o,
signed int &bitperiod_o
) {
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
ap_uint<1> &rx_done_tick_o,
ap_uint<8> &dout_bo,
ap_uint<1... | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4... |
The wrong part of the code is:
// manually unrolling the loop that updates clk_counter
if (state == ST_NOSYNC_WAIT0_8) {
if (rx_buf == 0) {
state = ST_NOSYNC_WAIT_STOP;
clk_counter++;
clk_counter++;
}
}
The right code snippet is:
// none of the loops in the code are manu... | MLU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4'h2;
... |
The right code snippet is:
// none of the loops in the code are manually unrolled | 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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_... |
The wrong part of the code is:
// manually unrolling the loop that updates clk_counter
if (state == ST_NOSYNC_WAIT0_8) {
if (rx_buf == 0) {
state = ST_NOSYNC_WAIT_STOP;
clk_counter++;
clk_counter++;
}
}
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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_... |
The wrong part of the code is:
// manually unrolling the loop that updates clk_counter
if (state == ST_NOSYNC_WAIT0_8) {
if (rx_buf == 0) {
state = ST_NOSYNC_WAIT_STOP;
clk_counter++;
clk_counter++;
}
}
The high-level-synthesis bug type of the code is: MLU
The right code... | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4... |
The wrong part of the code is:
static bool rx_buf = 1; // variable should be initialized to a nonzero value
The right code snippet is:
static bool rx_buf = 0; | ZERO |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4'h2;
... |
The right code snippet is:
static bool rx_buf = 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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_... |
The wrong part of the code is:
static bool rx_buf = 1; // variable should be initialized to a nonzero value
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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_... |
The wrong part of the code is:
static bool rx_buf = 1; // variable should be initialized to a nonzero value
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
static bool rx_buf = 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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4... |
The wrong part of the code is:
if (rx_buf == 1) { // copying from the wrong half of rx_buf
state = ST_NOSYNC_WAIT1_1;
}
The right code snippet is:
if (rx_buf == 0) {
state = ST_NOSYNC_WAIT1_1;
} | BUF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_WAIT0_2 = 4'h2;
... |
The right code snippet is:
if (rx_buf == 0) {
state = ST_NOSYNC_WAIT1_1;
} | 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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_1 = 4'h1;
const ap_uint<4> ST_NOSYNC_... |
The wrong part of the code is:
if (rx_buf == 1) { // copying from the wrong half of rx_buf
state = ST_NOSYNC_WAIT1_1;
}
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:
The HLS code for the given Verilog code is:
```
#include <ap_int.h>
const ap_uint<4> ST_NOSYNC = 4'h0;
const ap_uint<4> ST_NOSYNC_WAIT1_... |
The wrong part of the code is:
if (rx_buf == 1) { // copying from the wrong half of rx_buf
state = ST_NOSYNC_WAIT1_1;
}
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
if (rx_buf == 0) {
state = ST_NOSYNC_WAIT1_1;
} | BUF |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.