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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
vo... |
The wrong part of the code is:
shifted_data = (int8_t)(data_in << shift_amount) | (int8_t)(data_in >> (8 - shift_amount));
The right code snippet is:
shifted_data = (data_in << shift_amount) | (data_in >> (8 - shift_amount)); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
void ba... |
The right code snippet is:
shifted_data = (data_in << shift_amount) | (data_in >> (8 - shift_amount)); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted... |
The wrong part of the code is:
shifted_data = (int8_t)(data_in << shift_amount) | (int8_t)(data_in >> (8 - shift_amount));
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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#prag... |
The wrong part of the code is:
shifted_data = (int8_t)(data_in << shift_amount) | (int8_t)(data_in >> (8 - shift_amount));
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
shifted_data = (data_in << shift_amount) | (data_in >> (8 - shift_amount)); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
vo... |
The wrong part of the code is:
#pragma HLS unroll
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output);
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
void ba... |
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted... |
The wrong part of the code is:
#pragma HLS unroll
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output);
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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#prag... |
The wrong part of the code is:
#pragma HLS unroll
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output);
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
vo... |
The wrong part of the code is:
ap_uint<8> shifted_data = 0;
The right code snippet is:
ap_uint<8> shifted_data; | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
void ba... |
The right code snippet is:
ap_uint<8> shifted_data; | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted... |
The wrong part of the code is:
ap_uint<8> shifted_data = 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#prag... |
The wrong part of the code is:
ap_uint<8> shifted_data = 0;
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
ap_uint<8> shifted_data; | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
vo... |
The wrong part of the code is:
#pragma HLS array_partition variable=data_in cyclic factor=2
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
void ba... |
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted... |
The wrong part of the code is:
#pragma HLS array_partition variable=data_in 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_none port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#prag... |
The wrong part of the code is:
#pragma HLS array_partition variable=data_in cyclic factor=2
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
vo... |
The wrong part of the code is:
#pragma HLS array_partition variable=data_in cyclic factor=3
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
void ba... |
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted... |
The wrong part of the code is:
#pragma HLS array_partition variable=data_in 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_none port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#prag... |
The wrong part of the code is:
#pragma HLS array_partition variable=data_in cyclic factor=3
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
vo... |
The wrong part of the code is:
#pragma HLS dataflow
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output);
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
void ba... |
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted... |
The wrong part of the code is:
#pragma HLS dataflow
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output);
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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#prag... |
The wrong part of the code is:
#pragma HLS dataflow
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output);
The high-level-synthesis bug type of the code is: DFP
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output... | 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_fifo port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
vo... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=data_in
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | 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_fifo port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
void ba... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | 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_fifo port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=data_in
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_fifo port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#prag... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=data_in
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
vo... |
The wrong part of the code is:
ap_uint<8> logical_shift_output;
ap_uint<8> rotate_output;
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output);
#pragma HLS inline
barrel_shifter_rotate(data_in, shift_amount, mode, rotate_output);
shifted_output = logical_shift_output ... | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
void ba... |
The right code snippet is:
ap_uint<8> logical_shift_output;
ap_uint<8> rotate_output;
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output);
#pragma HLS inline
barrel_shifter_rotate(data_in, shift_amount, mode, rotate_output);
shifted_output = logical_shift_output | ro... | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted... |
The wrong part of the code is:
ap_uint<8> logical_shift_output;
ap_uint<8> rotate_output;
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output);
#pragma HLS inline
barrel_shifter_rotate(data_in, shift_amount, mode, rotate_output);
shifted_output = logical_shift_output ... | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#prag... |
The wrong part of the code is:
ap_uint<8> logical_shift_output;
ap_uint<8> rotate_output;
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output);
#pragma HLS inline
barrel_shifter_rotate(data_in, shift_amount, mode, rotate_output);
shifted_output = logical_shift_output ... | 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 m_axi depth=256 port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_ou... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=256 port=data_in
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | 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 m_axi depth=256 port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | 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 m_axi depth=256 port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=256 port=data_in
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 m_axi depth=256 port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mo... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=256 port=data_in
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
void ... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=data_in
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | SMA |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE bram port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
void barre... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE bram port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_ou... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=data_in
The high-level-synthesis bug type of the code is: SMA | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE bram port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma ... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=data_in
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_vld port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
voi... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=data_in
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | 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_vld port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
void bar... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | 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_vld port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=data_in
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_vld port=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragm... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=data_in
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
vo... |
The wrong part of the code is:
#pragma HLS pipeline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output);
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted_output
void ba... |
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output); | 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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#pragma HLS INTERFACE ap_none port=shifted... |
The wrong part of the code is:
#pragma HLS pipeline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output);
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=data_in
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=mode
#prag... |
The wrong part of the code is:
#pragma HLS pipeline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output);
The high-level-synthesis bug type of the code is: MLP
The right code snippet is:
#pragma HLS inline
barrel_shifter_logical(data_in, shift_amount, mode, logical_shift_output... | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS... |
The wrong part of the code is:
temp_carry = (a.range(-1,0), b.range(0,0), cin) + (a.range(1,1), b.range(1,1), temp_sum.range(0,0)) + (a.range(2,2), b.range(2,2), temp_sum.range(1,1)) + (a.range(3,3), b.range(3,3), temp_sum.range(2,2));
The right code snippet is:
temp_carry = (a.range(0,0), b.range(0,0)... | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTE... |
The right code snippet is:
temp_carry = (a.range(0,0), b.range(0,0), cin) + (a.range(1,1), b.range(1,1), temp_sum.range(0,0)) + (a.range(2,2), b.range(2,2), temp_sum.range(1,1)) + (a.range(3,3), b.range(3,3), temp_sum.range(2,2)); | '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:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
... |
The wrong part of the code is:
temp_carry = (a.range(-1,0), b.range(0,0), cin) + (a.range(1,1), b.range(1,1), temp_sum.range(0,0)) + (a.range(2,2), b.range(2,2), temp_sum.range(1,1)) + (a.range(3,3), b.range(3,3), temp_sum.range(2,2));
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pra... |
The wrong part of the code is:
temp_carry = (a.range(-1,0), b.range(0,0), cin) + (a.range(1,1), b.range(1,1), temp_sum.range(0,0)) + (a.range(2,2), b.range(2,2), temp_sum.range(1,1)) + (a.range(3,3), b.range(3,3), temp_sum.range(2,2));
The high-level-synthesis bug type of the code is: 'OOB'
The right c... | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS... |
The wrong part of the code is:
ap_uint<4> temp_sum = 0;
ap_uint<4> temp_carry = 0;
The right code snippet is:
ap_uint<4> temp_sum;
ap_uint<4> temp_carry; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTE... |
The right code snippet is:
ap_uint<4> temp_sum;
ap_uint<4> temp_carry; | '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:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
... |
The wrong part of the code is:
ap_uint<4> temp_sum = 0;
ap_uint<4> temp_carry = 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:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pra... |
The wrong part of the code is:
ap_uint<4> temp_sum = 0;
ap_uint<4> temp_carry = 0;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<4> temp_sum;
ap_uint<4> temp_carry; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS... |
The wrong part of the code is:
temp_carry = (a.range(0,0), b.range(0,0), cin) + (a.range(1,1), b.range(1,1), temp_sum.range(2,0)) + (a.range(2,2), b.range(2,2), temp_sum.range(3,1)) + (a.range(3,3), b.range(3,3), temp_sum.range(4,2));
The right code snippet is:
temp_carry = (a.range(0,0), b.range(0,0),... | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTE... |
The right code snippet is:
temp_carry = (a.range(0,0), b.range(0,0), cin) + (a.range(1,1), b.range(1,1), temp_sum.range(0,0)) + (a.range(2,2), b.range(2,2), temp_sum.range(1,1)) + (a.range(3,3), b.range(3,3), temp_sum.range(2,2)); | '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:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
... |
The wrong part of the code is:
temp_carry = (a.range(0,0), b.range(0,0), cin) + (a.range(1,1), b.range(1,1), temp_sum.range(2,0)) + (a.range(2,2), b.range(2,2), temp_sum.range(3,1)) + (a.range(3,3), b.range(3,3), temp_sum.range(4,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:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pra... |
The wrong part of the code is:
temp_carry = (a.range(0,0), b.range(0,0), cin) + (a.range(1,1), b.range(1,1), temp_sum.range(2,0)) + (a.range(2,2), b.range(2,2), temp_sum.range(3,1)) + (a.range(3,3), b.range(3,3), temp_sum.range(4,2));
The high-level-synthesis bug type of the code is: 'SHFT'
The right c... | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS... |
The wrong part of the code is:
while (true) {
temp_sum = a + b + cin;
temp_carry = (a.range(0,0), b.range(0,0), cin) + (a.range(1,1), b.range(1,1), temp_sum.range(0,0)) + (a.range(2,2), b.range(2,2), temp_sum.range(1,1)) + (a.range(3,3), b.range(3,3), temp_sum.range(2,2));
}
The right code snippet ... | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTE... |
The right code snippet is:
temp_sum = a + b + cin;
temp_carry = (a.range(0,0), b.range(0,0), cin) + (a.range(1,1), b.range(1,1), temp_sum.range(0,0)) + (a.range(2,2), b.range(2,2), temp_sum.range(1,1)) + (a.range(3,3), b.range(3,3), temp_sum.range(2,2)); | '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:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
... |
The wrong part of the code is:
while (true) {
temp_sum = a + b + cin;
temp_carry = (a.range(0,0), b.range(0,0), cin) + (a.range(1,1), b.range(1,1), temp_sum.range(0,0)) + (a.range(2,2), b.range(2,2), temp_sum.range(1,1)) + (a.range(3,3), b.range(3,3), temp_sum.range(2,2));
}
The high-level-synthesi... | '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:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pra... |
The wrong part of the code is:
while (true) {
temp_sum = a + b + cin;
temp_carry = (a.range(0,0), b.range(0,0), cin) + (a.range(1,1), b.range(1,1), temp_sum.range(0,0)) + (a.range(2,2), b.range(2,2), temp_sum.range(1,1)) + (a.range(3,3), b.range(3,3), temp_sum.range(2,2));
}
The high-level-synthesi... | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS... |
The wrong part of the code is:
temp_carry = (signed(a.range(0,0)), signed(b.range(0,0)), signed(cin)) + (signed(a.range(1,1)), signed(b.range(1,1)), signed(temp_sum.range(0,0))) + (signed(a.range(2,2)), signed(b.range(2,2)), signed(temp_sum.range(1,1))) + (signed(a.range(3,3)), signed(b.range(3,3)), signed(tem... | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTE... |
The right code snippet is:
temp_carry = (a.range(0,0), b.range(0,0), cin) + (a.range(1,1), b.range(1,1), temp_sum.range(0,0)) + (a.range(2,2), b.range(2,2), temp_sum.range(1,1)) + (a.range(3,3), b.range(3,3), temp_sum.range(2,2)); | '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:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=a
... |
The wrong part of the code is:
temp_carry = (signed(a.range(0,0)), signed(b.range(0,0)), signed(cin)) + (signed(a.range(1,1)), signed(b.range(1,1)), signed(temp_sum.range(0,0))) + (signed(a.range(2,2)), signed(b.range(2,2)), signed(temp_sum.range(1,1))) + (signed(a.range(3,3)), signed(b.range(3,3)), signed(tem... | '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:
```c++
void adder4(
const ap_uint<4> a,
const ap_uint<4> b,
const bool cin,
ap_uint<4>& sum,
bool& cout
) {
#pra... |
The wrong part of the code is:
temp_carry = (signed(a.range(0,0)), signed(b.range(0,0)), signed(cin)) + (signed(a.range(1,1)), signed(b.range(1,1)), signed(temp_sum.range(0,0))) + (signed(a.range(2,2)), signed(b.range(2,2)), signed(temp_sum.range(1,1))) + (signed(a.range(3,3)), signed(b.range(3,3)), signed(tem... | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERF... |
The wrong part of the code is:
sum <= sum + data_in[10:0];
The right code snippet is:
sum <= sum + data_in; | '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_clk port=clk
#pragma HLS INTERFACE ap_rst_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERFACE a... |
The right code snippet is:
sum <= sum + data_in; | '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_clk port=clk
#pragma HLS INTERFACE ap_rst_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma... |
The wrong part of the code is:
sum <= sum + data_in[10:0];
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS I... |
The wrong part of the code is:
sum <= sum + data_in[10:0];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
sum <= sum + data_in; | '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_clk port=clk
#pragma HLS INTERFACE ap_rst_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERF... |
The wrong part of the code is:
reg <3:0> count = 0;
reg <9:0> sum = 0;
The right code snippet is:
reg <3:0> count;
reg <9:0> sum; | '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_rst_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERFACE a... |
The right code snippet is:
reg <3:0> count;
reg <9:0> sum; | '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_rst_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma... |
The wrong part of the code is:
reg <3:0> count = 0;
reg <9:0> sum = 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS I... |
The wrong part of the code is:
reg <3:0> count = 0;
reg <9:0> sum = 0;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
reg <3:0> count;
reg <9:0> sum; | '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_clk port=clk
#pragma HLS INTERFACE ap_rst_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERF... |
The wrong part of the code is:
count <= count + 9;
The right code snippet is:
count <= count + 1; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERFACE a... |
The right code snippet is:
count <= count + 1; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma... |
The wrong part of the code is:
count <= count + 9;
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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS I... |
The wrong part of the code is:
count <= count + 9;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
count <= count + 1; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERF... |
The wrong part of the code is:
if(count <= 8) begin
The right code snippet is:
if(count == 8) begin | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERFACE a... |
The right code snippet is:
if(count == 8) begin | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma... |
The wrong part of the code is:
if(count <= 8) begin
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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS I... |
The wrong part of the code is:
if(count <= 8) begin
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if(count == 8) begin | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERF... |
The wrong part of the code is:
sum <= $signed(sum) + $signed(data_in);
The right code snippet is:
sum <= sum + data_in; | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERFACE a... |
The right code snippet is:
sum <= sum + data_in; | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma... |
The wrong part of the code is:
sum <= $signed(sum) + $signed(data_in);
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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS I... |
The wrong part of the code is:
sum <= $signed(sum) + $signed(data_in);
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
sum <= sum + data_in; | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERF... |
The wrong part of the code is:
if(count == 8) begin
data_out <= sum;
valid_b <= 1;
count <= count + 1;
sum <= sum + data_in;
end
The right code snippet is:
if(count == 8) begin
data_out <= sum;
valid_b <= 1;
count <= 0;
sum <= 0;
end | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERFACE a... |
The right code snippet is:
if(count == 8) begin
data_out <= sum;
valid_b <= 1;
count <= 0;
sum <= 0;
end | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma... |
The wrong part of the code is:
if(count == 8) begin
data_out <= sum;
valid_b <= 1;
count <= count + 1;
sum <= sum + data_in;
end
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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS I... |
The wrong part of the code is:
if(count == 8) begin
data_out <= sum;
valid_b <= 1;
count <= count + 1;
sum <= sum + data_in;
end
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
if(count == 8) begin
data_out <= sum;
valid_b <= 1;
count <... | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERF... |
The wrong part of the code is:
reg <3:0> count = 1;
The right code snippet is:
reg <3:0> count; | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERFACE a... |
The right code snippet is:
reg <3:0> count; | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma... |
The wrong part of the code is:
reg <3:0> count = 1;
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS I... |
The wrong part of the code is:
reg <3:0> count = 1;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
reg <3:0> count; | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERF... |
The wrong part of the code is:
data_out <= sum[7:0];
The right code snippet is:
data_out <= sum; | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma HLS INTERFACE a... |
The right code snippet is:
data_out <= sum; | '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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none port=valid_a
#pragma... |
The wrong part of the code is:
data_out <= sum[7:0];
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_n port=rst_n
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS I... |
The wrong part of the code is:
data_out <= sum[7:0];
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
data_out <= sum; | 'BUF' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.