instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
hash += (word << (count * 16));
The right code snippet is:
hash += (word << (count * 8)); | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
hash += (word << (count * 8)); | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
hash += (word << (count * 16));
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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
hash += (word << (count * 16));
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
hash += (word << (count * 8)); | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
while (true) {}
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
while (true) {}
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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
while (true) {}
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
hash += (int16_t) (word << (count * 8));
The right code snippet is:
hash += (word << (count * 8)); | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
hash += (word << (count * 8)); | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
hash += (int16_t) (word << (count * 8));
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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
hash += (int16_t) (word << (count * 8));
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
hash += (word << (count * 8)); | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
for (int i = 0; i < key_length/2; i++) {
hash += (word << (count * 8));
count++;
}
for (int i = key_length/2; i < key_length; i++) {
hash += (word << (count * 8));
count++;
}
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
for (int i = 0; i < key_length/2; i++) {
hash += (word << (count * 8));
count++;
}
for (int i = key_length/2; i < key_length; i++) {
hash += (word << (count * 8));
count++;
}
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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
for (int i = 0; i < key_length/2; i++) {
hash += (word << (count * 8));
count++;
}
for (int i = key_length/2; i < key_length; i++) {
hash += (word << (count * 8));
count++;
}
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
... | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
static uint8_t count = 0;
static uint32_t hash = 1;
static uint32_t poly_coeffs = 0b10000001;
The right code snippet is:
static uint8_t count = 0;
static uint32_t hash = 0;
static uint32_t poly_coeffs = 0b10000001; | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
static uint8_t count = 0;
static uint32_t hash = 0;
static uint32_t poly_coeffs = 0b10000001; | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
static uint8_t count = 0;
static uint32_t hash = 1;
static uint32_t poly_coeffs = 0b10000001;
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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
static uint8_t count = 0;
static uint32_t hash = 1;
static uint32_t poly_coeffs = 0b10000001;
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
static uint8_t count = 0;
static uint32_t hash = 0;
static uint32_t poly_coeffs = 0b10000001... | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
memcpy(&hash, &poly_coeffs, sizeof(poly_coeffs));
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
memcpy(&hash, &poly_coeffs, sizeof(poly_coeffs));
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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
memcpy(&hash, &poly_coeffs, sizeof(poly_coeffs));
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
#pragma HLS array_partition variable=hash cyclic factor=2
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
#pragma HLS array_partition variable=hash cyclic factor=2
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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS array_partition variable=hash cyclic factor=2
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
#pragma HLS array_partition variable=hash cyclic factor=3
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
#pragma HLS array_partition variable=hash cyclic 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS array_partition variable=hash cyclic factor=3
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
#pragma HLS array_partition variable=hash cyclic dim=2
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
#pragma HLS array_partition variable=hash cyclic 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS array_partition variable=hash cyclic dim=2
The high-level-synthesis bug type of the code is: DID
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
#pragma HLS dataflow
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: DFP | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: DFP
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
#pragma HLS interface ap_stable port=hashkey
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
#pragma HLS interface ap_stable port=hashkey
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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS interface ap_stable port=hashkey
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
#pragma HLS interface m_axi port=hashkey offset=slave
The right code snippet is:
None found. | RAMB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
None found. | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
#pragma HLS interface m_axi port=hashkey offset=slave
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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS interface m_axi port=hashkey offset=slave
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
None found. | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=hashkey
The right code snippet is:
None found. | SMA |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
None found. | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=hashkey
The high-level-synthesis bug type of the code is: SMA | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=hashkey
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=hashkey
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=hashkey
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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=hashkey
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
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_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
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:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS
#pragm... |
The right code snippet is:
None found. | 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_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle... |
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_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
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:
None found. | 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 decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
ap_uint<16> out_uninit;
out = out_uninit;
} else {
out = 0xFFFF;
}
}
```
... |
The wrong part of the code is:
ap_uint<16> out_uninit;
out = out_uninit;
The right code snippet is:
out = ~(1 << select); | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
ap_uint<16> out_uninit;
out = out_uninit;
} else {
out = 0xFFFF;
}
}
```
T... |
The right code snippet is:
out = ~(1 << select); | 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 decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
ap_uint<16> out_uninit;
out = out_uninit;
} else {
out = 0xFFFF;
... |
The wrong part of the code is:
ap_uint<16> out_uninit;
out = out_uninit;
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 decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
ap_uint<16> out_uninit;
out = out_uninit;... |
The wrong part of the code is:
ap_uint<16> out_uninit;
out = out_uninit;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
out = ~(1 << select); | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
out = ~(1 << (select+2));
} else {
out = 0xFFFF;
}
}
```
|
The wrong part of the code is:
out = ~(1 << (select+2));
The right code snippet is:
out = ~(1 << select); | SHFT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
out = ~(1 << (select+2));
} else {
out = 0xFFFF;
}
}
```
The wrong part of... |
The right code snippet is:
out = ~(1 << select); | 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:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
out = ~(1 << (select+2));
} else {
out = 0xFFFF;
}
}
```
|
The wrong part of the code is:
out = ~(1 << (select+2));
The high-level-synthesis bug type of the code is: SHFT | SHFT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
out = ~(1 << (select+2));
} else {
... |
The wrong part of the code is:
out = ~(1 << (select+2));
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
out = ~(1 << select); | SHFT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
out = (unsigned short)(~(1 << select));
} else {
out = 0xFFFF;
}
}
```
... |
The wrong part of the code is:
out = (unsigned short)(~(1 << select));
The right code snippet is:
out = ~(1 << select); | USE |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
out = (unsigned short)(~(1 << select));
} else {
out = 0xFFFF;
}
}
```
The... |
The right code snippet is:
out = ~(1 << select); | 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:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
out = (unsigned short)(~(1 << select));
} else {
out = 0xFFFF;
... |
The wrong part of the code is:
out = (unsigned short)(~(1 << select));
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:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
out = (unsigned short)(~(1 << select));
... |
The wrong part of the code is:
out = (unsigned short)(~(1 << select));
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
out = ~(1 << select); | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
out = ~(1 << select);
} else {
out = 0;
}
}
```
|
The wrong part of the code is:
out = 0;
The right code snippet is:
out = 0xFFFF; | ZERO |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
out = ~(1 << select);
} else {
out = 0;
}
}
```
The wrong part of the code... |
The right code snippet is:
out = 0xFFFF; | 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:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
out = ~(1 << select);
} else {
out = 0;
}
}
```
|
The wrong part of the code is:
out = 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:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
out = ~(1 << select);
} else {
... |
The wrong part of the code is:
out = 0;
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
out = 0xFFFF; | ZERO |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
#pragma HLS unroll factor(2)
for (int i=0; i<2; i++){
out = ~(1 << select);
}
} e... |
The wrong part of the code is:
#pragma HLS unroll factor(2)
for (int i=0; i<2; i++){
out = ~(1 << select);
}
The right code snippet is:
out = ~(1 << select); | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
#pragma HLS unroll factor(2)
for (int i=0; i<2; i++){
out = ~(1 << select);
}
} else {... |
The right code snippet is:
out = ~(1 << select); | 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:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
#pragma HLS unroll factor(2)
for (int i=0; i<2; i++){
out = ~(1 << select)... |
The wrong part of the code is:
#pragma HLS unroll factor(2)
for (int i=0; i<2; i++){
out = ~(1 << select);
}
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:
```
void decoder(bool enable, ap_uint<2> select, ap_uint<16>& out) {
if (enable) {
#pragma HLS unroll factor(2)
for (int i=0... |
The wrong part of the code is:
#pragma HLS unroll factor(2)
for (int i=0; i<2; i++){
out = ~(1 << select);
}
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
out = ~(1 << select); | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& write_address,
int_stream& data... |
The wrong part of the code is:
pixel_out_reg = memory[(vga_v_reg*640)+vga_h_reg+1];
The right code snippet is:
pixel_out_reg = memory[(vga_v_reg*640)+vga_h_reg]; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& write_address,
int_stream& data_in,
... |
The right code snippet is:
pixel_out_reg = memory[(vga_v_reg*640)+vga_h_reg]; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& write_address,
int_s... |
The wrong part of the code is:
pixel_out_reg = memory[(vga_v_reg*640)+vga_h_reg+1];
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& w... |
The wrong part of the code is:
pixel_out_reg = memory[(vga_v_reg*640)+vga_h_reg+1];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
pixel_out_reg = memory[(vga_v_reg*640)+vga_h_reg]; | '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_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& write_address,
int_stream& data... |
The wrong part of the code is:
ap_uint<16> write_address_reg = 0;
ap_uint<16> data_in_reg = 0;
ap_uint<11> vga_h_reg = 0;
ap_uint<11> vga_v_reg = 0;
ap_uint<16> pixel_out_reg = 0;
The right code snippet is:
ap_uint<16> write_address_reg;
ap_uint<16> data_in_reg;
ap_uint<11> vga_h_reg;
ap_uint<11> vga_v... | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& write_address,
int_stream& data_in,
... |
The right code snippet is:
ap_uint<16> write_address_reg;
ap_uint<16> data_in_reg;
ap_uint<11> vga_h_reg;
ap_uint<11> vga_v_reg;
ap_uint<16> pixel_out_reg; | '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_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& write_address,
int_s... |
The wrong part of the code is:
ap_uint<16> write_address_reg = 0;
ap_uint<16> data_in_reg = 0;
ap_uint<11> vga_h_reg = 0;
ap_uint<11> vga_v_reg = 0;
ap_uint<16> pixel_out_reg = 0;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& w... |
The wrong part of the code is:
ap_uint<16> write_address_reg = 0;
ap_uint<16> data_in_reg = 0;
ap_uint<11> vga_h_reg = 0;
ap_uint<11> vga_v_reg = 0;
ap_uint<16> pixel_out_reg = 0;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<16> write_address_reg;
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:
```
#include <ap_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& write_address,
int_stream& data... |
The wrong part of the code is:
ap_uint<11> vga_h_reg = vga_h_reg << 12;
ap_uint<11> vga_v_reg = vga_v_reg >> 12;
The right code snippet is:
ap_uint<11> vga_h_reg;
ap_uint<11> vga_v_reg; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& write_address,
int_stream& data_in,
... |
The right code snippet is:
ap_uint<11> vga_h_reg;
ap_uint<11> vga_v_reg; | '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_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& write_address,
int_s... |
The wrong part of the code is:
ap_uint<11> vga_h_reg = vga_h_reg << 12;
ap_uint<11> vga_v_reg = vga_v_reg >> 12;
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_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& w... |
The wrong part of the code is:
ap_uint<11> vga_h_reg = vga_h_reg << 12;
ap_uint<11> vga_v_reg = vga_v_reg >> 12;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
ap_uint<11> vga_h_reg;
ap_uint<11> vga_v_reg; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& write_address,
int_stream& data... |
The wrong part of the code is:
while(1){
pixel_out_reg = memory[(vga_v_reg*640)+vga_h_reg];
pixel_out.data = pixel_out_reg;
pixel_out.last = 1;
}
The right code snippet is:
if (!load.data) {
pixel_out_reg = memory[(vga_v_reg*640)+vga_h_reg];
pixel_out.data = pixel_out_reg;
pixel... | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& write_address,
int_stream& data_in,
... |
The right code snippet is:
if (!load.data) {
pixel_out_reg = memory[(vga_v_reg*640)+vga_h_reg];
pixel_out.data = pixel_out_reg;
pixel_out.last = 1;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& write_address,
int_s... |
The wrong part of the code is:
while(1){
pixel_out_reg = memory[(vga_v_reg*640)+vga_h_reg];
pixel_out.data = pixel_out_reg;
pixel_out.last = 1;
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<16,1,1,1> int_stream;
void frame_buffer(int_stream& clk,
int_stream& w... |
The wrong part of the code is:
while(1){
pixel_out_reg = memory[(vga_v_reg*640)+vga_h_reg];
pixel_out.data = pixel_out_reg;
pixel_out.last = 1;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (!load.data) {
pixel_out_reg = memory[(vga_v_reg*64... | 'INF' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.