instruction
stringlengths
139
357k
response
stringlengths
36
4.54k
buggy_type
stringclasses
745 values
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> const int AW = 2; void fifo_full_block( bool reset, ap_uint<1> wr_clk, ap_uint<AW+1> wr_rd_gray_pointer, bool wr_write, bool& wr_fifo_full...
The wrong part of the code is: #pragma HLS interface ap_none port=wr_addr 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_int.h> const int AW = 2; void fifo_full_block( bool reset, ap_uint<1> wr_clk, ap_uint<AW+1> wr_rd_gray_pointer, bool wr_write, bool& wr_fifo_full, ...
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_int.h> const int AW = 2; void fifo_full_block( bool reset, ap_uint<1> wr_clk, ap_uint<AW+1> wr_rd_gray_pointer, bool wr_write, bool& w...
The wrong part of the code is: #pragma HLS interface ap_none port=wr_addr The high-level-synthesis bug type of the code is: 'AMS'
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> const int AW = 2; void fifo_full_block( bool reset, ap_uint<1> wr_clk, ap_uint<AW+1> wr_rd_gray_po...
The wrong part of the code is: #pragma HLS interface ap_none port=wr_addr 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_int.h> const int AW = 2; void fifo_full_block( bool reset, ap_uint<1> wr_clk, ap_uint<AW+1> wr_rd_gray_pointer, bool wr_write, bool& wr_fifo_full...
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_int.h> const int AW = 2; void fifo_full_block( bool reset, ap_uint<1> wr_clk, ap_uint<AW+1> wr_rd_gray_pointer, bool wr_write, bool& wr_fifo_full, ...
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_int.h> const int AW = 2; void fifo_full_block( bool reset, ap_uint<1> wr_clk, ap_uint<AW+1> wr_rd_gray_pointer, bool wr_write, bool& w...
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> const int AW = 2; void fifo_full_block( bool reset, ap_uint<1> wr_clk, ap_uint<AW+1> wr_rd_gray_po...
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_int.h> const int AW = 2; void fifo_full_block( bool reset, ap_uint<1> wr_clk, ap_uint<AW+1> wr_rd_gray_pointer, bool wr_write, bool& wr_fifo_full...
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_int.h> const int AW = 2; void fifo_full_block( bool reset, ap_uint<1> wr_clk, ap_uint<AW+1> wr_rd_gray_pointer, bool wr_write, bool& wr_fifo_full, ...
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_int.h> const int AW = 2; void fifo_full_block( bool reset, ap_uint<1> wr_clk, ap_uint<AW+1> wr_rd_gray_pointer, bool wr_write, bool& w...
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> const int AW = 2; void fifo_full_block( bool reset, ap_uint<1> wr_clk, ap_uint<AW+1> wr_rd_gray_po...
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: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: count_reg = count_reg + 10; The right code snippet is: count_reg = count_reg + 1;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: count_reg = count_reg + 1;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: count_reg = count_reg + 10; The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: count_reg = count_reg + 10; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: count_reg = count_reg + 1;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> 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_reg; The right code snippet is: static ap_uint<8> count_reg = 0;
'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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: static ap_uint<8> count_reg = 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: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: static ap_uint<8> count_reg; 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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: static ap_uint<8> count_reg; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<8> count_reg = 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: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: count_reg = count_reg << 10; The right code snippet is: count_reg = count_reg << 1;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: count_reg = count_reg << 1;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: count_reg = count_reg << 10; The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: count_reg = count_reg << 10; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: count_reg = count_reg << 1;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: while(1); The right code snippet is: No suitable code snippet found.
'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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: while(1); The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
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: No suitable code snippet found.
'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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: ap_int<8> signed_count = count_reg; The right code snippet is: No suitable code snippet found.
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: ap_int<8> signed_count = count_reg; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: ap_int<8> signed_count = count_reg; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: No suitable code snippet found.
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> 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 < 16; i+=2) { count_reg = count_reg + 1; } The right code snippet is: No suitable code snippet found.
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: for (int i = 0; i < 16; i+=2) { count_reg = count_reg + 1; } The high-level-synthesis bug type of the code is: 'MLU'
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: for (int i = 0; i < 16; i+=2) { count_reg = count_reg + 1; } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: No suitable code snippet found.
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> 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_reg{}; The right code snippet is: static ap_uint<8> 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_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: static ap_uint<8> 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_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: static ap_uint<8> 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_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: static ap_uint<8> count_reg{}; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static ap_uint<8> 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_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFAC...
The wrong part of the code is: memcpy(dest_buf, src_buf, size); The right code snippet is: No suitable code snippet found.
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: memcpy(dest_buf, src_buf, size); The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: memcpy(dest_buf, src_buf, size); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: No suitable code snippet found.
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> 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 complete The right code snippet is: No suitable code snippet found.
'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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #pragma HLS array_partition variable=count complete 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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS array_partition variable=count complete The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: No suitable code snippet found.
'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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> 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 block factor=3 The right code snippet is: No suitable code snippet found.
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #pragma HLS array_partition variable=count block factor=3 The high-level-synthesis bug type of the code is: 'FND'
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS array_partition variable=count block factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: No suitable code snippet found.
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> 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 dim=2 The right code snippet is: No suitable code snippet found.
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #pragma HLS array_partition variable=count dim=2 The high-level-synthesis bug type of the code is: 'DID'
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS array_partition variable=count dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: No suitable code snippet found.
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> 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 The right code snippet is: No suitable code snippet found.
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
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_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
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: No suitable code snippet found.
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> 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 right code snippet is: No suitable code snippet found.
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #pragma HLS interface ap_none 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 <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS interface ap_none port=count The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: No suitable code snippet found.
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> 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 The right code snippet is: No suitable code snippet found.
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #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: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS interface m_axi port=count The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: No suitable code snippet found.
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> 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 axis port=count The right code snippet is: No suitable code snippet found.
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #pragma HLS interface axis 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 <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS interface axis port=count The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: No suitable code snippet found.
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> 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 right code snippet is: No suitable code snippet found.
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #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: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS interface ap_vld port=count The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: No suitable code snippet found.
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> 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 right code snippet is: No suitable code snippet found.
'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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
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: No suitable code snippet found.
'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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> 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 unroll factor=2 inner_loop_unroll=none The right code snippet is: No suitable code snippet found.
'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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_a...
The right code snippet is: No suitable code snippet found.
'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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop_unroll=none 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 counter(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<8> &count) { #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop_unroll=none The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: No suitable code snippet found.
'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 count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: counter = counter + 2; The right code snippet is: counter = counter + 1;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: counter = counter + 1;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: counter = counter + 2; 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 count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: counter = counter + 2; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: counter = counter + 1;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: int counter; The right code snippet is: static int counter = 0;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: static int 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: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: int 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: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: int counter; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static int 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: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: counter = counter << 2; The right code snippet is: counter = counter + 1;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: counter = counter + 1;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: counter = counter << 2; 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 count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: counter = counter << 2; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: counter = counter + 1;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bun...
The wrong part of the code is: } else { counter = counter + 1; if (signal == true && signal_prev == false) { counter = counter - 1; } } The right code snippet is: } else { counter = counter + 1; if (signal == true && signal_prev == false) { counter = 0; } }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=clk bundle=C...
The right code snippet is: } else { counter = counter + 1; if (signal == true && signal_prev == false) { counter = 0; } }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite p...
The wrong part of the code is: } else { counter = counter + 1; if (signal == true && signal_prev == false) { counter = counter - 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 count_signal( bool clk, bool signal, int period, int& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: } else { counter = counter + 1; if (signal == true && signal_prev == false) { counter = counter - 1; } } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: } else { counter = counter + 1; if (signal == true &...
'INF'