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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: ap_uint<4> A_reg, B_reg, sum_reg; bool carry_in_reg, carry_out_reg; sum_reg = sum_reg + 1; The right code snippet is: ap_uint<4> A_reg, B_reg, sum_reg; bool carry_in_reg, carry_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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
The right code snippet is: ap_uint<4> A_reg, B_reg, sum_reg; bool carry_in_reg, carry_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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: ap_uint<4> A_reg, B_reg, sum_reg; bool carry_in_reg, carry_out_reg; sum_reg = sum_reg + 1; 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: ap_uint<4> A_reg, B_reg, sum_reg; bool carry_in_reg, carry_out_reg; sum_reg = sum_reg + 1; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<4> A_reg, B_reg, sum_reg; bool carry_in_reg, carry_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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: carry_in_reg = sub ? ~B_reg[5] : 1'b0; The right code snippet is: carry_in_reg = sub ? ~B_reg[0] : 1'b0;
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
The right code snippet is: carry_in_reg = sub ? ~B_reg[0] : 1'b0;
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: carry_in_reg = sub ? ~B_reg[5] : 1'b0; 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: carry_in_reg = sub ? ~B_reg[5] : 1'b0; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: carry_in_reg = sub ? ~B_reg[0] : 1'b0;
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: for (int i = 0; ; i++) { The right code snippet is: for (int i = 0; i < 4; i++) {
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
The right code snippet is: for (int i = 0; i < 4; 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: #include <ap_int.h> void ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: for (int i = 0; ; i++) { 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: for (int i = 0; ; i++) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 4; i++) {
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: sum_reg = sum_reg + (sub ? B_reg + 1 : B_reg) + (sub ? A_reg + 1 : A_reg); The right code snippet is: sum_reg = sum_reg + (sub ? ~B_reg + 1 : B_reg) + (sub ? ~A_reg + 1 : A_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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
The right code snippet is: sum_reg = sum_reg + (sub ? ~B_reg + 1 : B_reg) + (sub ? ~A_reg + 1 : A_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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: sum_reg = sum_reg + (sub ? B_reg + 1 : B_reg) + (sub ? A_reg + 1 : A_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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: sum_reg = sum_reg + (sub ? B_reg + 1 : B_reg) + (sub ? A_reg + 1 : A_reg); The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: sum_reg = sum_reg + (sub ? ~B_reg + 1 : B_reg) + (sub ? ~A_reg + 1 : A_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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: #pragma HLS INTERFACE axis register both port=A #pragma HLS INTERFACE axis register both port=B #pragma HLS INTERFACE axis register both port=carry_out The right code snippet is: #pragma HLS INTERFACE axis register both port=A #pragma HLS INTERFACE axis regist...
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
The right code snippet is: #pragma HLS INTERFACE axis register both port=A #pragma HLS INTERFACE axis register both port=B #pragma HLS INTERFACE axis register both port=sum
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: #pragma HLS INTERFACE axis register both port=A #pragma HLS INTERFACE axis register both port=B #pragma HLS INTERFACE axis register both port=carry_out 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: #pragma HLS INTERFACE axis register both port=A #pragma HLS INTERFACE axis register both port=B #pragma HLS INTERFACE axis register both port=carry_out The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: #pragma HLS INTERFACE axi...
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: #pragma HLS array_partition variable=A block factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: #pragma HLS array_partition variable=A block factor=2 dim=2 The high-level-synthesis bug type of the code is: 'APT'
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: #pragma HLS array_partition variable=A block factor=2 dim=2 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=3 dim=1 The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=3 dim=1 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=2 dim=2 The high-level-synthesis bug type of the code is: 'DID'
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=2 dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: #pragma HLS dataflow region The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: #pragma HLS dataflow region The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: #pragma HLS dataflow region The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: #pragma HLS INTERFACE axis register both port=A bundle=wrong_bundle The right code snippet is: #pragma HLS INTERFACE axis register both port=A
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
The right code snippet is: #pragma HLS INTERFACE axis register both port=A
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: #pragma HLS INTERFACE axis register both port=A bundle=wrong_bundle 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: #pragma HLS INTERFACE axis register both port=A bundle=wrong_bundle The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS INTERFACE axis register both port=A
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A offset=slave bundle=wrong_bundle The right code snippet is: #pragma HLS INTERFACE m_axi port=A offset=slave bundle=gmem
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
The right code snippet is: #pragma HLS INTERFACE m_axi port=A offset=slave bundle=gmem
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A offset=slave bundle=wrong_bundle 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A offset=slave bundle=wrong_bundle The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS INTERFACE m_axi port=A offset=slave bundle=gmem
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: #pragma HLS INTERFACE bram port=A The right code snippet is: #pragma HLS INTERFACE axis register both port=A
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
The right code snippet is: #pragma HLS INTERFACE axis register both port=A
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: #pragma HLS INTERFACE bram port=A 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: #pragma HLS INTERFACE bram port=A The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS INTERFACE axis register both port=A
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=sum The right code snippet is: #pragma HLS INTERFACE axis register both port=sum
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
The right code snippet is: #pragma HLS INTERFACE axis register both port=sum
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=sum 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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=sum The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS INTERFACE axis register both port=sum
'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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ct...
The wrong part of the code is: for (int i = 0; i < 4; i+=2) { The right code snippet is: for (int i = 0; i < 4; i++) {
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTERFACE ap_ctrl_no...
The right code snippet is: for (int i = 0; i < 4; i++) {
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, bool& carry_out ) { #pragma HLS INTE...
The wrong part of the code is: for (int i = 0; i < 4; i+=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 ripple_carry_adder_subtractor ( ap_uint<4> A, ap_uint<4> B, bool sub, ap_uint<4>& sum, boo...
The wrong part of the code is: for (int i = 0; i < 4; i+=2) { The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: for (int i = 0; i < 4; i++) {
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = fals...
The wrong part of the code is: res = a[b]; The right code snippet is: res = a * b;
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = false; ...
The right code snippet is: res = a * b;
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool...
The wrong part of the code is: res = a[b]; 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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { stati...
The wrong part of the code is: res = a[b]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: res = a * b;
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res; static bool val = false; ...
The wrong part of the code is: static ap_uint<8> res; The right code snippet is: static ap_uint<8> res = 0;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res; static bool val = false; if...
The right code snippet is: static ap_uint<8> res = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res; static bool val...
The wrong part of the code is: static ap_uint<8> res; 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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { stati...
The wrong part of the code is: static ap_uint<8> res; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<8> res = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = fals...
The wrong part of the code is: res = a >> b; The right code snippet is: res = a / b;
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = false; ...
The right code snippet is: res = a / b;
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool...
The wrong part of the code is: res = a >> b; 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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { stati...
The wrong part of the code is: res = a >> b; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: res = a / b;
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = fals...
The wrong part of the code is: default: { val = true; break; } The right code snippet is: default: { val = false; break; }
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = false; ...
The right code snippet is: default: { val = false; break; }
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool...
The wrong part of the code is: default: { val = true; break; } 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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { stati...
The wrong part of the code is: default: { val = true; break; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: default: { val = false; break; }
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = fals...
The wrong part of the code is: res = (ap_uint<8>)((ap_int<8>)a + (ap_int<8>)b); The right code snippet is: res = a + b;
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = false; ...
The right code snippet is: res = a + b;
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool...
The wrong part of the code is: res = (ap_uint<8>)((ap_int<8>)a + (ap_int<8>)b); 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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { stati...
The wrong part of the code is: res = (ap_uint<8>)((ap_int<8>)a + (ap_int<8>)b); The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: res = a + b;
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = fals...
The wrong part of the code is: switch(op) { case 0: { res = a + b; val = true; break; } case 1: { res = a - b; val = true; break; } case 2: { res = a * b; res = res + a * b; val = true; break; } case 3: ...
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = false; ...
The right code snippet is: switch(op) { case 0: { res = a + b; val = true; break; } case 1: { res = a - b; val = true; break; } case 2: { res = a * b; val = true; break; } case 3: { res = a / b; ...
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool...
The wrong part of the code is: switch(op) { case 0: { res = a + b; val = true; break; } case 1: { res = a - b; val = true; break; } case 2: { res = a * b; res = res + a * b; val = true; break; } case 3: ...
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { stati...
The wrong part of the code is: switch(op) { case 0: { res = a + b; val = true; break; } case 1: { res = a - b; val = true; break; } case 2: { res = a * b; res = res + a * b; val = true; break; } case 3: ...
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 1; static bool val = fals...
The wrong part of the code is: static ap_uint<8> res = 1; The right code snippet is: static ap_uint<8> res = 0;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 1; static bool val = false; ...
The right code snippet is: static ap_uint<8> res = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 1; static bool...
The wrong part of the code is: static ap_uint<8> res = 1; 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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { stati...
The wrong part of the code is: static ap_uint<8> res = 1; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static ap_uint<8> res = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result_half_1, bool& valid) { static ap_uint<8> res = 0; static bool val...
The wrong part of the code is: void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result_half_1, bool& valid) { The right code snippet is: void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) {
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result_half_1, bool& valid) { static ap_uint<8> res = 0; static bool val = fa...
The right code snippet is: void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) {
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result_half_1, bool& valid) { static ap_uint<8> res = 0; stat...
The wrong part of the code is: void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result_half_1, bool& valid) { 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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result_half_1, bool& valid) { ...
The wrong part of the code is: void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result_half_1, bool& valid) { The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, a...
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = fals...
The wrong part of the code is: #pragma HLS array_partition variable=res cyclic dim=0 The right code snippet is: #pragma HLS array_partition variable=res complete dim=0
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = false; ...
The right code snippet is: #pragma HLS array_partition variable=res complete dim=0
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool...
The wrong part of the code is: #pragma HLS array_partition variable=res cyclic dim=0 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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { stati...
The wrong part of the code is: #pragma HLS array_partition variable=res cyclic dim=0 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=res complete dim=0
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = fals...
The wrong part of the code is: #pragma HLS array_partition variable=res complete dim=1 The right code snippet is: #pragma HLS array_partition variable=res complete dim=0
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool val = false; ...
The right code snippet is: #pragma HLS array_partition variable=res complete dim=0
'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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { static ap_uint<8> res = 0; static bool...
The wrong part of the code is: #pragma HLS array_partition variable=res complete dim=1 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 calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { stati...
The wrong part of the code is: #pragma HLS array_partition variable=res complete dim=1 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=res complete dim=0
'FND'