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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=S #pragma HLS INTERFACE ap_none port=Y void mux_2to1(bool A, bool B, bool ...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=S #pragma HLS INTERFACE ap_none port=Y void mux_2to1(bool A, bool B, bool S, bo...
The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=S #pragma HLS INTERFACE ap_none port=Y void mux_2to1(bool A, bo...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP'
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=S #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=S #pragma HLS INTERFACE ap_none port=Y void mux_2to1(bool A, bool B, bool ...
The wrong part of the code is: for(int i = 0; i < 10; i++) { #pragma HLS unroll_factor=2 // some code here } The right code snippet is: for(int i = 0; i < 10; i++) { #pragma HLS unroll // some code here }
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=S #pragma HLS INTERFACE ap_none port=Y void mux_2to1(bool A, bool B, bool S, bo...
The right code snippet is: for(int i = 0; i < 10; i++) { #pragma HLS unroll // some code here }
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=S #pragma HLS INTERFACE ap_none port=Y void mux_2to1(bool A, bo...
The wrong part of the code is: for(int i = 0; i < 10; i++) { #pragma HLS unroll_factor=2 // some code here } The high-level-synthesis bug type of the code is: 'ILNU'
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=S #pragma HLS INTERFACE ap_...
The wrong part of the code is: for(int i = 0; i < 10; i++) { #pragma HLS unroll_factor=2 // some code here } The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: for(int i = 0; i < 10; i++) { #pragma HLS unroll // some code here }
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: c[8] = g[6] | (p[6] & c[6]); The right code snippet is: c[7] = g[6] | (p[6] & c[6]);
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: c[7] = g[6] | (p[6] & c[6]);
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: c[8] = g[6] | (p[6] & c[6]); 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: c[8] = g[6] | (p[6] & c[6]); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: c[7] = g[6] | (p[6] & c[6]);
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c = 0; g = a & b; p = a ^ b; c[0] = ...
The wrong part of the code is: ap_uint<8> g, p, c = 0; The right code snippet is: ap_uint<8> g, p, c;
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c = 0; g = a & b; p = a ^ b; c[0] = 0; ...
The right code snippet is: ap_uint<8> g, p, c;
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c = 0; g = a & b; p = a ^ b; ...
The wrong part of the code is: ap_uint<8> g, p, c = 0; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: ap_uint<8> g, p, c = 0; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<8> g, p, c;
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: c[7] = g[-1] | (p[8] & c[6]); The right code snippet is: c[7] = g[6] | (p[6] & c[6]);
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: c[7] = g[6] | (p[6] & c[6]);
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: c[7] = g[-1] | (p[8] & c[6]); 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: c[7] = g[-1] | (p[8] & c[6]); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: c[7] = g[6] | (p[6] & c[6]);
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: while (overflow) { abs_diff = 0; } The right code snippet is: if (overflow) { abs_diff = 0; }
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: if (overflow) { abs_diff = 0; }
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: while (overflow) { abs_diff = 0; } 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: while (overflow) { abs_diff = 0; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (overflow) { abs_diff = 0; }
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: c[7] = (unsigned char) g[6] | (p[6] & c[6]); The right code snippet is: c[7] = g[6] | (p[6] & c[6]);
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: c[7] = g[6] | (p[6] & c[6]);
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: c[7] = (unsigned char) g[6] | (p[6] & c[6]); 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: c[7] = (unsigned char) g[6] | (p[6] & c[6]); The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: c[7] = g[6] | (p[6] & c[6]);
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: c[7] = g[6] | (p[6] & c[6]); c[8] = g[7] | (p[7] & c[7]); The right code snippet is: c[7] = g[6] | (p[6] & c[6]);
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: c[7] = g[6] | (p[6] & c[6]);
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: c[7] = g[6] | (p[6] & c[6]); c[8] = g[7] | (p[7] & c[7]); The high-level-synthesis bug type of the code is: 'MLU'
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: c[7] = g[6] | (p[6] & c[6]); c[8] = g[7] | (p[7] & c[7]); The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: c[7] = g[6] | (p[6] & c[6]);
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g = 0, p = 0, c = 0; g = a & b; p = a ^ b; ...
The wrong part of the code is: ap_uint<8> g = 0, p = 0, c = 0; The right code snippet is: ap_uint<8> g, p, c;
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g = 0, p = 0, c = 0; g = a & b; p = a ^ b; c[0]...
The right code snippet is: ap_uint<8> g, p, c;
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g = 0, p = 0, c = 0; g = a & b; p =...
The wrong part of the code is: ap_uint<8> g = 0, p = 0, c = 0; The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g = 0, ...
The wrong part of the code is: ap_uint<8> g = 0, p = 0, c = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_uint<8> g, p, c;
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: N/A (not applicable) The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: N/A (not applicable) 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: N/A (not applicable) The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: N/A (not applicable) The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: N/A (not applicable) 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: N/A (not applicable) The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: N/A (not applicable) The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: N/A (not applicable) 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: N/A (not applicable) The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: N/A (not applicable) The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: N/A (not applicable) 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: N/A (not applicable) The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: N/A (not applicable) The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: N/A (not applicable) 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: N/A (not applicable) The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: N/A (not applicable) The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: N/A (not applicable) 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: N/A (not applicable) The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: N/A (not applicable) The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: N/A (not applicable) 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: N/A (not applicable) The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: N/A (not applicable) The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: N/A (not applicable) 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: N/A (not applicable) The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: N/A (not applicable) The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: N/A (not applicable) 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: N/A (not applicable) The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: N/A (not applicable) The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: N/A (not applicable) 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: N/A (not applicable) The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; ...
The wrong part of the code is: N/A (not applicable) The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; c[0] = 0; c[...
The right code snippet is: N/A (not applicable)
'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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c; g = a & b; p = a ^ b; ...
The wrong part of the code is: N/A (not applicable) 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 carry_lookahead_adder(ap_uint<8> a, ap_uint<8> b, ap_uint<8> &s, bool &overflow) { ap_uint<8> g, p, c...
The wrong part of the code is: N/A (not applicable) The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: N/A (not applicable)
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: ap_uint<100> functional_out_uninit; out = functional_out_uninit; The right code snippet is: out = functional_out;
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: out = functional_out;
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: ap_uint<100> functional_out_uninit; out = functional_out_uninit; 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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: ap_uint<100> functional_out_uninit; out = functional_out_uninit; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: out = functional_out;
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: out = (in_1.range(4,0), in_1.range(199,105)) | (in_2.range(4,0), in_2.range(99,5)); The right code snippet is: out = (in_1.range(4,0), in_1.range(99,5)) | (in_2.range(4,0), in_2.range(99,5));
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: out = (in_1.range(4,0), in_1.range(99,5)) | (in_2.range(4,0), in_2.range(99,5));
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: out = (in_1.range(4,0), in_1.range(199,105)) | (in_2.range(4,0), in_2.range(99,5)); The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: out = (in_1.range(4,0), in_1.range(199,105)) | (in_2.range(4,0), in_2.range(99,5)); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: out = (in_1.range(4,0), in_1.range(99,5)) | (in_2.range(4,0), in_2.range(99,5));
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: out = (in_1.range(4,0), in_1.range(99,105)) | (in_2.range(4,0), in_2.range(99,5)) << 200; The right code snippet is: out = (in_1.range(4,0), in_1.range(99,5)) | (in_2.range(4,0), in_2.range(99,5));
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: out = (in_1.range(4,0), in_1.range(99,5)) | (in_2.range(4,0), in_2.range(99,5));
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: out = (in_1.range(4,0), in_1.range(99,105)) | (in_2.range(4,0), in_2.range(99,5)) << 200; 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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: out = (in_1.range(4,0), in_1.range(99,105)) | (in_2.range(4,0), in_2.range(99,5)) << 200; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: out = (in_1.range(4,0), in_1.range(99,5)) | (in_2.range(4,0), in_2.range(99,5));
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: while (select) { out = functional_out; } The right code snippet is: if (select) { out = functional_out; } else { out = buffer_out; }
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: if (select) { out = functional_out; } else { out = buffer_out; }
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: while (select) { out = functional_out; } 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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: while (select) { out = functional_out; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (select) { out = functional_out; } else { out = buffer_out; }
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: ap_int<100> functional_out_signed = functional_out; out = functional_out_signed; The right code snippet is: out = functional_out;
'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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: out = functional_out;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: ap_int<100> functional_out_signed = functional_out; out = functional_out_signed; 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 buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: ap_int<100> functional_out_signed = functional_out; out = functional_out_signed; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: out = functional_out;
'USE'