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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst, uint8_t num1, uint8_t num2, uint16_...
The wrong part of the code is: #pragma HLS interface bram port=num1 The right code snippet is: #pragma HLS interface axis port=num1
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst, uint8_t num1, uint8_t num2, uint16_t& pr...
The right code snippet is: #pragma HLS interface axis port=num1
'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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst, uint8_t num1, uint8_t num2, ...
The wrong part of the code is: #pragma HLS interface bram port=num1 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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst,...
The wrong part of the code is: #pragma HLS interface bram port=num1 The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface axis port=num1
'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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst, uint8_t num1, uint8_t num2, uint16_...
The wrong part of the code is: #pragma HLS interface ap_none port=product The right code snippet is: #pragma HLS interface axis port=num1
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst, uint8_t num1, uint8_t num2, uint16_t& pr...
The right code snippet is: #pragma HLS interface axis port=num1
'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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst, uint8_t num1, uint8_t num2, ...
The wrong part of the code is: #pragma HLS interface ap_none port=product 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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst,...
The wrong part of the code is: #pragma HLS interface ap_none port=product The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface axis port=num1
'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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst, uint8_t num1, uint8_t num2, uint16_...
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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst, uint8_t num1, uint8_t num2, uint16_t& pr...
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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst, uint8_t num1, uint8_t num2, ...
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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst,...
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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst, uint8_t num1, uint8_t num2, uint16_...
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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst, uint8_t num1, uint8_t num2, uint16_t& pr...
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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst, uint8_t num1, uint8_t num2, ...
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_fixed.h> typedef ap_uint<8> uint8_t; typedef ap_uint<16> uint16_t; void pipelined_multiplier( bool clk, bool rst,...
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: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: bool AND_output = IN1 & IN2 & IN3; The right code snippet is: bool AND_output = IN1 & IN2;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: bool AND_output = IN1 & IN2 & IN3; The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: bool AND_output = IN1 & IN2 & IN3; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: bool AND_output = IN1 & IN2;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: bool AND_output = IN1 & IN2; bool temp = AND_output; Q = temp & ~IN3; The right code snippet is: bool AND_output = IN1 & IN2;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: bool AND_output = IN1 & IN2; bool temp = AND_output; Q = temp & ~IN3; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: bool AND_output = IN1 & IN2; bool temp = AND_output; Q = temp & ~IN3; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: bool AND_output = IN1 & IN2;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: bool AND_output = IN1 << IN2; The right code snippet is: bool AND_output = IN1 & IN2;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: bool AND_output = IN1 << IN2; The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: bool AND_output = IN1 << IN2; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: bool AND_output = IN1 & IN2;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: bool AND_output = IN1 & IN2; while(1){ Q = AND_output & ~IN3; } The right code snippet is: bool AND_output = IN1 & IN2; Q = AND_output & ~IN3;
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2; Q = AND_output & ~IN3;
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: bool AND_output = IN1 & IN2; while(1){ Q = AND_output & ~IN3; } The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: bool AND_output = IN1 & IN2; while(1){ Q = AND_output & ~IN3; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: bool AND_output = IN1 & IN2; Q = AND_output & ~IN3;
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: bool AND_output = (int)IN1 & (int)IN2; The right code snippet is: bool AND_output = IN1 & IN2;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: bool AND_output = (int)IN1 & (int)IN2; 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: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: bool AND_output = (int)IN1 & (int)IN2; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: bool AND_output = IN1 & IN2;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: bool AND_output1 = IN1 & IN2; bool AND_output2 = IN1 & IN2; bool AND_output3 = IN1 & IN2; bool AND_output4 = IN1 & IN2; Q = AND_output1 & AND_output2 & AND_output3 & AND_output4; The right code snippet is: bool AND_output = IN1 & IN2;
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: bool AND_output1 = IN1 & IN2; bool AND_output2 = IN1 & IN2; bool AND_output3 = IN1 & IN2; bool AND_output4 = IN1 & IN2; Q = AND_output1 & AND_output2 & AND_output3 & AND_output4; 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: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: bool AND_output1 = IN1 & IN2; bool AND_output2 = IN1 & IN2; bool AND_output3 = IN1 & IN2; bool AND_output4 = IN1 & IN2; Q = AND_output1 & AND_output2 & AND_output3 & AND_output4; The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: bool A...
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: bool AND_output = 0; The right code snippet is: bool AND_output = IN1 & IN2;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: bool AND_output = 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: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: bool AND_output = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: bool AND_output = IN1 & IN2;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: bool AND_output = IN1 & IN3; The right code snippet is: bool AND_output = IN1 & IN2;
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: bool AND_output = IN1 & IN3; 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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: bool AND_output = IN1 & IN3; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: #pragma HLS array_partition variable=AND_output cyclic factor=3 dim=1 bool AND_output = IN1 & IN2; The right code snippet is: bool AND_output = IN1 & IN2;
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: #pragma HLS array_partition variable=AND_output cyclic factor=3 dim=1 bool AND_output = IN1 & IN2; 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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS array_partition variable=AND_output cyclic factor=3 dim=1 bool AND_output = IN1 & IN2; The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: #pragma HLS array_partition variable=AND_output cyclic factor=5 dim=1 bool AND_output = IN1 & IN2; The right code snippet is: bool AND_output = IN1 & IN2;
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: #pragma HLS array_partition variable=AND_output cyclic factor=5 dim=1 bool AND_output = IN1 & IN2; 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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS array_partition variable=AND_output cyclic factor=5 dim=1 bool AND_output = IN1 & IN2; The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: #pragma HLS array_partition variable=AND_output cyclic factor=3 dim=2 bool AND_output = IN1 & IN2; The right code snippet is: bool AND_output = IN1 & IN2;
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: #pragma HLS array_partition variable=AND_output cyclic factor=3 dim=2 bool AND_output = IN1 & IN2; 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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS array_partition variable=AND_output cyclic factor=3 dim=2 bool AND_output = IN1 & IN2; The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: #pragma HLS dataflow bool AND_output = IN1 & IN2; The right code snippet is: bool AND_output = IN1 & IN2;
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: #pragma HLS dataflow bool AND_output = IN1 & IN2; 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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS dataflow bool AND_output = IN1 & IN2; The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: #pragma HLS interface ap_none port=AND_output bool AND_output = IN1 & IN2; The right code snippet is: bool AND_output = IN1 & IN2;
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: #pragma HLS interface ap_none port=AND_output bool AND_output = IN1 & IN2; 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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS interface ap_none port=AND_output bool AND_output = IN1 & IN2; The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: #pragma HLS interface m_axi port=AND_output bool AND_output = IN1 & IN2; The right code snippet is: bool AND_output = IN1 & IN2;
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: #pragma HLS interface m_axi port=AND_output bool AND_output = IN1 & IN2; 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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS interface m_axi port=AND_output bool AND_output = IN1 & IN2; The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: #pragma HLS interface ap_memory port=AND_output bool AND_output = IN1 & IN2; The right code snippet is: bool AND_output = IN1 & IN2;
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: #pragma HLS interface ap_memory port=AND_output bool AND_output = IN1 & IN2; 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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS interface ap_memory port=AND_output bool AND_output = IN1 & IN2; The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: #pragma HLS interface ap_vld port=AND_output bool AND_output[1]; AND_output[0] = IN1 & IN2; The right code snippet is: bool AND_output = IN1 & IN2;
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: #pragma HLS interface ap_vld port=AND_output bool AND_output[1]; AND_output[0] = IN1 & IN2; 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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS interface ap_vld port=AND_output bool AND_output[1]; AND_output[0] = IN1 & IN2; The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: #pragma HLS pipeline II=2 bool AND_output = IN1 & IN2; The right code snippet is: bool AND_output = IN1 & IN2;
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: #pragma HLS pipeline II=2 bool AND_output = IN1 & IN2; 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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS pipeline II=2 bool AND_output = IN1 & IN2; The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis...
The wrong part of the code is: #pragma HLS unroll factor=2 bool AND_output = IN1 & IN2; The right code snippet is: bool AND_output = IN1 & IN2;
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INTERFACE axis port...
The right code snippet is: bool AND_output = IN1 & IN2;
'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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=IN1 #pragma HLS INT...
The wrong part of the code is: #pragma HLS unroll factor=2 bool AND_output = IN1 & IN2; 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 logic_module(bool IN1, bool IN2, bool IN3, bool &Q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS unroll factor=2 bool AND_output = IN1 & IN2; The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: bool AND_output = IN1 & IN2;
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_none port=cmd #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_n...
The wrong part of the code is: static ap_uint<8> cmd_reg = 0; // uninitialized variable is now initialized to 0 The right code snippet is: static ap_uint<8> cmd_reg;
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_none port=cmd #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none p...
The right code snippet is: static ap_uint<8> cmd_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: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_none port=cmd #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INT...
The wrong part of the code is: static ap_uint<8> cmd_reg = 0; // uninitialized variable is now initialized to 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_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_none port=cmd #pragma HLS INTERFACE...
The wrong part of the code is: static ap_uint<8> cmd_reg = 0; // uninitialized variable is now initialized to 0 The high-level-synthesis bug type of the code is: INIT The right code snippet is: static ap_uint<8> cmd_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: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_none port=cmd #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_n...
The wrong part of the code is: data_reg = data_reg << 9; // shift amount is out of bounds of the 8-bit data_reg The right code snippet is: data_reg = data_reg << 1;
OOB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_none port=cmd #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none p...
The right code snippet is: data_reg = data_reg << 1;
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_none port=cmd #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INT...
The wrong part of the code is: data_reg = data_reg << 9; // shift amount is out of bounds of the 8-bit data_reg The high-level-synthesis bug type of the code is: OOB
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_none port=cmd #pragma HLS INTERFACE...
The wrong part of the code is: data_reg = data_reg << 9; // shift amount is out of bounds of the 8-bit data_reg The high-level-synthesis bug type of the code is: OOB The right code snippet is: data_reg = data_reg << 1;
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_none port=cmd #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_n...
The wrong part of the code is: for (ap_uint<4> i = 0; i >= 0; i--) { // incorrect loop termination condition The right code snippet is: for (ap_uint<4> i = 0; i < WIDTH; i++) {
INF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_none port=cmd #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INTERFACE ap_none p...
The right code snippet is: for (ap_uint<4> i = 0; i < WIDTH; i++) {
INF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_none port=cmd #pragma HLS INTERFACE ap_none port=data_in #pragma HLS INT...
The wrong part of the code is: for (ap_uint<4> i = 0; i >= 0; i--) { // incorrect loop termination condition The high-level-synthesis bug type of the code is: INF
INF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=rst #pragma HLS INTERFACE ap_none port=cmd #pragma HLS INTERFACE...
The wrong part of the code is: for (ap_uint<4> i = 0; i >= 0; i--) { // incorrect loop termination condition The high-level-synthesis bug type of the code is: INF The right code snippet is: for (ap_uint<4> i = 0; i < WIDTH; i++) {
INF