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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CT...
The wrong part of the code is: case 0b01: out = in.range(1,0); break; The right code snippet is: case 0b01: out = 0b0010; break;
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU...
The right code snippet is: case 0b01: out = 0b0010; break;
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enabl...
The wrong part of the code is: case 0b01: out = in.range(1,0); break; The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: case 0b01: out = in.range(1,0); break; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: case 0b01: out = 0b0010; break;
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CT...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic factor=3 The right code snippet is: None
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU...
The right code snippet is: None
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enabl...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic factor=3 The high-level-synthesis bug type of the code is: 'APT'
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic factor=3 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: None
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CT...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic factor=5 The right code snippet is: None
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU...
The right code snippet is: None
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enabl...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic factor=5 The high-level-synthesis bug type of the code is: 'FND'
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic factor=5 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: None
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CT...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic dim=2 factor=2 The right code snippet is: None
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU...
The right code snippet is: None
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enabl...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic dim=2 factor=2 The high-level-synthesis bug type of the code is: 'DID'
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic dim=2 factor=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: None
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CT...
The wrong part of the code is: #pragma HLS dataflow The right code snippet is: None
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU...
The right code snippet is: None
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enabl...
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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS dataflow The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: None
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CT...
The wrong part of the code is: #pragma HLS interface ap_stable port=out The right code snippet is: None
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU...
The right code snippet is: None
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enabl...
The wrong part of the code is: #pragma HLS interface ap_stable port=out The high-level-synthesis bug type of the code is: 'IDAP'
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS interface ap_stable port=out The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: None
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CT...
The wrong part of the code is: #pragma HLS interface m_axi depth=512 port=out offset=direct The right code snippet is: None
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU...
The right code snippet is: None
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enabl...
The wrong part of the code is: #pragma HLS interface m_axi depth=512 port=out offset=direct 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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS interface m_axi depth=512 port=out offset=direct The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: None
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CT...
The wrong part of the code is: #pragma HLS interface s_axilite port=out bundle=CTRL_BUS The right code snippet is: None
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU...
The right code snippet is: None
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enabl...
The wrong part of the code is: #pragma HLS interface s_axilite port=out bundle=CTRL_BUS 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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS interface s_axilite port=out bundle=CTRL_BUS The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: None
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CT...
The wrong part of the code is: #pragma HLS interface ap_vld port=out 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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU...
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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enabl...
The wrong part of the code is: #pragma HLS interface ap_vld port=out 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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS interface ap_vld port=out 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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CT...
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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU...
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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enabl...
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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CT...
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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU...
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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=enabl...
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: ``` void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: LED = P_Data.range(20, 5); The right code snippet is: LED = P_Data.range(15, 0);
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: LED = P_Data.range(15, 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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: LED = P_Data.range(20, 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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: LED = P_Data.range(20, 5); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: LED = P_Data.range(15, 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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: static ap_uint<16> LED; The right code snippet is: static ap_uint<16> LED = 0x2A;
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: static ap_uint<16> LED = 0x2A;
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: static ap_uint<16> LED; 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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: static ap_uint<16> LED; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<16> LED = 0x2A;
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: counter_set = P_Data.range(34, 16); The right code snippet is: counter_set = P_Data.range(17, 16);
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: counter_set = P_Data.range(17, 16);
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: counter_set = P_Data.range(34, 16); The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: counter_set = P_Data.range(34, 16); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: counter_set = P_Data.range(17, 16);
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: int GPIOf0 = P_Data.range(13, 0); The right code snippet is: GPIOf0 = P_Data.range(13, 0);
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: GPIOf0 = P_Data.range(13, 0);
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: int GPIOf0 = P_Data.range(13, 0); 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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: int GPIOf0 = P_Data.range(13, 0); The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: GPIOf0 = P_Data.range(13, 0);
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: // Manual loop unrolling for (int i = 0; i < 10; i++) { // some code // some code } The right code snippet is: // Manual loop unrolling for (int i = 0; i < 10; i += 2) { // some code // some code }
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: // Manual loop unrolling for (int i = 0; i < 10; i += 2) { // some code // some code }
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: // Manual loop unrolling for (int i = 0; i < 10; i++) { // some code // some code } 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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: // Manual loop unrolling for (int i = 0; i < 10; i++) { // some code // some code } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: // Manual loop unrolling for (int i = 0; i < 10; i += 2) { // some code // some code ...
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: bool rst = 0; The right code snippet is: bool rst;
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: bool rst;
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: bool rst = 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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: bool rst = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: bool rst;
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: // some code memcpy(dest + size, src, size); // some code The right code snippet is: // some code memcpy(dest, src, size); // some code
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: // some code memcpy(dest, src, size); // some code
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: // some code memcpy(dest + size, src, size); // some code 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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: // some code memcpy(dest + size, src, size); // some code The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: // some code memcpy(dest, src, size); // some code
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: #pragma HLS array_partition variable=LED_out cyclic dim=1 The right code snippet is: #pragma HLS array_partition variable=LED_out complete dim=1
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: #pragma HLS array_partition variable=LED_out complete dim=1
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: #pragma HLS array_partition variable=LED_out cyclic dim=1 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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: #pragma HLS array_partition variable=LED_out cyclic dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=LED_out complete dim=1
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: #pragma HLS array_partition variable=LED_out complete dim=2 The right code snippet is: #pragma HLS array_partition variable=LED_out complete dim=1
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: #pragma HLS array_partition variable=LED_out complete dim=1
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: #pragma HLS array_partition variable=LED_out complete dim=2 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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: #pragma HLS array_partition variable=LED_out complete dim=2 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=LED_out complete dim=1
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: #pragma HLS array_partition variable=LED_out complete dim=3 The right code snippet is: #pragma HLS array_partition variable=LED_out complete dim=1
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: #pragma HLS array_partition variable=LED_out complete dim=1
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: #pragma HLS array_partition variable=LED_out complete dim=3 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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: #pragma HLS array_partition variable=LED_out complete dim=3 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=LED_out complete dim=1
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: #pragma HLS dataflow pipeline 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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: #pragma HLS dataflow pipeline 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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: #pragma HLS dataflow pipeline 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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: #pragma HLS interface ap_vld port=LED_out The right code snippet is: #pragma HLS interface ap_none port=LED_out
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: #pragma HLS interface ap_none port=LED_out
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: #pragma HLS interface ap_vld port=LED_out 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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: #pragma HLS interface ap_vld port=LED_out The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_none port=LED_out
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: #pragma HLS interface m_axi port=P_Data random The right code snippet is: #pragma HLS interface m_axi port=P_Data
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: #pragma HLS interface m_axi port=P_Data
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: #pragma HLS interface m_axi port=P_Data 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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: #pragma HLS interface m_axi port=P_Data random The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=P_Data
'RAMB'