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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: #pragma HLS interface ap_fifo port=buffer1 The right code snippet is: #pragma HLS interface ap_none port=buffer1
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: #pragma HLS interface ap_none port=buffer1
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: #pragma HLS interface ap_fifo port=buffer1 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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: #pragma HLS interface ap_fifo port=buffer1 The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_none port=buffer1
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: #pragma HLS interface m_axi port=buffer1 offset=none The right code snippet is: #pragma HLS interface m_axi port=buffer1 offset=slave
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: #pragma HLS interface m_axi port=buffer1 offset=slave
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: #pragma HLS interface m_axi port=buffer1 offset=none 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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: #pragma HLS interface m_axi port=buffer1 offset=none The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=buffer1 offset=slave
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: #pragma HLS interface bram port=buffer1 The right code snippet is: #pragma HLS interface ap_fifo port=buffer1
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: #pragma HLS interface ap_fifo port=buffer1
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: #pragma HLS interface bram port=buffer1 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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: #pragma HLS interface bram port=buffer1 The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_fifo port=buffer1
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: #pragma HLS interface ap_fifo port=buffer1 The right code snippet is: #pragma HLS interface bram port=buffer1
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: #pragma HLS interface bram port=buffer1
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: #pragma HLS interface ap_fifo port=buffer1 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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: #pragma HLS interface ap_fifo port=buffer1 The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface bram port=buffer1
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: #pragma HLS pipeline
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
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
'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<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
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: ``` #include <ap_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: ap_uint<8> voltage_rounded = 0; The right code snippet is: ap_uint<8> voltage_rounded;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: ap_uint<8> voltage_rounded;
'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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: ap_uint<8> voltage_rounded = 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: ap_uint<8> voltage_rounded = 0; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<8> voltage_rounded;
'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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: voltage_level = voltage_rounded[10]; The right code snippet is: voltage_level = voltage_rounded;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: voltage_level = voltage_rounded;
'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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: voltage_level = voltage_rounded[10]; 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: voltage_level = voltage_rounded[10]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: voltage_level = voltage_rounded;
'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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: voltage_rounded = (ap_fixed<9,9,AP_RND>::from_float(voltage) << 10); The right code snippet is: voltage_rounded = (ap_fixed<9,9,AP_RND>::from_float(voltage) + 0.5);
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: voltage_rounded = (ap_fixed<9,9,AP_RND>::from_float(voltage) + 0.5);
'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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: voltage_rounded = (ap_fixed<9,9,AP_RND>::from_float(voltage) << 10); 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: voltage_rounded = (ap_fixed<9,9,AP_RND>::from_float(voltage) << 10); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: voltage_rounded = (ap_fixed<9,9,AP_RND>::from_float(voltage) + 0.5);
'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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: while(1); The right code snippet is: if (voltage >= 3.3) { power_good = 1; } else { power_good = 0; }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: if (voltage >= 3.3) { power_good = 1; } else { power_good = 0; }
'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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: while(1); The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: while(1); The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (voltage >= 3.3) { power_good = 1; } else { power_good = 0; }
'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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: ap_int<8> voltage_rounded; The right code snippet is: ap_uint<8> voltage_rounded;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: ap_uint<8> voltage_rounded;
'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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: ap_int<8> voltage_rounded; 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: ap_int<8> voltage_rounded; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<8> voltage_rounded;
'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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: for(int i=0; i<10; i++){ voltage_level = voltage_rounded; power_good = voltage_level & 1; } The right code snippet is: // No snippet suitable for manual loop unrolling in the given code
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: // No snippet suitable for manual loop unrolling in the given code
'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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: for(int i=0; i<10; i++){ voltage_level = voltage_rounded; power_good = voltage_level & 1; } 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: for(int i=0; i<10; i++){ voltage_level = voltage_rounded; power_good = voltage_level & 1; } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: // No snippet suitable for manual loop unrolling in the given code
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: ap_uint<8> voltage_rounded = 0; The right code snippet is: ap_uint<8> voltage_rounded;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: ap_uint<8> voltage_rounded;
'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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: ap_uint<8> voltage_rounded = 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: ap_uint<8> voltage_rounded = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_uint<8> voltage_rounded;
'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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: voltage_level = half_buffer[10]; The right code snippet is: // No snippet suitable for buffer splitting in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: // No snippet suitable for buffer splitting in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: voltage_level = half_buffer[10]; 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: voltage_level = half_buffer[10]; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: // No snippet suitable for buffer splitting in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: #pragma HLS array_partition variable=voltage_rounded cyclic factor=0 dim=1 The right code snippet is: // No snippet suitable for array partition type error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: // No snippet suitable for array partition type error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: #pragma HLS array_partition variable=voltage_rounded cyclic factor=0 dim=1 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: #pragma HLS array_partition variable=voltage_rounded cyclic factor=0 dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: // No snippet suitable for array partition type error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: #pragma HLS array_partition variable=voltage_rounded cyclic factor=3 dim=1 The right code snippet is: // No snippet suitable for factor not divisible error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: // No snippet suitable for factor not divisible error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: #pragma HLS array_partition variable=voltage_rounded cyclic factor=3 dim=1 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: #pragma HLS array_partition variable=voltage_rounded cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: // No snippet suitable for factor not divisible error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: #pragma HLS array_partition variable=voltage_rounded cyclic factor=3 dim=2 The right code snippet is: // No snippet suitable for incorrect dimension error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: // No snippet suitable for incorrect dimension error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: #pragma HLS array_partition variable=voltage_rounded cyclic factor=3 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: #pragma HLS array_partition variable=voltage_rounded cyclic factor=3 dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: // No snippet suitable for incorrect dimension error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: #pragma HLS dataflow voltage_level = voltage_rounded; power_good = voltage_level & 1; The right code snippet is: // No snippet suitable for dataflow position error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: // No snippet suitable for dataflow position error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: #pragma HLS dataflow voltage_level = voltage_rounded; power_good = voltage_level & 1; 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: #pragma HLS dataflow voltage_level = voltage_rounded; power_good = voltage_level & 1; The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: // No snippet suitable for dataflow position error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: #pragma HLS interface ap_none register port=voltage_rounded The right code snippet is: // No snippet suitable for incorrect data access pattern error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: // No snippet suitable for incorrect data access pattern error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: #pragma HLS interface ap_none register port=voltage_rounded 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: #pragma HLS interface ap_none register port=voltage_rounded The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: // No snippet suitable for incorrect data access pattern error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: #pragma HLS interface m_axi port=voltage_rounded offset=1024 The right code snippet is: // No snippet suitable for m_axi interface access error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: // No snippet suitable for m_axi interface access error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: #pragma HLS interface m_axi port=voltage_rounded offset=1024 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: #pragma HLS interface m_axi port=voltage_rounded offset=1024 The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: // No snippet suitable for m_axi interface access error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: #pragma HLS interface ap_memory port=voltage_rounded The right code snippet is: // No snippet suitable for scalar to array interface mapping error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: // No snippet suitable for scalar to array interface mapping error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: #pragma HLS interface ap_memory port=voltage_rounded 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: #pragma HLS interface ap_memory port=voltage_rounded The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: // No snippet suitable for scalar to array interface mapping error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: #pragma HLS interface ap_vld port=voltage_rounded The right code snippet is: // No snippet suitable for array to scalar interface mapping error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: // No snippet suitable for array to scalar interface mapping error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: #pragma HLS interface ap_vld port=voltage_rounded 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: #pragma HLS interface ap_vld port=voltage_rounded The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: // No snippet suitable for array to scalar interface mapping error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: #pragma HLS pipeline II=2 voltage_level = voltage_rounded; power_good = voltage_level & 1; The right code snippet is: // No snippet suitable for multi-level pipelining error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: // No snippet suitable for multi-level pipelining error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: #pragma HLS pipeline II=2 voltage_level = voltage_rounded; power_good = voltage_level & 1; 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: #pragma HLS pipeline II=2 voltage_level = voltage_rounded; power_good = voltage_level & 1; The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: // No snippet suitable for multi-level pipelining error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragm...
The wrong part of the code is: #pragma HLS unroll factor=2 voltage_level = voltage_rounded; power_good = voltage_level & 1; The right code snippet is: // No snippet suitable for inner loops not fully-unrolled error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) { #pragma HLS...
The right code snippet is: // No snippet suitable for inner loops not fully-unrolled error in the given 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_good, ap_uint<8> &voltage_level ) {...
The wrong part of the code is: #pragma HLS unroll factor=2 voltage_level = voltage_rounded; power_good = voltage_level & 1; 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_fixed.h> void power_manager ( bool clk, bool reset, bool sleep, ap_uint<8> voltage, bool &power_go...
The wrong part of the code is: #pragma HLS unroll factor=2 voltage_level = voltage_rounded; power_good = voltage_level & 1; The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: // No snippet suitable for inner loops not fully-unrolled error in the given 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> #define ADD 0 #define SUB 1 void simple_calculator( bool clk, bool reset, bool ce, ap_uint<8> a, ap_uint<8> b, ap_uint<2> op, ap_uint<...
The wrong part of the code is: result_reg = a[8] + b[8]; The right code snippet is: result_reg = a + b;
'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> #define ADD 0 #define SUB 1 void simple_calculator( bool clk, bool reset, bool ce, ap_uint<8> a, ap_uint<8> b, ap_uint<2> op, ap_uint<8> &r...
The right code snippet is: result_reg = a + b;
'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> #define ADD 0 #define SUB 1 void simple_calculator( bool clk, bool reset, bool ce, ap_uint<8> a, ap_uint<8> b, ap_uint<2> op, ...
The wrong part of the code is: result_reg = a[8] + b[8]; 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> #define ADD 0 #define SUB 1 void simple_calculator( bool clk, bool reset, bool ce, ap_uint<8> a, ...
The wrong part of the code is: result_reg = a[8] + b[8]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: result_reg = a + b;
'OOB'