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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sel #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: #pragma HLS UNROLL factor=2 for (int i = 1; i < 4; i++) { The right code snippet is: for (int i = 1; i < 4; i++) {
ILNU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sel #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none port=ca...
The right code snippet is: for (int i = 1; i < 4; i++) {
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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sel #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS UNROLL factor=2 for (int i = 1; i < 4; i++) { 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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sel #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS UNROLL factor=2 for (int i = 1; i < 4; i++) { The high-level-synthesis bug type of the code is: ILNU The right code snippet is: for (int i = 1; i < 4; i++) {
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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: count_reg = count_reg + 10; The right code snippet is: count_reg = count_reg + 5;
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: count_reg = count_reg + 5;
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
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 + 5;
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
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;
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: static ap_uint<4> 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: static ap_uint<4> 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: static ap_uint<4> count_reg; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<4> 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: count_reg = count_reg >> 5; The right code snippet is: count_reg = count_reg >> 2;
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: count_reg = count_reg >> 2;
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: count_reg = count_reg >> 5; 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: count_reg = count_reg >> 5; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: count_reg = count_reg >> 2;
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: while (count_reg < 10) { count_reg++; } The right code snippet is: while (1) { count_reg++; }
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: while (1) { count_reg++; }
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: while (count_reg < 10) { count_reg++; } 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: while (count_reg < 10) { count_reg++; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: while (1) { count_reg++; }
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: unsigned char temp = 255; count_reg = temp; The right code snippet is: ap_int<4> temp = -1; count_reg = temp;
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: ap_int<4> temp = -1; count_reg = temp;
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: unsigned char temp = 255; count_reg = temp; 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: unsigned char temp = 255; count_reg = temp; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_int<4> temp = -1; count_reg = temp;
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: count_reg++; count_reg++; count_reg++; count_reg++; The right code snippet is: for (int i = 0; i < 4; i++) { count_reg++; }
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: for (int i = 0; i < 4; i++) { count_reg++; }
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: count_reg++; count_reg++; count_reg++; count_reg++; 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: count_reg++; count_reg++; count_reg++; count_reg++; The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 4; i++) { count_reg++; }
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
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_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
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_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
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_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
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_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: memcpy(buffer1, buffer2 + 4, sizeof(buffer1)); The right code snippet is: memcpy(buffer1, buffer2, sizeof(buffer1));
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: memcpy(buffer1, buffer2, sizeof(buffer1));
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: memcpy(buffer1, buffer2 + 4, sizeof(buffer1)); 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: memcpy(buffer1, buffer2 + 4, sizeof(buffer1)); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memcpy(buffer1, buffer2, sizeof(buffer1));
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: #pragma HLS array_partition variable=count block factor=2 The right code snippet is: #pragma HLS array_partition variable=count 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 counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: #pragma HLS array_partition variable=count 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 counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS array_partition variable=count block factor=2 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: #pragma HLS array_partition variable=count block factor=2 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=count 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 counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: #pragma HLS array_partition variable=count cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=count complete
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: #pragma HLS array_partition variable=count complete
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS array_partition variable=count cyclic 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: #pragma HLS array_partition variable=count cyclic factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=count complete
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: #pragma HLS array_partition variable=count cyclic factor=5 dim=1 The right code snippet is: #pragma HLS array_partition variable=count cyclic factor=4
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: #pragma HLS array_partition variable=count cyclic factor=4
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS array_partition variable=count cyclic factor=5 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: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: #pragma HLS array_partition variable=count cyclic factor=5 dim=1 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=count cyclic factor=4
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: #pragma HLS dataflow region The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS dataflow region 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: #pragma HLS dataflow region The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: #pragma HLS interface ap_fifo port=count The right code snippet is: #pragma HLS interface ap_none port=count
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: #pragma HLS interface ap_none port=count
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS interface ap_fifo 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: #pragma HLS interface ap_fifo port=count The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_none port=count
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: #pragma HLS interface m_axi depth=512 port=count The right code snippet is: #pragma HLS interface m_axi depth=1024 port=count
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: #pragma HLS interface m_axi depth=1024 port=count
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS interface m_axi depth=512 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: #pragma HLS interface m_axi depth=512 port=count The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi depth=1024 port=count
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: #pragma HLS interface ap_memory port=count The right code snippet is: #pragma HLS interface ap_none port=count
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: #pragma HLS interface ap_none port=count
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS interface ap_memory 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: #pragma HLS interface ap_memory port=count The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_none port=count
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: #pragma HLS interface ap_none depth=1024 port=count The right code snippet is: #pragma HLS interface ap_memory depth=1024 port=count
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: #pragma HLS interface ap_memory depth=1024 port=count
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS interface ap_none depth=1024 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: #pragma HLS interface ap_none depth=1024 port=count The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_memory depth=1024 port=count
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline II=1
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: #pragma HLS pipeline II=1
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: #pragma HLS pipeline II=1
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void counter_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The wrong part of the code is: #pragma HLS unroll factor=3 The right code snippet is: #pragma HLS unroll factor=4
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma H...
The right code snippet is: #pragma HLS unroll factor=4
'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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS unroll factor=3 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_4bit_sync_reset(ap_uint<1> clk, ap_uint<1> reset, ap_uint<1> enable, ap_uint<4> &count) { #pragma...
The wrong part of the code is: #pragma HLS unroll factor=3 The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: #pragma HLS unroll factor=4
'ILNU'
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: counter[5]++; The right code snippet is: counter++;
'OOB'
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: counter++;
'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: ```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: counter[5]++; 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: ```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: counter[5]++; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: counter++;
'OOB'
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: ap_uint<4> counter; The right code snippet is: static ap_uint<4> counter = 0;
'INIT'
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;
'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: ```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: ap_uint<4> 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: ```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: ap_uint<4> counter; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<4> 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: ```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: counter<<5; The right code snippet is: counter++;
'SHFT'
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: 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: ```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: counter<<5; 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: ```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: counter<<5; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: 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: ```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: while(counter<16) { counter++; } The right code snippet is: while(1) { counter++; }
'INF'
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: while(1) { counter++; }
'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: ```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: while(counter<16) { counter++; } 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: ```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: while(counter<16) { counter++; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: while(1) { counter++; }
'INF'
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: int8_t counter; counter++; The right code snippet is: counter++;
'USE'
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: counter++;
'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: ```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: int8_t counter; counter++; 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: ```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: int8_t counter; counter++; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: counter++;
'USE'
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: counter++; counter++; counter++; counter++; The right code snippet is: for(int i=0; i<4; i++) { counter++; }
'MLU'
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++; }
'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: ```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: counter++; counter++; counter++; counter++; 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: ```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: counter++; counter++; counter++; counter++; The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for(int i=0; i<4; i++) { counter++; }
'MLU'