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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: decoder_2to4(A, B, Y2_0, Y2_1, Y3_0, Y3_1); The right code snippet is: decoder_2to4(A, B, Y0_0, Y0_1, Y1_0, Y1_1);
'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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=Y1 #p...
The right code snippet is: decoder_2to4(A, B, Y0_0, Y0_1, Y1_0, Y1_1);
'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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap...
The wrong part of the code is: decoder_2to4(A, B, Y2_0, Y2_1, Y3_0, Y3_1); 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=C #pragma HLS INTERFACE ap_...
The wrong part of the code is: decoder_2to4(A, B, Y2_0, Y2_1, Y3_0, Y3_1); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: decoder_2to4(A, B, Y0_0, Y0_1, Y1_0, Y1_1);
'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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=Y0_0 cyclic dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=Y0_0 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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=Y1 #p...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=Y0_0 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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=Y0_0 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=C #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=Y0_0 cyclic dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=Y0_0 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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=Y0_0 complete factor=2 dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=Y0_0 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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=Y1 #p...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=Y0_0 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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=Y0_0 complete factor=2 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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=Y0_0 complete factor=2 dim=1 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=Y0_0 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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=Y0_0 complete dim=2 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=Y0_0 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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=Y1 #p...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=Y0_0 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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=Y0_0 complete 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=C #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=Y0_0 complete dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=Y0_0 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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS DATAFLOW off 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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=Y1 #p...
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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS DATAFLOW off 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=C #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS DATAFLOW off 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_fifo port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo 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_fifo port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=Y1 #p...
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_fifo port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo 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_fifo port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo 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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A random The right code snippet is: #pragma HLS INTERFACE m_axi port=A
'RAMB'
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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=Y1 #p...
The right code snippet is: #pragma HLS INTERFACE m_axi port=A
'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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A 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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A random The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS INTERFACE m_axi port=A
'RAMB'
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 bram port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=Y1 ...
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: #pragma HLS INTERFACE bram port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=Y1 #prag...
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: #pragma HLS INTERFACE bram port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_no...
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: #pragma HLS INTERFACE bram port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_non...
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: #pragma HLS INTERFACE ap_vld port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=Y...
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
'AMS'
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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=Y1 #pr...
The right code snippet is: #pragma HLS INTERFACE ap_none port=A
'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: #pragma HLS INTERFACE ap_vld port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=A 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: #pragma HLS INTERFACE ap_vld port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_n...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=A The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS INTERFACE ap_none port=A
'AMS'
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=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=...
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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=Y1 #p...
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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #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'
'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=C #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 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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS 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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap_none port=Y1 #p...
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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=C #pragma HLS INTERFACE ap_none port=Y0 #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS 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=C #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS 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 adder_4bit (int A[4], int B[4], int S[4], int &C) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=S ...
The wrong part of the code is: int sum; Bug_type: OOB The right code snippet is: int sum = A[0] + B[0];
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void adder_4bit (int A[4], int B[4], int S[4], int &C) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=S #p...
The right code snippet is: int sum = A[0] + B[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 adder_4bit (int A[4], int B[4], int S[4], int &C) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_no...
The wrong part of the code is: int sum; Bug_type: OOB 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 adder_4bit (int A[4], int B[4], int S[4], int &C) { #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none p...
The wrong part of the code is: int sum; Bug_type: OOB The high-level-synthesis bug type of the code is: INIT The right code snippet is: int sum = A[0] + B[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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: full_adder(A[-1], B[0], Cin, S_wire0, C_wire0); The right code snippet is: full_adder(A[0], B[0], Cin, S_wire0, C_wire0);
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
The right code snippet is: full_adder(A[0], B[0], Cin, S_wire0, C_wire0);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
The wrong part of the code is: full_adder(A[-1], B[0], Cin, S_wire0, C_wire0); The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
The wrong part of the code is: full_adder(A[-1], B[0], Cin, S_wire0, C_wire0); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: full_adder(A[0], B[0], Cin, S_wire0, C_wire0);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: ap_uint<1> C_wire0, C_wire1, C_wire2, C_wire3; The right code snippet is: ap_uint<1> C_wire0, C_wire1, C_wire2;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
The right code snippet is: ap_uint<1> C_wire0, C_wire1, C_wire2;
'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 four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
The wrong part of the code is: ap_uint<1> C_wire0, C_wire1, C_wire2, C_wire3; 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 four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
The wrong part of the code is: ap_uint<1> C_wire0, C_wire1, C_wire2, C_wire3; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<1> C_wire0, C_wire1, C_wire2;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: S = (S_wire3, S_wire2, S_wire1, S_wire0 << 5); The right code snippet is: S = (S_wire3, S_wire2, S_wire1, S_wire0);
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
The right code snippet is: S = (S_wire3, S_wire2, S_wire1, S_wire0);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
The wrong part of the code is: S = (S_wire3, S_wire2, S_wire1, S_wire0 << 5); The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
The wrong part of the code is: S = (S_wire3, S_wire2, S_wire1, S_wire0 << 5); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: S = (S_wire3, S_wire2, S_wire1, S_wire0);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // loop body } The right code snippet is: for (int i = 0; i < 10; i++) { // loop body }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
The right code snippet is: for (int i = 0; i < 10; i++) { // loop body }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // loop body } The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // loop body } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 10; i++) { // loop body }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: int8_t C_wire0, C_wire1, C_wire2; The right code snippet is: ap_uint<1> C_wire0, C_wire1, C_wire2;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
The right code snippet is: ap_uint<1> C_wire0, C_wire1, C_wire2;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
The wrong part of the code is: int8_t C_wire0, C_wire1, C_wire2; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
The wrong part of the code is: int8_t C_wire0, C_wire1, C_wire2; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<1> C_wire0, C_wire1, C_wire2;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: memcpy(dest_buffer + buffer_size/2, src_buffer, buffer_size); The right code snippet is: memcpy(dest_buffer, src_buffer, buffer_size);
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
The right code snippet is: memcpy(dest_buffer, src_buffer, buffer_size);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
The wrong part of the code is: memcpy(dest_buffer + buffer_size/2, src_buffer, buffer_size); The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
The wrong part of the code is: memcpy(dest_buffer + buffer_size/2, src_buffer, buffer_size); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memcpy(dest_buffer, src_buffer, buffer_size);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS array_partition variable=S cyclic The right code snippet is: #pragma HLS array_partition variable=S complete
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
The right code snippet is: #pragma HLS array_partition variable=S complete
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
The wrong part of the code is: #pragma HLS array_partition variable=S cyclic The high-level-synthesis bug type of the code is: 'APT'
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
The wrong part of the code is: #pragma HLS array_partition variable=S cyclic The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=S complete
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS array_partition variable=S factor=3 The right code snippet is: #pragma HLS array_partition variable=S complete
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
The right code snippet is: #pragma HLS array_partition variable=S complete
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
The wrong part of the code is: #pragma HLS array_partition variable=S factor=3 The high-level-synthesis bug type of the code is: 'FND'
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
The wrong part of the code is: #pragma HLS array_partition variable=S factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=S complete
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS array_partition variable=S dim=2 The right code snippet is: #pragma HLS array_partition variable=S complete
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
The right code snippet is: #pragma HLS array_partition variable=S complete
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
The wrong part of the code is: #pragma HLS array_partition variable=S 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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
The wrong part of the code is: #pragma HLS array_partition variable=S dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=S complete
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS interface ap_fifo 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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
The wrong part of the code is: #pragma HLS interface ap_fifo 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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
The wrong part of the code is: #pragma HLS interface ap_fifo 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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS interface m_axi port=A random The right code snippet is: #pragma HLS interface m_axi port=A
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
The right code snippet is: #pragma HLS interface m_axi port=A
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
The wrong part of the code is: #pragma HLS interface m_axi port=A 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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
The wrong part of the code is: #pragma HLS interface m_axi port=A random The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=A
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_...
The wrong part of the code is: #pragma HLS interface axis 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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_none ...
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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS IN...
The wrong part of the code is: #pragma HLS interface axis 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: ``` void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, const ap_uint<1> rst, ap_uint<4>& S, ...
The wrong part of the code is: #pragma HLS interface axis 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'