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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: static ap_uint<4> count_reg; The right code snippet is: static ap_uint<4> count_reg = 0;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: static ap_uint<4> count_reg = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: static ap_uint<4> count_reg; 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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: static ap_uint<4> count_reg; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static ap_uint<4> count_reg = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: A = final_output[0]; B = final_output[1]; C = final_output[2]; D_out = final_output[3]; E = final_output[4]; F = final_output[5]; G = final_output[6]; The right code snippet is: A = final_output[6]; B = final_output[5]; C = final_output[4]; D_out = final_output[3]; E = fi...
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: A = final_output[6]; B = final_output[5]; C = final_output[4]; D_out = final_output[3]; E = final_output[2]; F = final_output[1]; G = final_output[0];
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: A = final_output[0]; B = final_output[1]; C = final_output[2]; D_out = final_output[3]; E = final_output[4]; F = final_output[5]; G = final_output[6]; 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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: A = final_output[0]; B = final_output[1]; C = final_output[2]; D_out = final_output[3]; E = final_output[4]; F = final_output[5]; G = final_output[6]; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: A = final_output[6]; B = final_out...
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=final_output cyclic factor=3 The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=final_output cyclic factor=3 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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=final_output cyclic factor=3 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=final_output cyclic factor=5 The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=final_output cyclic factor=5 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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=final_output cyclic factor=5 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=final_output cyclic dim=2 factor=2 The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=final_output cyclic dim=2 factor=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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=final_output cyclic dim=2 factor=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: #pragma HLS DATAFLOW The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS DATAFLOW 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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: #pragma HLS DATAFLOW The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=final_output The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=final_output 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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=final_output The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=final_output offset=slave The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=final_output offset=slave The high-level-synthesis bug type of the code is: 'RAMB'
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=final_output offset=slave The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: #pragma HLS INTERFACE ap_memory port=final_output The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS INTERFACE ap_memory port=final_output 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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: #pragma HLS INTERFACE ap_memory port=final_output The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: #pragma HLS INTERFACE s_axilite port=final_output The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS INTERFACE s_axilite port=final_output 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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: #pragma HLS INTERFACE s_axilite port=final_output The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: #pragma HLS PIPELINE II=2 The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
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: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: #pragma HLS UNROLL factor=2 The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: None
'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 up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
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: None
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis ...
The wrong part of the code is: `if (temp_count == 16) {` The right code snippet is: `if (temp_count == 15) {`
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=...
The right code snippet is: `if (temp_count == 15) {`
'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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTE...
The wrong part of the code is: `if (temp_count == 16) {` 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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFA...
The wrong part of the code is: `if (temp_count == 16) {` The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: `if (temp_count == 15) {`
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis ...
The wrong part of the code is: `ap_uint<4> temp_count;` The right code snippet is: `ap_uint<4> temp_count = 0;`
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=...
The right code snippet is: `ap_uint<4> temp_count = 0;`
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTE...
The wrong part of the code is: `ap_uint<4> temp_count;` The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFA...
The wrong part of the code is: `ap_uint<4> temp_count;` The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: `ap_uint<4> temp_count = 0;`
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis ...
The wrong part of the code is: `temp_count<<=16;` The right code snippet is: `temp_count++;`
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=...
The right code snippet is: `temp_count++;`
'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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTE...
The wrong part of the code is: `temp_count<<=16;` 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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFA...
The wrong part of the code is: `temp_count<<=16;` The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: `temp_count++;`
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis ...
The wrong part of the code is: `while (1) {` The right code snippet is: `while (true) {`
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=...
The right code snippet is: `while (true) {`
'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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTE...
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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFA...
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: `while (true) {`
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis ...
The wrong part of the code is: `unsigned char clk_val = clk.read();` The right code snippet is: `bool clk_val = clk.read();`
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=...
The right code snippet is: `bool clk_val = clk.read();`
'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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTE...
The wrong part of the code is: `unsigned char clk_val = clk.read();` 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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFA...
The wrong part of the code is: `unsigned char clk_val = clk.read();` The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: `bool clk_val = clk.read();`
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis ...
The wrong part of the code is: ``` if (temp_count == 15) { temp_count = 0; } else if (temp_count == 14) { temp_count = 1; } else if (temp_count == 13) { temp_count = 2; } else if (temp_count == 12) { temp_count = 3; } else if (temp_count == 11) { temp_count = 4; } else if (temp_count == 10)...
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=...
The right code snippet is: `if (temp_count == 15) {`
'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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTE...
The wrong part of the code is: ``` if (temp_count == 15) { temp_count = 0; } else if (temp_count == 14) { temp_count = 1; } else if (temp_count == 13) { temp_count = 2; } else if (temp_count == 12) { temp_count = 3; } else if (temp_count == 11) { temp_count = 4; } else if (temp_count == 10)...
'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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFA...
The wrong part of the code is: ``` if (temp_count == 15) { temp_count = 0; } else if (temp_count == 14) { temp_count = 1; } else if (temp_count == 13) { temp_count = 2; } else if (temp_count == 12) { temp_count = 3; } else if (temp_count == 11) { temp_count = 4; } else if (temp_count == 10)...
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis ...
The wrong part of the code is: `ap_uint<4> temp_count = 1;` The right code snippet is: `ap_uint<4> temp_count = 0;`
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=...
The right code snippet is: `ap_uint<4> temp_count = 0;`
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTE...
The wrong part of the code is: `ap_uint<4> temp_count = 1;` The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFA...
The wrong part of the code is: `ap_uint<4> temp_count = 1;` The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: `ap_uint<4> temp_count = 0;`
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis ...
The wrong part of the code is: `count.write(temp_count + 1);` The right code snippet is: `count.write(temp_count);`
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=...
The right code snippet is: `count.write(temp_count);`
'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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTE...
The wrong part of the code is: `count.write(temp_count + 1);` 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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFA...
The wrong part of the code is: `count.write(temp_count + 1);` The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: `count.write(temp_count);`
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis ...
The wrong part of the code is: `#pragma HLS ARRAY_PARTITION variable=temp_count cyclic dim=0` The right code snippet is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete dim=0`
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=...
The right code snippet is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete dim=0`
'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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTE...
The wrong part of the code is: `#pragma HLS ARRAY_PARTITION variable=temp_count cyclic dim=0` 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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFA...
The wrong part of the code is: `#pragma HLS ARRAY_PARTITION variable=temp_count cyclic dim=0` The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete dim=0`
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis ...
The wrong part of the code is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete factor=2 dim=0` The right code snippet is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete dim=0`
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=...
The right code snippet is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete dim=0`
'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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTE...
The wrong part of the code is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete factor=2 dim=0` 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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFA...
The wrong part of the code is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete factor=2 dim=0` The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete dim=0`
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis ...
The wrong part of the code is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete dim=1` The right code snippet is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete dim=0`
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=...
The right code snippet is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete dim=0`
'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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTE...
The wrong part of the code is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete dim=1` 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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFA...
The wrong part of the code is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete dim=1` The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: `#pragma HLS ARRAY_PARTITION variable=temp_count complete dim=0`
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis ...
The wrong part of the code is: `#pragma HLS DATAFLOW loop_flatten` The right code snippet is: `#pragma HLS DATAFLOW`
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=...
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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTE...
The wrong part of the code is: `#pragma HLS DATAFLOW loop_flatten` The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFA...
The wrong part of the code is: `#pragma HLS DATAFLOW loop_flatten` The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: `#pragma HLS DATAFLOW`
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis ...
The wrong part of the code is: `#pragma HLS INTERFACE s_axilite port=clk` The right code snippet is: `#pragma HLS INTERFACE axis port=clk`
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=...
The right code snippet is: `#pragma HLS INTERFACE axis port=clk`
'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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE axis port=clk #pragma HLS INTE...
The wrong part of the code is: `#pragma HLS INTERFACE s_axilite port=clk` 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: ``` void counter( hls::stream<bool>& clk, hls::stream<bool>& rst, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFA...
The wrong part of the code is: `#pragma HLS INTERFACE s_axilite port=clk` The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: `#pragma HLS INTERFACE axis port=clk`
'IDAP'