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=in #pragma HLS INTERFACE ap_none port=out void shift_left(int in[4], int out[4]) { out[3] = in[2]; out[2] = in[1]; out[1] = in[0]; o...
The wrong part of the code is: #pragma HLS interface ap_vld port=in #pragma HLS interface ap_vld port=out The right code snippet is: #pragma HLS interface ap_none port=in #pragma HLS interface ap_none port=out
IDAP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void shift_left(int in[4], int out[4]) { out[3] = in[2]; out[2] = in[1]; out[1] = in[0]; out[0]...
The right code snippet is: #pragma HLS interface ap_none port=in #pragma HLS interface ap_none port=out
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void shift_left(int in[4], int out[4]) { out[3] = in[2]; out[2] = in[1]; out[1] = i...
The wrong part of the code is: #pragma HLS interface ap_vld port=in #pragma HLS interface ap_vld port=out The high-level-synthesis bug type of the code is: IDAP
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void shift_left(int in[4], int out[4]) { out[3] = in[2...
The wrong part of the code is: #pragma HLS interface ap_vld port=in #pragma HLS interface ap_vld port=out The high-level-synthesis bug type of the code is: IDAP The right code snippet is: #pragma HLS interface ap_none port=in #pragma HLS interface ap_none port=out
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=in #pragma HLS INTERFACE ap_none port=out void shift_left(int in[4], int out[4]) { out[3] = in[2]; out[2] = in[1]; out[1] = in[0]; o...
The wrong part of the code is: #pragma HLS interface m_axi port=in offset=slave #pragma HLS interface m_axi port=out offset=slave The right code snippet is: #pragma HLS interface m_axi port=in #pragma HLS interface m_axi port=out
RAMB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void shift_left(int in[4], int out[4]) { out[3] = in[2]; out[2] = in[1]; out[1] = in[0]; out[0]...
The right code snippet is: #pragma HLS interface m_axi port=in #pragma HLS interface m_axi port=out
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void shift_left(int in[4], int out[4]) { out[3] = in[2]; out[2] = in[1]; out[1] = i...
The wrong part of the code is: #pragma HLS interface m_axi port=in offset=slave #pragma HLS interface m_axi port=out 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_none port=in #pragma HLS INTERFACE ap_none port=out void shift_left(int in[4], int out[4]) { out[3] = in[2...
The wrong part of the code is: #pragma HLS interface m_axi port=in offset=slave #pragma HLS interface m_axi port=out offset=slave The high-level-synthesis bug type of the code is: RAMB The right code snippet is: #pragma HLS interface m_axi port=in #pragma HLS interface m_axi port=out
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_none port=in #pragma HLS INTERFACE ap_none port=out void shift_left(int in[4], int out[4]) { out[3] = in[2]; out[2] = in[1]; out[1] = in[0]; o...
The wrong part of the code is: #pragma HLS interface ap_memory port=in #pragma HLS The right code snippet is: #pragma HLS interface ap_none port=in #pragma HLS interface ap_none port=out
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_none port=in #pragma HLS INTERFACE ap_none port=out void shift_left(int in[4], int out[4]) { out[3] = in[2]; out[2] = in[1]; out[1] = in[0]; out[0]...
The right code snippet is: #pragma HLS interface ap_none port=in #pragma HLS interface ap_none port=out
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_none port=in #pragma HLS INTERFACE ap_none port=out void shift_left(int in[4], int out[4]) { out[3] = in[2]; out[2] = in[1]; out[1] = i...
The wrong part of the code is: #pragma HLS interface ap_memory port=in #pragma HLS 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_none port=in #pragma HLS INTERFACE ap_none port=out void shift_left(int in[4], int out[4]) { out[3] = in[2...
The wrong part of the code is: #pragma HLS interface ap_memory port=in #pragma HLS The high-level-synthesis bug type of the code is: SMA The right code snippet is: #pragma HLS interface ap_none port=in #pragma HLS interface ap_none port=out
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: if (data[16] == 1) { The right code snippet is: if (data[i] == 1) {
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: if (data[i] == 1) {
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: if (data[16] == 1) { The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: if (data[16] == 1) { The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: if (data[i] == 1) {
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: ap_uint<4> count; The right code snippet is: ap_uint<4> count = 0;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: ap_uint<4> count = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: ap_uint<4> count; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: ap_uint<4> count; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<4> count = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: data[i+32] = 1; The right code snippet is: data[i+17] = 1;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: data[i+17] = 1;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: data[i+32] = 1; The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: data[i+32] = 1; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: data[i+17] = 1;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { The right code snippet is: for (int i = 0; i < 16; i++) {
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: for (int i = 0; i < 16; i++) {
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 16; i++) {
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: ap_uint<4> index; The right code snippet is: ap_int<4> index;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: ap_int<4> index;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: ap_uint<4> index; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: ap_uint<4> index; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_int<4> index;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: for (int i = 0; i < 15; i+=2) { The right code snippet is: for (int i = 0; i < 16; i+=2) {
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: for (int i = 0; i < 16; i+=2) {
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: for (int i = 0; i < 15; i+=2) { The high-level-synthesis bug type of the code is: 'MLU'
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: for (int i = 0; i < 15; i+=2) { The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 16; i+=2) {
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: ap_uint<4> max_count; The right code snippet is: ap_uint<4> max_count = 0;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: ap_uint<4> max_count = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: ap_uint<4> max_count; The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: ap_uint<4> max_count; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_uint<4> max_count = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: memcpy(data_out, &data_in[0], 8); The right code snippet is: memcpy(data_out, &data_in[8], 8);
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: memcpy(data_out, &data_in[8], 8);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: memcpy(data_out, &data_in[0], 8); The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: memcpy(data_out, &data_in[0], 8); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memcpy(data_out, &data_in[8], 8);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=data block factor=2 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=2
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=2
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=data block 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: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=data block factor=2 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=2
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=3 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=2
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=2
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=data 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: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=2
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=2 dim=2 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=2 dim=1
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=2 dim=1
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=2 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: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=2 dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=data cyclic factor=2 dim=1
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: #pragma HLS PIPELINE The right code snippet is: #pragma HLS DATAFLOW
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: #pragma HLS DATAFLOW
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: #pragma HLS PIPELINE The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: #pragma HLS PIPELINE The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: #pragma HLS DATAFLOW
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_vld port=data #pragma HLS ...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=data The right code snippet is: #pragma HLS INTERFACE ap_none port=data
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_vld port=data #pragma HLS INTER...
The right code snippet is: #pragma HLS INTERFACE ap_none port=data
'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: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_vld port=data #...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=data 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: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=data The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS INTERFACE ap_none port=data
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=data depth=256 The right code snippet is: #pragma HLS INTERFACE m_axi port=data
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: #pragma HLS INTERFACE m_axi port=data
'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: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=data depth=256 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: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=data depth=256 The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS INTERFACE m_axi port=data
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE bram port=data #pragma HLS IN...
The wrong part of the code is: #pragma HLS INTERFACE bram port=data The right code snippet is: #pragma HLS INTERFACE ap_none port=data
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE bram port=data #pragma HLS INTERFA...
The right code snippet is: #pragma HLS INTERFACE ap_none port=data
'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: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE bram port=data #pr...
The wrong part of the code is: #pragma HLS INTERFACE bram port=data 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: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: #pragma HLS INTERFACE bram port=data The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS INTERFACE ap_none port=data
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=data The right code snippet is: #pragma HLS INTERFACE bram port=data
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: #pragma HLS INTERFACE bram port=data
'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: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=data 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: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=data The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS INTERFACE bram port=data
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: #pragma HLS PIPELINE II=2 The right code snippet is: #pragma HLS PIPELINE II=1
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: #pragma HLS PIPELINE II=1
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
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: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: #pragma HLS PIPELINE II=2 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: #pragma HLS PIPELINE II=1
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS...
The wrong part of the code is: #pragma HLS UNROLL factor=2 The right code snippet is: #pragma HLS UNROLL
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTE...
The right code snippet is: #pragma HLS UNROLL
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #pragma HLS INTERFACE ap_none port=data ...
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: ``` #include <ap_int.h> void longest_sequence_detection( ap_uint<16> data, ap_uint<4> &length, ap_uint<4> &start_index ) { #prag...
The wrong part of the code is: #pragma HLS UNROLL factor=2 The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: #pragma HLS UNROLL
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; const int m = 1; const int w = 8; const char* t = ...
The wrong part of the code is: unsigned char memory[1 << n]; The right code snippet is: unsigned char memory[1 << n] = {0x00, 0x01, 0x02, /*...*/, 0xFF};
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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; const int m = 1; const int w = 8; const char* t = "mask...
The right code snippet is: unsigned char memory[1 << n] = {0x00, 0x01, 0x02, /*...*/, 0xFF};
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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; const int m = 1; const int w = 8; const...
The wrong part of the code is: unsigned char memory[1 << n]; 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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; co...
The wrong part of the code is: unsigned char memory[1 << n]; The high-level-synthesis bug type of the code is: INIT The right code snippet is: unsigned char memory[1 << n] = {0x00, 0x01, 0x02, /*...*/, 0xFF};
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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; const int m = 1; const int w = 8; const char* t = ...
The wrong part of the code is: void ROM(unsigned int addr, unsigned char& data) { data = memory[addr+1]; } The right code snippet is: void ROM(unsigned int addr, unsigned char& data) { data = memory[addr]; }
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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; const int m = 1; const int w = 8; const char* t = "mask...
The right code snippet is: void ROM(unsigned int addr, unsigned char& data) { data = memory[addr]; }
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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; const int m = 1; const int w = 8; const...
The wrong part of the code is: void ROM(unsigned int addr, unsigned char& data) { data = memory[addr+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: #pragma HLS INTERFACE s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; co...
The wrong part of the code is: void ROM(unsigned int addr, unsigned char& data) { data = memory[addr+1]; } The high-level-synthesis bug type of the code is: OOB The right code snippet is: void ROM(unsigned int addr, unsigned char& data) { data = memory[addr]; }
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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; const int m = 1; const int w = 8; const char* t = ...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // code here } The right code snippet is: N/A (code snippet is already correct)
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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; const int m = 1; const int w = 8; const char* t = "mask...
The right code snippet is: N/A (code snippet is already correct)
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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; const int m = 1; const int w = 8; const...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // code here } 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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; co...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // code here } The high-level-synthesis bug type of the code is: INF The right code snippet is: N/A (code snippet is already correct)
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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; const int m = 1; const int w = 8; const char* t = ...
The wrong part of the code is: #pragma HLS UNROLL factor=2 The right code snippet is: N/A (code snippet is already correct)
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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; const int m = 1; const int w = 8; const char* t = "mask...
The right code snippet is: N/A (code snippet is already correct)
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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; const int m = 1; const int w = 8; const...
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 s_axilite port=addr bundle=CTRL_BUS #pragma HLS INTERFACE s_axilite port=data bundle=CTRL_BUS const int n = 8; co...
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: N/A (code snippet is already correct)
ILNU