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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& ...
The wrong part of the code is: static ap_uint<4> counter; The right code snippet is: static ap_uint<4> counter = 0;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& count...
The right code snippet is: static ap_uint<4> counter = 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap...
The wrong part of the code is: static ap_uint<4> counter; 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& ena...
The wrong part of the code is: static ap_uint<4> counter; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static ap_uint<4> counter = 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& ...
The wrong part of the code is: memcpy(dest+size, src, size); The right code snippet is: memcpy(dest, src, size);
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& count...
The right code snippet is: memcpy(dest, src, size);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap...
The wrong part of the code is: memcpy(dest+size, src, 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& ena...
The wrong part of the code is: memcpy(dest+size, src, size); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memcpy(dest, src, size);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=count cyclic dim=0 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& count...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& ena...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=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=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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=count complete dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& count...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=count complete 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& ena...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=count complete dim=1 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=count complete dim=2 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& count...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=count complete dim=2 The high-level-synthesis bug type of the code is: 'DID'
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& ena...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=count complete dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& ...
The wrong part of the code is: #pragma HLS DATAFLOW wait=2 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& count...
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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap...
The wrong part of the code is: #pragma HLS DATAFLOW wait=2 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& ena...
The wrong part of the code is: #pragma HLS DATAFLOW wait=2 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& ...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=reset #pragma HLS INTERFACE axis port=enable #pragma HLS INTERFACE s_axilite port=count The right code snippet is: #pragma HLS INTERFACE ap_ctrl_none port=re...
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& count...
The right code snippet is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=reset #pragma HLS INTERFACE axis port=enable #pragma HLS INTERFACE axis 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=reset #pragma HLS INTERFACE axis port=enable #pragma HLS INTERFACE s_axilite 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& ena...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=reset #pragma HLS INTERFACE axis port=enable #pragma HLS INTERFACE s_axilite port=count The high-level-synthesis bug type of the code is: 'IDAP' The right co...
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& ...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE m_axi port=clk #pragma HLS INTERFACE m_axi port=reset #pragma HLS INTERFACE m_axi port=enable #pragma HLS INTERFACE m_axi port=count The right code snippet is: #pragma HLS INTERFACE ap_ctrl_none port=ret...
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& count...
The right code snippet is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=reset #pragma HLS INTERFACE axis port=enable #pragma HLS INTERFACE axis 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE m_axi port=clk #pragma HLS INTERFACE m_axi port=reset #pragma HLS INTERFACE m_axi port=enable #pragma HLS INTERFACE m_axi port=count 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& ena...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE m_axi port=clk #pragma HLS INTERFACE m_axi port=reset #pragma HLS INTERFACE m_axi port=enable #pragma HLS INTERFACE m_axi port=count The high-level-synthesis bug type of the code is: 'RAMB' The right cod...
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& ...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE bram port=clk #pragma HLS INTERFACE bram port=reset #pragma HLS INTERFACE bram port=enable #pragma HLS INTERFACE bram port=count The right code snippet is: #pragma HLS INTERFACE ap_ctrl_none port=return ...
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& count...
The right code snippet is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=reset #pragma HLS INTERFACE axis port=enable #pragma HLS INTERFACE axis 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE bram port=clk #pragma HLS INTERFACE bram port=reset #pragma HLS INTERFACE bram port=enable #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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& ena...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE bram port=clk #pragma HLS INTERFACE bram port=reset #pragma HLS INTERFACE bram port=enable #pragma HLS INTERFACE bram port=count The high-level-synthesis bug type of the code is: 'SMA' The right code sni...
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& ...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_vld port=clk #pragma HLS INTERFACE ap_vld port=reset #pragma HLS INTERFACE ap_vld port=enable #pragma HLS INTERFACE ap_vld port=count The right code snippet is: #pragma HLS INTERFACE ap_ctrl_none port...
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& count...
The right code snippet is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=reset #pragma HLS INTERFACE axis port=enable #pragma HLS INTERFACE axis 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_vld port=clk #pragma HLS INTERFACE ap_vld port=reset #pragma HLS INTERFACE ap_vld port=enable #pragma HLS INTERFACE ap_vld 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& ena...
The wrong part of the code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_vld port=clk #pragma HLS INTERFACE ap_vld port=reset #pragma HLS INTERFACE ap_vld port=enable #pragma HLS INTERFACE ap_vld port=count The high-level-synthesis bug type of the code is: 'AMS' The right ...
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& ...
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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& count...
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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& ena...
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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& ...
The wrong part of the code is: for(int i=0; i<4; i+=2) { counter++; } The right code snippet is: for(int i=0; i<4; i++) { counter++; }
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap_uint<4>>& count...
The right code snippet is: for(int i=0; i<4; i++) { counter++; }
'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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& enable, // enable input hls::stream<ap...
The wrong part of the code is: for(int i=0; i<4; i+=2) { counter++; } 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: ```c++ void binary_counter( hls::stream<bool>& clk, // clock input hls::stream<bool>& reset, // reset input hls::stream<bool>& ena...
The wrong part of the code is: for(int i=0; i<4; i+=2) { counter++; } The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: for(int i=0; i<4; i++) { counter++; }
'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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma HLS INTERFAC...
The wrong part of the code is: if(ADR_I == 0x7FFFFFFF && CYC_I && STB_I && !WE_I && timer_data.interrupt_o) { The right code snippet is: if(ADR_I == 0x7FFFFFF8 && CYC_I && STB_I && !WE_I && timer_data.interrupt_o) {
'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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma HLS INTERFACE ap_...
The right code snippet is: if(ADR_I == 0x7FFFFFF8 && CYC_I && STB_I && !WE_I && timer_data.interrupt_o) {
'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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma H...
The wrong part of the code is: if(ADR_I == 0x7FFFFFFF && CYC_I && STB_I && !WE_I && timer_data.interrupt_o) { 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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTER...
The wrong part of the code is: if(ADR_I == 0x7FFFFFFF && CYC_I && STB_I && !WE_I && timer_data.interrupt_o) { The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: if(ADR_I == 0x7FFFFFF8 && CYC_I && STB_I && !WE_I && timer_data.interrupt_o) {
'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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma HLS INTERFAC...
The wrong part of the code is: ap_uint<28> counter; The right code snippet is: timer_data.counter = 0;
'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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma HLS INTERFACE ap_...
The right code snippet is: timer_data.counter = 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: #pragma HLS INTERFACE ap_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma H...
The wrong part of the code is: ap_uint<28> counter; 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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTER...
The wrong part of the code is: ap_uint<28> counter; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: timer_data.counter = 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: #pragma HLS INTERFACE ap_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma HLS INTERFAC...
The wrong part of the code is: else if(timer_data.counter != 0x00FFFFF) { The right code snippet is: else if(timer_data.counter == 0x00FFFFF) {
'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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma HLS INTERFACE ap_...
The right code snippet is: else if(timer_data.counter == 0x00FFFFF) {
'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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma H...
The wrong part of the code is: else if(timer_data.counter != 0x00FFFFF) { The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTER...
The wrong part of the code is: else if(timer_data.counter != 0x00FFFFF) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: else if(timer_data.counter == 0x00FFFFF) {
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma HLS INTERFAC...
The wrong part of the code is: timer_data.counter<<32; The right code snippet is: timer_data.counter++;
'SHFT'
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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma HLS INTERFACE ap_...
The right code snippet is: timer_data.counter++;
'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: #pragma HLS INTERFACE ap_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma H...
The wrong part of the code is: timer_data.counter<<32; 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: #pragma HLS INTERFACE ap_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTER...
The wrong part of the code is: timer_data.counter<<32; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: timer_data.counter++;
'SHFT'
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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma HLS INTERFAC...
The wrong part of the code is: int interrupt_o; The right code snippet is: bool interrupt_o;
'USE'
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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma HLS INTERFACE ap_...
The right code snippet is: bool interrupt_o;
'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: #pragma HLS INTERFACE ap_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma H...
The wrong part of the code is: int interrupt_o; 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: #pragma HLS INTERFACE ap_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTER...
The wrong part of the code is: int interrupt_o; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: bool interrupt_o;
'USE'
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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma HLS INTERFAC...
The wrong part of the code is: timer_data.counter = 1; The right code snippet is: timer_data.counter = 0;
'ZERO'
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_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma HLS INTERFACE ap_...
The right code snippet is: timer_data.counter = 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: #pragma HLS INTERFACE ap_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTERFACE ap_ctrl_hs port=return #pragma H...
The wrong part of the code is: timer_data.counter = 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: #pragma HLS INTERFACE ap_clk CLK_I #pragma HLS INTERFACE ap_rst RST_I #pragma HLS INTERFACE ap_bus depth=1 port=ADR_I #pragma HLS INTER...
The wrong part of the code is: timer_data.counter = 1; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: timer_data.counter = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void top_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pragma HLS INT...
The wrong part of the code is: ap_uint<100> sum = 0; The right code snippet is: ap_uint<100> sum;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void top_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pragma HLS INTERFAC...
The right code snippet is: ap_uint<100> sum;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void top_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pra...
The wrong part of the code is: ap_uint<100> sum = 0; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void top_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> se...
The wrong part of the code is: ap_uint<100> sum = 0; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<100> sum;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void top_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pragma HLS INT...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // some code here } The right code snippet is: for (int i = 0; i < 10; i++) { // some code here }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void top_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pragma HLS INTERFAC...
The right code snippet is: for (int i = 0; i < 10; i++) { // some code here }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void top_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pra...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // some code here } The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void top_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> se...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // some code here } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 10; i++) { // some code here }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void top_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pragma HLS INT...
The wrong part of the code is: #pragma HLS array_partition variable=mux_sel cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=mux_sel complete
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void top_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pragma HLS INTERFAC...
The right code snippet is: #pragma HLS array_partition variable=mux_sel complete
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void top_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pra...
The wrong part of the code is: #pragma HLS array_partition variable=mux_sel 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_int.h> void top_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> se...
The wrong part of the code is: #pragma HLS array_partition variable=mux_sel cyclic factor=3 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=mux_sel complete
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void top_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pragma HLS INT...
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_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pragma HLS INTERFAC...
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_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pra...
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_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> se...
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_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pragma HLS INT...
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_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pragma HLS INTERFAC...
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_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> sel, ap_uint<104> &out ) { #pra...
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_function( ap_uint<100> a, ap_uint<100> b, bool cin, ap_uint<1024> in, ap_uint<8> se...
The wrong part of the code is: #pragma HLS unroll factor=2 The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: #pragma HLS unroll
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_rst port=RST #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS #...
The wrong part of the code is: if (count == key_length) { valid = true; hashkey = hash; } else if (count % interval == 0) { hashkey = hash; } The right code snippet is: if (count == key_length - 1) { valid = true; hashkey = hash; } else if (count % interval == 0) { hashkey = has...
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_clk port=CLK #pragma HLS INTERFACE ap_rst port=RST #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS #pragm...
The right code snippet is: if (count == key_length - 1) { valid = true; hashkey = hash; } else if (count % interval == 0) { hashkey = hash; }
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_clk port=CLK #pragma HLS INTERFACE ap_rst port=RST #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle...
The wrong part of the code is: if (count == key_length) { valid = true; hashkey = hash; } else if (count % interval == 0) { hashkey = hash; } 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_clk port=CLK #pragma HLS INTERFACE ap_rst port=RST #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The wrong part of the code is: if (count == key_length) { valid = true; hashkey = hash; } else if (count % interval == 0) { hashkey = hash; } The high-level-synthesis bug type of the code is: OOB The right code snippet is: if (count == key_length - 1) { valid = true; hashkey = h...
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_clk port=CLK #pragma HLS INTERFACE ap_rst port=RST #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS #...
The wrong part of the code is: static uint8_t count; static uint32_t hash; static uint32_t poly_coeffs; The right code snippet is: static uint8_t count = 0; static uint32_t hash = 0; static uint32_t poly_coeffs = 0b10000001;
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_clk port=CLK #pragma HLS INTERFACE ap_rst port=RST #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS #pragm...
The right code snippet is: static uint8_t count = 0; static uint32_t hash = 0; static uint32_t poly_coeffs = 0b10000001;
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_clk port=CLK #pragma HLS INTERFACE ap_rst port=RST #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle...
The wrong part of the code is: static uint8_t count; static uint32_t hash; static uint32_t poly_coeffs; 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_clk port=CLK #pragma HLS INTERFACE ap_rst port=RST #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The wrong part of the code is: static uint8_t count; static uint32_t hash; static uint32_t poly_coeffs; The high-level-synthesis bug type of the code is: INIT The right code snippet is: static uint8_t count = 0; static uint32_t hash = 0; static uint32_t poly_coeffs = 0b10000001;
INIT