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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: if (enable) { count_reg1 = count_reg2 + 1; while(1); count_reg2 = count_reg1; } The right code snippet is: if (enable) { count_reg1 = count_reg2 + 1; count_reg2 = count_reg1; }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
The right code snippet is: if (enable) { count_reg1 = count_reg2 + 1; count_reg2 = count_reg1; }
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: if (enable) { count_reg1 = count_reg2 + 1; while(1); count_reg2 = count_reg1; } 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: if (enable) { count_reg1 = count_reg2 + 1; while(1); count_reg2 = count_reg1; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (enable) { count_reg1 = count_reg2 + 1; count_reg2 = count_reg1; }
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, int8_t& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk...
The wrong part of the code is: int8_t& count The right code snippet is: ap_uint<8>& count
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, int8_t& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
The right code snippet is: ap_uint<8>& count
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, int8_t& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ax...
The wrong part of the code is: int8_t& count 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, int8_t& count) { #pragma HLS INTERFACE ap_ctrl_none por...
The wrong part of the code is: int8_t& count The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<8>& count
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: for (int i = 0; i < 4; i++) { #pragma HLS unroll count_reg1 = count_reg2 + 1; count_reg2 = count_reg1; } The right code snippet is: for (int i = 0; i < 8; i++) { #pragma HLS unroll count_reg1 = count_reg2 + 1; count_reg2 = count_reg1; }
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
The right code snippet is: for (int i = 0; i < 8; i++) { #pragma HLS unroll count_reg1 = count_reg2 + 1; count_reg2 = count_reg1; }
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: for (int i = 0; i < 4; i++) { #pragma HLS unroll count_reg1 = count_reg2 + 1; count_reg2 = count_reg1; } 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: for (int i = 0; i < 4; i++) { #pragma HLS unroll count_reg1 = count_reg2 + 1; count_reg2 = count_reg1; } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 8; i++) { #pragma HLS unroll count_reg1 ...
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: static ap_uint<8> count_reg1 = 1; The right code snippet is: static ap_uint<8> count_reg1 = 0;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
The right code snippet is: static ap_uint<8> count_reg1 = 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: static ap_uint<8> count_reg1 = 1; The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: static ap_uint<8> count_reg1 = 1; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static ap_uint<8> count_reg1 = 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: memcpy(buffer1, buffer2 + buffer_size, buffer_size); The right code snippet is: memcpy(buffer1, buffer2, buffer_size);
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
The right code snippet is: memcpy(buffer1, buffer2, buffer_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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: memcpy(buffer1, buffer2 + buffer_size, buffer_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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: memcpy(buffer1, buffer2 + buffer_size, buffer_size); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memcpy(buffer1, buffer2, buffer_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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS array_partition variable=count_reg1 block factor=2 dim=1 The right code snippet is: #pragma HLS array_partition variable=count_reg1 cyclic factor=2 dim=1
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
The right code snippet is: #pragma HLS array_partition variable=count_reg1 cyclic factor=2 dim=1
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS array_partition variable=count_reg1 block factor=2 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: #pragma HLS array_partition variable=count_reg1 block factor=2 dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=count_reg1 cyclic factor=2 dim=1
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS array_partition variable=count_reg1 cyclic factor=3 dim=1 The right code snippet is: #pragma HLS array_partition variable=count_reg1 cyclic factor=2 dim=1
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
The right code snippet is: #pragma HLS array_partition variable=count_reg1 cyclic factor=2 dim=1
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS array_partition variable=count_reg1 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: #pragma HLS array_partition variable=count_reg1 cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=count_reg1 cyclic factor=2 dim=1
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS array_partition variable=count_reg1 cyclic factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=count_reg1 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
The right code snippet is: #pragma HLS array_partition variable=count_reg1 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS array_partition variable=count_reg1 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: #pragma HLS array_partition variable=count_reg1 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=count_reg1 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS dataflow wait(-1) 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS dataflow wait(-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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: #pragma HLS dataflow wait(-1) 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS interface ap_vld port=count The right code snippet is: #pragma HLS interface ap_none port=count
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
The right code snippet is: #pragma HLS interface ap_none port=count
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS interface ap_vld port=count 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: #pragma HLS interface ap_vld port=count The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_none port=count
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS interface m_axi port=count random The right code snippet is: #pragma HLS interface m_axi port=count
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
The right code snippet is: #pragma HLS interface m_axi port=count
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS interface m_axi port=count random 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: #pragma HLS interface m_axi port=count random The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=count
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS interface bram port=count The right code snippet is: #pragma HLS interface ap_fifo port=count
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
The right code snippet is: #pragma HLS interface ap_fifo port=count
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS interface bram port=count 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: #pragma HLS interface bram port=count The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_fifo port=count
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS interface ap_none port=count The right code snippet is: #pragma HLS interface bram port=count
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
The right code snippet is: #pragma HLS interface bram port=count
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS interface ap_none port=count 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: #pragma HLS interface ap_none port=count The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface bram port=count
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: for (int i = 0; i < 8; i++) { count_reg1 = count_reg2 + 1; count_reg2 = count_reg1; } The right code snippet is: for (int i = 0; i < 8; i++) { #pragma HLS unroll count_reg1 = count_reg2 + 1; count_reg2 = count_reg1; }
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk ...
The right code snippet is: for (int i = 0; i < 8; i++) { #pragma HLS unroll count_reg1 = count_reg2 + 1; count_reg2 = count_reg1; }
'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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: for (int i = 0; i < 8; i++) { count_reg1 = count_reg2 + 1; count_reg2 = count_reg1; } 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 <hls_math.h> void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) { #pragma HLS INTERFACE ap_ctrl_none...
The wrong part of the code is: for (int i = 0; i < 8; i++) { count_reg1 = count_reg2 + 1; count_reg2 = count_reg1; } The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: for (int i = 0; i < 8; i++) { #pragma HLS unroll count_reg1 = count_reg2 + 1; ...
'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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { bool Y; X = (A >= Y) ? true : false; } ``` Note: The voltage supply signals are not necessary in HLS a...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { bool Y; X = (A >= Y) ? true : false; } The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <hls_math.h> void comparator_2bit(int A, int B, bool &X) { bool Y; X = (A >= Y) ? true : false; } ``` Note: The voltage supply signals are not necessary in HLS and ca...
The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { bool Y; X = (A >= Y) ? true : false; } ``` Note: The voltage supply signals are not necessa...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { bool Y; X = (A >= Y) ? true : false; } 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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { bool Y; X = (A >= Y) ? true : false; } ``` Note: The v...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { bool Y; X = (A >= Y) ? true : false; } The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; unsigned int D = B; X = (C >= D) ? true : false; } ``` Note: The voltage suppl...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; unsigned int D = B; X = (C >= D) ? true : false; } The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <hls_math.h> void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; unsigned int D = B; X = (C >= D) ? true : false; } ``` Note: The voltage supply sig...
The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; unsigned int D = B; X = (C >= D) ? true : false; } ``` Note: The vo...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; unsigned int D = B; X = (C >= D) ? true : false; } 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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; unsigned int D = B; X = (C >= D...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; unsigned int D = B; X = (C >= D) ? true : false; } The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A...
'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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { while(A < B) { X = false; } X = true; } ``` Note: The voltage supply signals are not neces...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { while(A < B) { X = false; } X = true; } The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <hls_math.h> void comparator_2bit(int A, int B, bool &X) { while(A < B) { X = false; } X = true; } ``` Note: The voltage supply signals are not necessary ...
The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { while(A < B) { X = false; } X = true; } ``` Note: The voltage supply signals ar...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { while(A < B) { X = false; } X = true; } The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <hls_math.h> void comparator_2bit(int A, int B, bool &X) { while(A < B) { X = false; } X = true; } ```...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { while(A < B) { X = false; } X = true; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; ...
'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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; X = (C >> 32) ? true : false; } ``` Note: The voltage supply signals are not neces...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; X = (C >> 32) ? true : false; } The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <hls_math.h> void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; X = (C >> 32) ? true : false; } ``` Note: The voltage supply signals are not necessary ...
The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; X = (C >> 32) ? true : false; } ``` Note: The voltage supply signals ar...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; X = (C >> 32) ? true : false; } 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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; X = (C >> 32) ? true : false; } ```...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { unsigned int C = A; X = (C >> 32) ? true : false; } The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false;...
'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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { int arr[2] = {A, B}; X = (arr[3] >= arr[1]) ? true : false; } ``` Note: The voltage supply signals are...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { int arr[2] = {A, B}; X = (arr[3] >= arr[1]) ? true : false; } The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <hls_math.h> void comparator_2bit(int A, int B, bool &X) { int arr[2] = {A, B}; X = (arr[3] >= arr[1]) ? true : false; } ``` Note: The voltage supply signals are not ...
The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { int arr[2] = {A, B}; X = (arr[3] >= arr[1]) ? true : false; } ``` Note: The voltage supply ...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { int arr[2] = {A, B}; X = (arr[3] >= arr[1]) ? true : false; } 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 <hls_math.h> void comparator_2bit(int A, int B, bool &X) { int arr[2] = {A, B}; X = (arr[3] >= arr[1]) ? true : fa...
The wrong part of the code is: void comparator_2bit(int A, int B, bool &X) { int arr[2] = {A, B}; X = (arr[3] >= arr[1]) ? true : false; } The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true...
'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 <hls_math.h> #pragma HLS pipeline II=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } ``` Note: The voltage supply signals are not nece...
The wrong part of the code is: #pragma HLS pipeline II=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <hls_math.h> #pragma HLS pipeline II=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } ``` Note: The voltage supply signals are not necessary...
The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'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 <hls_math.h> #pragma HLS pipeline II=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } ``` Note: The voltage supply signals a...
The wrong part of the code is: #pragma HLS pipeline II=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } 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 <hls_math.h> #pragma HLS pipeline II=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } ``...
The wrong part of the code is: #pragma HLS pipeline II=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false;...
'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 <hls_math.h> #pragma HLS unroll factor=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } ``` Note: The voltage supply signals are not ne...
The wrong part of the code is: #pragma HLS unroll factor=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <hls_math.h> #pragma HLS unroll factor=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } ``` Note: The voltage supply signals are not necessa...
The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; }
'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 <hls_math.h> #pragma HLS unroll factor=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } ``` Note: The voltage supply signals...
The wrong part of the code is: #pragma HLS unroll factor=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } 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 <hls_math.h> #pragma HLS unroll factor=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } ...
The wrong part of the code is: #pragma HLS unroll factor=2 void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : false; } The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: void comparator_2bit(int A, int B, bool &X) { X = (A >= B) ? true : fal...
'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 ap_none port=data_in #pragma HLS INTERFACE ap_none port=shift_amount #pragma HLS INTERFACE ap_none port=mode #pragma HLS INTERFACE ap_none port=shifted_output vo...
The wrong part of the code is: ap_uint<8> shifted_data = data_in; The right code snippet is: ap_uint<8> shifted_data;
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none port=shift_amount #pragma HLS INTERFACE ap_none port=mode #pragma HLS INTERFACE ap_none port=shifted_output void ba...
The right code snippet is: ap_uint<8> shifted_data;
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none port=shift_amount #pragma HLS INTERFACE ap_none port=mode #pragma HLS INTERFACE ap_none port=shifted...
The wrong part of the code is: ap_uint<8> shifted_data = data_in; The high-level-synthesis bug type of the code is: INIT
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none port=shift_amount #pragma HLS INTERFACE ap_none port=mode #prag...
The wrong part of the code is: ap_uint<8> shifted_data = data_in; The high-level-synthesis bug type of the code is: INIT The right code snippet is: ap_uint<8> shifted_data;
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none port=shift_amount #pragma HLS INTERFACE ap_none port=mode #pragma HLS INTERFACE ap_none port=shifted_output vo...
The wrong part of the code is: shifted_data = (data_in << shift_amount) | (data_in >> (9 - shift_amount)); The right code snippet is: shifted_data = (data_in << shift_amount) | (data_in >> (8 - shift_amount));
OOB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none port=shift_amount #pragma HLS INTERFACE ap_none port=mode #pragma HLS INTERFACE ap_none port=shifted_output void ba...
The right code snippet is: shifted_data = (data_in << shift_amount) | (data_in >> (8 - shift_amount));
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none port=shift_amount #pragma HLS INTERFACE ap_none port=mode #pragma HLS INTERFACE ap_none port=shifted...
The wrong part of the code is: shifted_data = (data_in << shift_amount) | (data_in >> (9 - shift_amount)); The high-level-synthesis bug type of the code is: OOB
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none port=shift_amount #pragma HLS INTERFACE ap_none port=mode #prag...
The wrong part of the code is: shifted_data = (data_in << shift_amount) | (data_in >> (9 - shift_amount)); The high-level-synthesis bug type of the code is: OOB The right code snippet is: shifted_data = (data_in << shift_amount) | (data_in >> (8 - shift_amount));
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none port=shift_amount #pragma HLS INTERFACE ap_none port=mode #pragma HLS INTERFACE ap_none port=shifted_output vo...
The wrong part of the code is: switch(mode) { case 0: shifted_data = data_in << shift_amount; // Logical left shift break; case 1: shifted_data = data_in >> shift_amount; // Logical right shift break; case 2: shifted_data = data_in << shift_amount; // Logical...
INF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none port=shift_amount #pragma HLS INTERFACE ap_none port=mode #pragma HLS INTERFACE ap_none port=shifted_output void ba...
The right code snippet is: switch(mode) { case 0: shifted_data = data_in << shift_amount; // Logical left shift break; case 1: shifted_data = data_in >> shift_amount; // Logical right shift break; default: shifted_data = 0; break; }
INF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none port=shift_amount #pragma HLS INTERFACE ap_none port=mode #pragma HLS INTERFACE ap_none port=shifted...
The wrong part of the code is: switch(mode) { case 0: shifted_data = data_in << shift_amount; // Logical left shift break; case 1: shifted_data = data_in >> shift_amount; // Logical right shift break; case 2: shifted_data = data_in << shift_amount; // Logical...
INF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none port=shift_amount #pragma HLS INTERFACE ap_none port=mode #prag...
The wrong part of the code is: switch(mode) { case 0: shifted_data = data_in << shift_amount; // Logical left shift break; case 1: shifted_data = data_in >> shift_amount; // Logical right shift break; case 2: shifted_data = data_in << shift_amount; // Logical...
INF