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> void uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=c...
The wrong part of the code is: #pragma HLS INTERFACE axis port=baud_clk_tick The right code snippet is: #pragma HLS INTERFACE ap_none port=baud_clk_tick
'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 uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: #pragma HLS INTERFACE ap_none port=baud_clk_tick
'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 uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS INTERFACE axis port=baud_clk_tick 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 uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none po...
The wrong part of the code is: #pragma HLS INTERFACE axis port=baud_clk_tick The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS INTERFACE ap_none port=baud_clk_tick
'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 uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=c...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=q_cnt The right code snippet is: #pragma HLS INTERFACE ap_none port=q_cnt
'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 uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: #pragma HLS INTERFACE ap_none port=q_cnt
'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 uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=q_cnt 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 uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none po...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=q_cnt The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS INTERFACE ap_none port=q_cnt
'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 uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=c...
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 uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
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 uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS PIPELINE II=2 The high-level-synthesis bug type of the code is: 'MLP'
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none 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: #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 uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=c...
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 uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
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 uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS UNROLL factor=2 The high-level-synthesis bug type of the code is: 'ILNU'
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void uart_baud_clk( bool clk, bool reset, bool &baud_clk_tick ) { #pragma HLS INTERFACE ap_ctrl_none 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: #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: #include "ap_int.h" void top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint<8>& shift_...
The wrong part of the code is: combinational_module(nand_out_reg, nor_out_reg, xnor_out_reg, in + 51); The right code snippet is: combinational_module(nand_out_reg, nor_out_reg, xnor_out_reg, in);
'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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint<8>& shift_out, ...
The right code snippet is: combinational_module(nand_out_reg, nor_out_reg, xnor_out_reg, in);
'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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint...
The wrong part of the code is: combinational_module(nand_out_reg, nor_out_reg, xnor_out_reg, in + 51); 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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<5...
The wrong part of the code is: combinational_module(nand_out_reg, nor_out_reg, xnor_out_reg, in + 51); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: combinational_module(nand_out_reg, nor_out_reg, xnor_out_reg, in);
'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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint<8>& shift_...
The wrong part of the code is: ap_uint<8> shift_out_reg = 0; The right code snippet is: ap_uint<8> shift_out_reg;
'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_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint<8>& shift_out, ...
The right code snippet is: ap_uint<8> shift_out_reg;
'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_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint...
The wrong part of the code is: ap_uint<8> shift_out_reg = 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_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<5...
The wrong part of the code is: ap_uint<8> shift_out_reg = 0; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<8> shift_out_reg;
'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_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint<8>& shift_...
The wrong part of the code is: shift_module(shift_out_reg, clk, reset, data_in, shift_amount + 4); The right code snippet is: shift_module(shift_out_reg, clk, reset, data_in, shift_amount);
'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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint<8>& shift_out, ...
The right code snippet is: shift_module(shift_out_reg, clk, reset, data_in, shift_amount);
'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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint...
The wrong part of the code is: shift_module(shift_out_reg, clk, reset, data_in, shift_amount + 4); 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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<5...
The wrong part of the code is: shift_module(shift_out_reg, clk, reset, data_in, shift_amount + 4); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: shift_module(shift_out_reg, clk, reset, data_in, shift_amount);
'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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint<8>& shift_...
The wrong part of the code is: while (reset == 0) { if (select) { final_output = (nand_out_reg & nor_out_reg & xnor_out_reg); } else { final_output = shift_out_reg; } } The right code snippet is: if (reset) { final_output = 0; } else { if (select) { final_outpu...
'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_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint<8>& shift_out, ...
The right code snippet is: if (reset) { final_output = 0; } else { if (select) { final_output = (nand_out_reg & nor_out_reg & xnor_out_reg); } else { final_output = shift_out_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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint...
The wrong part of the code is: while (reset == 0) { if (select) { final_output = (nand_out_reg & nor_out_reg & xnor_out_reg); } else { final_output = shift_out_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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<5...
The wrong part of the code is: while (reset == 0) { if (select) { final_output = (nand_out_reg & nor_out_reg & xnor_out_reg); } else { final_output = shift_out_reg; } } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (reset) { fina...
'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_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint<8>& shift_...
The wrong part of the code is: ap_int<50> nand_out_reg; ap_int<50> nor_out_reg; ap_int<50> xnor_out_reg; The right code snippet is: ap_uint<50> nand_out_reg; ap_uint<50> nor_out_reg; ap_uint<50> xnor_out_reg;
'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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint<8>& shift_out, ...
The right code snippet is: ap_uint<50> nand_out_reg; ap_uint<50> nor_out_reg; ap_uint<50> xnor_out_reg;
'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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint...
The wrong part of the code is: ap_int<50> nand_out_reg; ap_int<50> nor_out_reg; ap_int<50> xnor_out_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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<5...
The wrong part of the code is: ap_int<50> nand_out_reg; ap_int<50> nor_out_reg; ap_int<50> xnor_out_reg; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<50> nand_out_reg; ap_uint<50> nor_out_reg; ap_uint<50> xnor_out_reg;
'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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint<8>& shift_...
The wrong part of the code is: ap_uint<1> select = 0; The right code snippet is: ap_uint<1> select;
'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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint<8>& shift_out, ...
The right code snippet is: ap_uint<1> select;
'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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<50> in, ap_uint<1> select, ap_uint...
The wrong part of the code is: ap_uint<1> select = 0; 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 top_module( ap_uint<1> clk, ap_uint<1> reset, ap_uint<8> data_in, ap_uint<3> shift_amount, ap_uint<5...
The wrong part of the code is: ap_uint<1> select = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_uint<1> select;
'ZERO'
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
The wrong part of the code is: ap_uint<8> byte0, byte1, byte2, byte3 = 0; The right code snippet is: ap_uint<8> byte0, byte1, byte2, byte3;
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
The right code snippet is: ap_uint<8> byte0, byte1, byte2, byte3;
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
The wrong part of the code is: ap_uint<8> byte0, byte1, byte2, byte3 = 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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
The wrong part of the code is: ap_uint<8> byte0, byte1, byte2, byte3 = 0; The high-level-synthesis bug type of the code is: INIT The right code snippet is: ap_uint<8> byte0, byte1, byte2, byte3;
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
The wrong part of the code is: byte0 = in(8,0); The right code snippet is: byte0 = in(7,0);
OOB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
The right code snippet is: byte0 = in(7,0);
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
The wrong part of the code is: byte0 = in(8,0); The high-level-synthesis bug type of the code is: OOB
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
The wrong part of the code is: byte0 = in(8,0); The high-level-synthesis bug type of the code is: OOB The right code snippet is: byte0 = in(7,0);
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
The wrong part of the code is: byte0 = in(9,0) << 2; The right code snippet is: byte0 = in(7,0);
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_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
The right code snippet is: byte0 = in(7,0);
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_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
The wrong part of the code is: byte0 = in(9,0) << 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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
The wrong part of the code is: byte0 = in(9,0) << 2; The high-level-synthesis bug type of the code is: SHFT The right code snippet is: byte0 = in(7,0);
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_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // some code } The right code snippet is: for (int i = 0; i < 10; i++) { // some code }
INF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
The right code snippet is: for (int i = 0; i < 10; i++) { // some code }
INF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // some code } 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_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // some code } 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 }
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_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
The wrong part of the code is: int& out; The right code snippet is: bool& out;
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_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
The right code snippet is: bool& out;
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_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
The wrong part of the code is: int& out; 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_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
The wrong part of the code is: int& out; The high-level-synthesis bug type of the code is: USE The right code snippet is: bool& out;
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_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
The wrong part of the code is: byte0 = in(15,8); The right code snippet is: byte0 = in(7,0);
BUF
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
The right code snippet is: byte0 = in(7,0);
BUF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
The wrong part of the code is: byte0 = in(15,8); 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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
The wrong part of the code is: byte0 = in(15,8); The high-level-synthesis bug type of the code is: BUF The right code snippet is: byte0 = in(7,0);
BUF
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
The wrong part of the code is: #pragma HLS array_partition variable=byte0 cyclic The right code snippet is: #pragma HLS array_partition variable=byte0 complete
APT
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
The right code snippet is: #pragma HLS array_partition variable=byte0 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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
The wrong part of the code is: #pragma HLS array_partition variable=byte0 cyclic 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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
The wrong part of the code is: #pragma HLS array_partition variable=byte0 cyclic The high-level-synthesis bug type of the code is: APT The right code snippet is: #pragma HLS array_partition variable=byte0 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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
The wrong part of the code is: #pragma HLS array_partition variable=byte0 cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=byte0 cyclic factor=2
FND
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
The right code snippet is: #pragma HLS array_partition variable=byte0 cyclic factor=2
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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
The wrong part of the code is: #pragma HLS array_partition variable=byte0 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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
The wrong part of the code is: #pragma HLS array_partition variable=byte0 cyclic factor=3 The high-level-synthesis bug type of the code is: FND The right code snippet is: #pragma HLS array_partition variable=byte0 cyclic factor=2
FND
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
The wrong part of the code is: #pragma HLS dataflow wait 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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
The wrong part of the code is: #pragma HLS dataflow wait 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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
The wrong part of the code is: #pragma HLS dataflow wait 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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
The wrong part of the code is: #pragma HLS interface ap_fifo port=in The right code snippet is: #pragma HLS interface ap_none port=in
IDAP
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
The right code snippet is: #pragma HLS interface ap_none port=in
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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
The wrong part of the code is: #pragma HLS interface ap_fifo port=in 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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
The wrong part of the code is: #pragma HLS interface ap_fifo port=in The high-level-synthesis bug type of the code is: IDAP The right code snippet is: #pragma HLS interface ap_none port=in
IDAP
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
The wrong part of the code is: #pragma HLS interface m_axi port=in random The right code snippet is: #pragma HLS interface m_axi port=in
RAMB
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
The right code snippet is: #pragma HLS interface m_axi port=in
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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
The wrong part of the code is: #pragma HLS interface m_axi port=in random The high-level-synthesis bug type of the code is: RAMB
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
The wrong part of the code is: #pragma HLS interface m_axi port=in random The high-level-synthesis bug type of the code is: RAMB The right code snippet is: #pragma HLS interface m_axi port=in
RAMB
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
The wrong part of the code is: #pragma HLS interface ap_memory port=in The right code snippet is: #pragma HLS interface ap_none port=in
SMA
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
The right code snippet is: #pragma HLS interface ap_none port=in
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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
The wrong part of the code is: #pragma HLS interface ap_memory port=in 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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
The wrong part of the code is: #pragma HLS interface ap_memory port=in The high-level-synthesis bug type of the code is: SMA The right code snippet is: #pragma HLS interface ap_none port=in
SMA
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
The wrong part of the code is: #pragma HLS interface axis port=in The right code snippet is: #pragma HLS interface ap_none port=in
AMS
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
The right code snippet is: #pragma HLS interface ap_none port=in
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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
The wrong part of the code is: #pragma HLS interface axis port=in 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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
The wrong part of the code is: #pragma HLS interface axis port=in The high-level-synthesis bug type of the code is: AMS The right code snippet is: #pragma HLS interface ap_none port=in
AMS
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=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byt...
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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0, byte1, byte2, b...
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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS PIPELINE II=1 ap_uint<8> byte0,...
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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void byte_reverse_xor(int in, bool& out) { #pragma HLS...
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