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: ``` #include <ap_int.h> void top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: ap_uint<4> dec_out = 0; // Initializing dec_out to zero instead of a nonzero value The right code snippet is: ap_uint<4> dec_out;
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: ap_uint<4> dec_out;
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: ap_uint<4> dec_out = 0; // Initializing dec_out to zero instead of a nonzero value The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: ap_uint<4> dec_out = 0; // Initializing dec_out to zero instead of a nonzero value The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_uint<4> dec_out;
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: for (int i = 0; i < 2; i++) { dec_out[i] = addsub_out[i+2]; // Copying from the wrong half of a split buffer } The right code snippet is: // No buffer splitting in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: // No buffer splitting in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: for (int i = 0; i < 2; i++) { dec_out[i] = addsub_out[i+2]; // Copying from the wrong half of a split buffer } 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: for (int i = 0; i < 2; i++) { dec_out[i] = addsub_out[i+2]; // Copying from the wrong half of a split buffer } The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: // No buffer splitting in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: #pragma HLS array_partition variable=dec_out cyclic factor=3 // Using incorrect partition type The right code snippet is: // No array partitioning in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: // No array partitioning in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: #pragma HLS array_partition variable=dec_out cyclic factor=3 // Using incorrect partition type 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: #pragma HLS array_partition variable=dec_out cyclic factor=3 // Using incorrect partition type The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: // No array partitioning in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: #pragma HLS array_partition variable=dec_out block factor=3 // Using factor not divisible by array size The right code snippet is: // No array partitioning in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: // No array partitioning in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: #pragma HLS array_partition variable=dec_out block factor=3 // Using factor not divisible by array size 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: #pragma HLS array_partition variable=dec_out block factor=3 // Using factor not divisible by array size The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: // No array partitioning in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: #pragma HLS array_partition variable=dec_out dim=0 // Using incorrect dimension for array partitioning The right code snippet is: // No array partitioning in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: // No array partitioning in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: #pragma HLS array_partition variable=dec_out dim=0 // Using incorrect dimension for array partitioning 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: #pragma HLS array_partition variable=dec_out dim=0 // Using incorrect dimension for array partitioning The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: // No array partitioning in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: #pragma HLS dataflow loop_flatten // Incorrect dataflow position The right code snippet is: // No dataflow pragma in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: // No dataflow pragma in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: #pragma HLS dataflow loop_flatten // Incorrect dataflow position 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: #pragma HLS dataflow loop_flatten // Incorrect dataflow position The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: // No dataflow pragma in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: #pragma HLS interface s_axilite port=dec_out // Incorrect data access pattern The right code snippet is: // No interface pragma in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: // No interface pragma in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: #pragma HLS interface s_axilite port=dec_out // Incorrect data access pattern 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: #pragma HLS interface s_axilite port=dec_out // Incorrect data access pattern The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: // No interface pragma in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: #pragma HLS interface m_axi port=dec_out offset=slave // Random access to m_axi interface The right code snippet is: // No m_axi interface in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: // No m_axi interface in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: #pragma HLS interface m_axi port=dec_out offset=slave // Random access to m_axi interface 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: #pragma HLS interface m_axi port=dec_out offset=slave // Random access to m_axi interface The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: // No m_axi interface in this code
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: #pragma HLS interface ap_memory port=dec_out // Mapping array to scalar interface The right code snippet is: // No scalar interface in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: // No scalar interface in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: #pragma HLS interface ap_memory port=dec_out // Mapping array to scalar interface 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: #pragma HLS interface ap_memory port=dec_out // Mapping array to scalar interface The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: // No scalar interface in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: #pragma HLS interface ap_none port=addsub_overflow // Mapping scalar to array interface The right code snippet is: // No array interface in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: // No array interface in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: #pragma HLS interface ap_none port=addsub_overflow // Mapping scalar to array interface 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: #pragma HLS interface ap_none port=addsub_overflow // Mapping scalar to array interface The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: // No array interface in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: #pragma HLS pipeline II=2 // Incorrectly using multi-level pipelining pragma The right code snippet is: // No nested loops in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: // No nested loops in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: #pragma HLS pipeline II=2 // Incorrectly using multi-level pipelining pragma 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: #pragma HLS pipeline II=2 // Incorrectly using multi-level pipelining pragma The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: // No nested loops in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: #pragma HLS unroll factor=3 // Inner loops not fully unrolled The right code snippet is: // No loops to unroll in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: // No loops to unroll in this code
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: #pragma HLS unroll factor=3 // Inner loops not fully unrolled 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: #pragma HLS unroll factor=3 // Inner loops not fully unrolled The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: // No loops to unroll in this code
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: out = in << 5; The right code snippet is: out = in << 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=shift...
The right code snippet is: out = in << 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap...
The wrong part of the code is: out = in << 5; The high-level-synthesis bug type of the code is: OOB
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: out = in << 5; The high-level-synthesis bug type of the code is: OOB The right code snippet is: out = in << 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: ap_uint<7> mul_output = 0; The right code snippet is: ap_uint<7> mul_output;
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=shift...
The right code snippet is: ap_uint<7> mul_output;
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap...
The wrong part of the code is: ap_uint<7> mul_output = 0; The high-level-synthesis bug type of the code is: INIT
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: ap_uint<7> mul_output = 0; The high-level-synthesis bug type of the code is: INIT The right code snippet is: ap_uint<7> mul_output;
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: out = in >> 5; The right code snippet is: out = in >> 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=shift...
The right code snippet is: out = in >> 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap...
The wrong part of the code is: out = in >> 5; The high-level-synthesis bug type of the code is: SHFT
SHFT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: out = in >> 5; The high-level-synthesis bug type of the code is: SHFT The right code snippet is: out = in >> 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: for (int i = 0; true; i++) { The right code snippet is: for (int i = 0; i < 10; 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=shift...
The right code snippet is: for (int i = 0; i < 10; 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap...
The wrong part of the code is: for (int i = 0; true; 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: for (int i = 0; true; i++) { The high-level-synthesis bug type of the code is: INF The right code snippet is: for (int i = 0; i < 10; 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: out = (int)in << 1; The right code snippet is: out = in << 1;
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=shift...
The right code snippet is: out = in << 1;
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap...
The wrong part of the code is: out = (int)in << 1; 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: out = (int)in << 1; The high-level-synthesis bug type of the code is: USE The right code snippet is: out = in << 1;
USE
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: for (int i = 0; i < 5; i++) { The right code snippet is: for (int i = 0; i < 4; i++) {
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=shift...
The right code snippet is: for (int i = 0; i < 4; i++) {
MLU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap...
The wrong part of the code is: for (int i = 0; i < 5; i++) { The high-level-synthesis bug type of the code is: MLU
MLU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: for (int i = 0; i < 5; i++) { The high-level-synthesis bug type of the code is: MLU The right code snippet is: for (int i = 0; i < 4; i++) {
MLU
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: ap_uint<7> mul_output = 0; The right code snippet is: ap_uint<7> mul_output;
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=shift...
The right code snippet is: ap_uint<7> mul_output;
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap...
The wrong part of the code is: ap_uint<7> mul_output = 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: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: ap_uint<7> mul_output = 0; The high-level-synthesis bug type of the code is: ZERO The right code snippet is: ap_uint<7> mul_output;
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: memcpy(dest, src + size/2, size); The right code snippet is: memcpy(dest, src, size);
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=shift...
The right code snippet is: memcpy(dest, src, size);
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap...
The wrong part of the code is: memcpy(dest, src + size/2, size); 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: memcpy(dest, src + size/2, size); The high-level-synthesis bug type of the code is: BUF The right code snippet is: memcpy(dest, src, size);
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS array_partition variable=my_array cyclic The right code snippet is: #pragma HLS array_partition variable=my_array complete
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=shift...
The right code snippet is: #pragma HLS array_partition variable=my_array complete
APT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS array_partition variable=my_array cyclic The high-level-synthesis bug type of the code is: APT
APT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: #pragma HLS array_partition variable=my_array cyclic The high-level-synthesis bug type of the code is: APT The right code snippet is: #pragma HLS array_partition variable=my_array complete
APT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS array_partition variable=my_array factor=3 The right code snippet is: #pragma HLS array_partition variable=my_array complete
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=shift...
The right code snippet is: #pragma HLS array_partition variable=my_array complete
FND
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS array_partition variable=my_array 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: #pragma HLS array_partition variable=my_array factor=3 The high-level-synthesis bug type of the code is: FND The right code snippet is: #pragma HLS array_partition variable=my_array complete
FND
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS array_partition variable=my_array complete dim=2 The right code snippet is: #pragma HLS array_partition variable=my_array complete dim=1
DID
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=shift...
The right code snippet is: #pragma HLS array_partition variable=my_array complete dim=1
DID
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS array_partition variable=my_array complete 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: #pragma HLS array_partition variable=my_array complete dim=2 The high-level-synthesis bug type of the code is: DID The right code snippet is: #pragma HLS array_partition variable=my_array complete dim=1
DID
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS dataflow loop_flatten 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=shift...
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS dataflow loop_flatten 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: #pragma HLS dataflow loop_flatten 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS interface ap_fifo port=my_port The right code snippet is: #pragma HLS interface ap_none port=my_port
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=shift...
The right code snippet is: #pragma HLS interface ap_none port=my_port
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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS interface ap_fifo port=my_port 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 top_module(ap_uint<4> A, ap_uint<2> shift_type, bool select, ap_uint<4>& B) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: #pragma HLS interface ap_fifo port=my_port The high-level-synthesis bug type of the code is: IDAP The right code snippet is: #pragma HLS interface ap_none port=my_port
IDAP