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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The wrong part of the code is: ap_uint<32> mult_out; multiplier(a, b+1, mult_out); The right code snippet is: ap_uint<32> mult_out; multiplier(a, b, mult_out);
'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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The right code snippet is: ap_uint<32> mult_out; multiplier(a, b, mult_out);
'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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 1...
The wrong part of the code is: ap_uint<32> mult_out; multiplier(a, b+1, mult_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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shi...
The wrong part of the code is: ap_uint<32> mult_out; multiplier(a, b+1, mult_out); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: ap_uint<32> mult_out; multiplier(a, b, mult_out);
'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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
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
'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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 1...
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: '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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shi...
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: '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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=a cyclic factor=4 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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 1...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=a cyclic factor=4 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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shi...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=a cyclic factor=4 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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 1...
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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shi...
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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 1...
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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shi...
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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=a The right code snippet is: #pragma HLS INTERFACE ap_none 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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The right code snippet is: #pragma HLS INTERFACE ap_none 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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 1...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=a 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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shi...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=a The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS INTERFACE ap_none 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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=a offset=random The right code snippet is: #pragma HLS INTERFACE m_axi port=a offset=slave
'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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The right code snippet is: #pragma HLS INTERFACE m_axi port=a offset=slave
'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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 1...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=a offset=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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shi...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=a offset=random 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
'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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The wrong part of the code is: #pragma HLS INTERFACE bram port=a The right code snippet is: #pragma HLS INTERFACE ap_none 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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The right code snippet is: #pragma HLS INTERFACE ap_none 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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 1...
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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shi...
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 ap_none 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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The wrong part of the code is: #pragma HLS INTERFACE axis port=out The right code snippet is: #pragma HLS INTERFACE ap_none port=out
'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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The right code snippet is: #pragma HLS INTERFACE ap_none port=out
'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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 1...
The wrong part of the code is: #pragma HLS INTERFACE axis 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: ``` #include <ap_int.h> void multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shi...
The wrong part of the code is: #pragma HLS INTERFACE axis port=out The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS INTERFACE ap_none port=out
'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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline II=1
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The right code snippet is: #pragma HLS pipeline II=1
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 1...
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 multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shi...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: #pragma HLS pipeline II=1
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The wrong part of the code is: #pragma HLS unroll factor=2 The right code snippet is: #pragma HLS unroll
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 16; i++) { ...
The right code snippet is: #pragma HLS unroll
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shift_reg = b; for (int i = 0; i < 1...
The wrong part of the code is: #pragma HLS unroll factor=2 The high-level-synthesis bug type of the code is: 'ILNU'
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void multiplier(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &out) { ap_uint<32> temp = 0; ap_uint<16> shi...
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 counter_async_reset( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return a...
The wrong part of the code is: ap_uint<4> count_reg; Bug_type: 'SHFT' The right code snippet is: ap_uint<4> count_reg = 0;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter_async_reset( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE ap_ctrl_none port=return ap_uin...
The right code snippet is: ap_uint<4> count_reg = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void counter_async_reset( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<4>>& count ) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: ap_uint<4> count_reg; Bug_type: 'SHFT' 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 counter_async_reset( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<4>>& count ) { #prag...
The wrong part of the code is: ap_uint<4> count_reg; Bug_type: 'SHFT' The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<4> count_reg = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out...
The wrong part of the code is: nand_gate(A[2], B[2], nand_out[2]); The right code snippet is: nand_gate(A[0], B[0], nand_out[0]);
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out[2]; ...
The right code snippet is: nand_gate(A[0], B[0], nand_out[0]);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bo...
The wrong part of the code is: nand_gate(A[2], B[2], nand_out[2]); The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bo...
The wrong part of the code is: nand_gate(A[2], B[2], nand_out[2]); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: nand_gate(A[0], B[0], nand_out[0]);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out...
The wrong part of the code is: bool nand_out[2] = {true}; The right code snippet is: bool nand_out[2];
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out[2] =...
The right code snippet is: bool nand_out[2];
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bo...
The wrong part of the code is: bool nand_out[2] = {true}; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bo...
The wrong part of the code is: bool nand_out[2] = {true}; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: bool nand_out[2];
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out...
The wrong part of the code is: nand_gate(A[1], B[3], nand_out[1]>>2); The right code snippet is: nand_gate(A[1], B[1], nand_out[1]);
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out[2]; ...
The right code snippet is: nand_gate(A[1], B[1], nand_out[1]);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bo...
The wrong part of the code is: nand_gate(A[1], B[3], nand_out[1]>>2); The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bo...
The wrong part of the code is: nand_gate(A[1], B[3], nand_out[1]>>2); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: nand_gate(A[1], B[1], nand_out[1]);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out...
The wrong part of the code is: for(int i=0; i>=0; i++) { The right code snippet is: for(int i=0; i<10; 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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out[2]; ...
The right code snippet is: for(int i=0; i<10; 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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bo...
The wrong part of the code is: for(int i=0; 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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bo...
The wrong part of the code is: for(int i=0; i>=0; i++) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for(int i=0; i<10; 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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { int nand_out[...
The wrong part of the code is: int nand_out[2]; The right code snippet is: bool nand_out[2];
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { int nand_out[2]; ...
The right code snippet is: bool nand_out[2];
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { in...
The wrong part of the code is: int nand_out[2]; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bo...
The wrong part of the code is: int nand_out[2]; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: bool nand_out[2];
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out...
The wrong part of the code is: nand_gate(A[0], B[0], nand_out[0]); nand_gate(A[1], B[1], nand_out[1]); nand_gate(A[2], B[2], nand_out[2]); nand_gate(A[3], B[3], nand_out[3]); nand_gate(A[4], B[4], nand_out[4]); The right code snippet is: for(int i=0; i<10; i++) { nand_gate(A[i], B[i], nand_out[i]); }
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out[2]; ...
The right code snippet is: for(int i=0; i<10; i++) { nand_gate(A[i], B[i], nand_out[i]); }
'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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bo...
The wrong part of the code is: nand_gate(A[0], B[0], nand_out[0]); nand_gate(A[1], B[1], nand_out[1]); nand_gate(A[2], B[2], nand_out[2]); nand_gate(A[3], B[3], nand_out[3]); nand_gate(A[4], B[4], nand_out[4]); 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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bo...
The wrong part of the code is: nand_gate(A[0], B[0], nand_out[0]); nand_gate(A[1], B[1], nand_out[1]); nand_gate(A[2], B[2], nand_out[2]); nand_gate(A[3], B[3], nand_out[3]); nand_gate(A[4], B[4], nand_out[4]); The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for(i...
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out...
The wrong part of the code is: bool nand_out[2] = {0}; The right code snippet is: bool nand_out[2] = {false};
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out[2]; ...
The right code snippet is: bool nand_out[2] = {false};
'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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bo...
The wrong part of the code is: bool nand_out[2] = {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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bo...
The wrong part of the code is: bool nand_out[2] = {0}; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: bool nand_out[2] = {false};
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out...
The wrong part of the code is: memcpy(A, B+2, sizeof(A)); The right code snippet is: memcpy(A, B, sizeof(A));
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out[2]; ...
The right code snippet is: memcpy(A, B, sizeof(A));
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bo...
The wrong part of the code is: memcpy(A, B+2, sizeof(A)); The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bo...
The wrong part of the code is: memcpy(A, B+2, sizeof(A)); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memcpy(A, B, sizeof(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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=nand_out cyclic dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=nand_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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out[2]; ...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=nand_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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bo...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=nand_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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bo...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=nand_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=nand_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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=nand_out complete dim=2 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=nand_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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out[2]; ...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=nand_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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bo...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=nand_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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bo...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=nand_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=nand_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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=nand_out cyclic dim=2 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=nand_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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out[2]; ...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=nand_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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bo...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=nand_out cyclic 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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bo...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=nand_out cyclic dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=nand_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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out...
The wrong part of the code is: #pragma HLS DATAFLOW flatten The right code snippet is: #pragma HLS DATAFLOW
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out[2]; ...
The right code snippet is: #pragma HLS DATAFLOW
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bo...
The wrong part of the code is: #pragma HLS DATAFLOW flatten The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bo...
The wrong part of the code is: #pragma HLS DATAFLOW flatten The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: #pragma HLS DATAFLOW
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_vld port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out[...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=A The right code snippet is: #pragma HLS INTERFACE ap_none port=A
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_vld port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { bool nand_out[2]; ...
The right code snippet is: #pragma HLS INTERFACE ap_none 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: #pragma HLS INTERFACE ap_vld port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(bool A[2], bool B[2], bool &out) { boo...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=A The high-level-synthesis bug type of the code is: 'IDAP'
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_vld port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=out void comparator2bit(boo...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=A The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS INTERFACE ap_none port=A
'IDAP'