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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS interface m_axi port=axis_out The right code snippet is: #pragma HLS interface axis port=axis_out
'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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS INTERFACE ap_none...
The right code snippet is: #pragma HLS interface axis port=axis_out
'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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS I...
The wrong part of the code is: #pragma HLS interface m_axi port=axis_out 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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS interface m_axi port=axis_out The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface axis port=axis_out
'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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS interface bram port=clk1 The right code snippet is: #pragma HLS interface ap_none port=clk1
'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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS INTERFACE ap_none...
The right code snippet is: #pragma HLS interface ap_none port=clk1
'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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS I...
The wrong part of the code is: #pragma HLS interface bram port=clk1 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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS interface bram port=clk1 The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_none port=clk1
'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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS interface ap_vld port=axis_out The right code snippet is: #pragma HLS interface axis port=axis_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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS INTERFACE ap_none...
The right code snippet is: #pragma HLS interface axis port=axis_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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS I...
The wrong part of the code is: #pragma HLS interface ap_vld port=axis_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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS interface ap_vld port=axis_out The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface axis port=axis_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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS INTERFACE ap...
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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS INTERFACE ap_none...
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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS I...
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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERF...
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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS INTERFACE ap...
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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS INTERFACE ap_none...
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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERFACE ap_none port=clk1 #pragma HLS I...
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 glitch_free_mux(ap_uint<1> clk1, ap_uint<1> clk2, ap_uint<1> ctl, ap_uint<1> &clk_out) { #pragma HLS INTERF...
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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: temp_result = (num1 << (fractional_bits+1)) / num2; The right code snippet is: temp_result = (num1 << fractional_bits) / num2;
OOB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: temp_result = (num1 << fractional_bits) / num2;
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: temp_result = (num1 << (fractional_bits+1)) / num2; 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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: temp_result = (num1 << (fractional_bits+1)) / num2; The high-level-synthesis bug type of the code is: OOB The right code snippet is: temp_result = (num1 << fractional_bits) / num2;
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: fixed_point temp_result = 0; The right code snippet is: fixed_point temp_result;
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: fixed_point temp_result;
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: fixed_point temp_result = 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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: fixed_point temp_result = 0; The high-level-synthesis bug type of the code is: INIT The right code snippet is: fixed_point temp_result;
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: temp_result = (num1 << (fractional_bits+4)) / num2; The right code snippet is: temp_result = (num1 << fractional_bits) / num2;
SHFT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: temp_result = (num1 << fractional_bits) / num2;
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: temp_result = (num1 << (fractional_bits+4)) / num2; 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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: temp_result = (num1 << (fractional_bits+4)) / num2; The high-level-synthesis bug type of the code is: SHFT The right code snippet is: temp_result = (num1 << fractional_bits) / num2;
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: while(1) { temp_result = num1 + num2; } The right code snippet is: switch(ctrl) { case 0: temp_result = num1 + num2; break; case 1: temp_result = num1 - num2; break; case 2: temp_result = num1 * num2; break; case 3: temp_result = (num...
INF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: switch(ctrl) { case 0: temp_result = num1 + num2; break; case 1: temp_result = num1 - num2; break; case 2: temp_result = num1 * num2; break; case 3: temp_result = (num1 << fractional_bits) / num2; break; default: temp_result = 0; brea...
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: while(1) { temp_result = num1 + num2; } 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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: while(1) { temp_result = num1 + num2; } The high-level-synthesis bug type of the code is: INF The right code snippet is: switch(ctrl) { case 0: temp_result = num1 + num2; break; case 1: temp_result = num1 - num2; break; case 2: temp_result ...
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: int temp_result; The right code snippet is: fixed_point temp_result;
USE
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: fixed_point temp_result;
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: int temp_result; 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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: int temp_result; The high-level-synthesis bug type of the code is: USE The right code snippet is: fixed_point temp_result;
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: temp_result = num1 + num2; temp_result = num1 + num2; The right code snippet is: for(int i=0; i<10; i++) { temp_result = num1 + num2; }
MLU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: for(int i=0; i<10; i++) { temp_result = num1 + num2; }
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: temp_result = num1 + num2; temp_result = num1 + num2; 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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: temp_result = num1 + num2; temp_result = num1 + num2; The high-level-synthesis bug type of the code is: MLU The right code snippet is: for(int i=0; i<10; i++) { temp_result = num1 + num2; }
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: fixed_point temp_result = 0; The right code snippet is: fixed_point temp_result;
ZERO
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: fixed_point temp_result;
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: fixed_point temp_result = 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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: fixed_point temp_result = 0; The high-level-synthesis bug type of the code is: ZERO The right code snippet is: fixed_point temp_result;
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: memcpy(dest+size/2, src, size); The right code snippet is: memcpy(dest, src, size);
BUF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: memcpy(dest, src, 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: memcpy(dest+size/2, src, 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: memcpy(dest+size/2, src, size); The high-level-synthesis bug type of the code is: BUF The right code snippet is: memcpy(dest, src, 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: #pragma HLS array_partition variable=temp_result cyclic dim=1 The right code snippet is: #pragma HLS array_partition variable=temp_result 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: #pragma HLS array_partition variable=temp_result 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: #pragma HLS array_partition variable=temp_result 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: #pragma HLS array_partition variable=temp_result cyclic dim=1 The high-level-synthesis bug type of the code is: APT The right code snippet is: #pragma HLS array_partition variable=temp_result 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: #pragma HLS array_partition variable=temp_result complete dim=2 The right code snippet is: #pragma HLS array_partition variable=temp_result 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: #pragma HLS array_partition variable=temp_result 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: #pragma HLS array_partition variable=temp_result 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: #pragma HLS array_partition variable=temp_result complete dim=2 The high-level-synthesis bug type of the code is: FND The right code snippet is: #pragma HLS array_partition variable=temp_result 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: #pragma HLS array_partition variable=temp_result complete dim=3 The right code snippet is: #pragma HLS array_partition variable=temp_result 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: #pragma HLS array_partition variable=temp_result 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: #pragma HLS array_partition variable=temp_result complete dim=3 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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: #pragma HLS array_partition variable=temp_result complete dim=3 The high-level-synthesis bug type of the code is: DID The right code snippet is: #pragma HLS array_partition variable=temp_result 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: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis register both port=num1 #pragma HLS interface axis register both port=num2 #pragma HLS interface axis register both port=ctrl #pragma HLS interface ap_none register both port=result The right code snipp...
IDAP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis register both port=num1 #pragma HLS interface axis register both port=num2 #pragma HLS interface axis register both port=ctrl #pragma HLS interface axis register both port=result
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis register both port=num1 #pragma HLS interface axis register both port=num2 #pragma HLS interface axis register both port=ctrl #pragma HLS interface ap_none register both port=result The high-level-synth...
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis register both port=num1 #pragma HLS interface axis register both port=num2 #pragma HLS interface axis register both port=ctrl #pragma HLS interface ap_none register both port=result The high-level-synth...
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface m_axi register both port=num1 #pragma HLS interface m_axi register both port=num2 #pragma HLS interface m_axi register both port=ctrl #pragma HLS interface m_axi register both port=result The right code snip...
RAMB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis register both port=num1 #pragma HLS interface axis register both port=num2 #pragma HLS interface axis register both port=ctrl #pragma HLS interface axis register both port=result
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface m_axi register both port=num1 #pragma HLS interface m_axi register both port=num2 #pragma HLS interface m_axi register both port=ctrl #pragma HLS interface m_axi register both port=result The high-level-synt...
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface m_axi register both port=num1 #pragma HLS interface m_axi register both port=num2 #pragma HLS interface m_axi register both port=ctrl #pragma HLS interface m_axi register both port=result The high-level-synt...
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_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface bram register both port=num1 #pragma HLS interface bram register both port=num2 #pragma HLS interface bram register both port=ctrl #pragma HLS interface bram register both port=result The right code snippet ...
SMA
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; void fixed_poin...
The right code snippet is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface axis register both port=num1 #pragma HLS interface axis register both port=num2 #pragma HLS interface axis register both port=ctrl #pragma HLS interface axis register both port=result
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, integer_bits, AP_RND, AP_SAT> fixed_point; ...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface bram register both port=num1 #pragma HLS interface bram register both port=num2 #pragma HLS interface bram register both port=ctrl #pragma HLS interface bram register both port=result The high-level-synthesi...
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_fixed.h> const int integer_bits = 4; const int fractional_bits = 4; typedef ap_fixed<integer_bits+fractional_bits, intege...
The wrong part of the code is: #pragma HLS interface ap_ctrl_none port=return #pragma HLS interface bram register both port=num1 #pragma HLS interface bram register both port=num2 #pragma HLS interface bram register both port=ctrl #pragma HLS interface bram register both port=result The high-level-synthesi...
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_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& rd_data_coun...
The wrong part of the code is: fifo_mem[17] = wr_axis.data; The right code snippet is: fifo_mem[wr_ptr] = wr_axis.data;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& rd_data_count ) {...
The right code snippet is: fifo_mem[wr_ptr] = wr_axis.data;
'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_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& r...
The wrong part of the code is: fifo_mem[17] = wr_axis.data; 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_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool&...
The wrong part of the code is: fifo_mem[17] = wr_axis.data; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: fifo_mem[wr_ptr] = wr_axis.data;
'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_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& rd_data_coun...
The wrong part of the code is: ap_uint<8> rd_data_count_reg; The right code snippet is: static ap_uint<8> rd_data_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: #include <ap_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& rd_data_count ) {...
The right code snippet is: static ap_uint<8> rd_data_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: #include <ap_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& r...
The wrong part of the code is: ap_uint<8> rd_data_count_reg; 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_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool&...
The wrong part of the code is: ap_uint<8> rd_data_count_reg; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<8> rd_data_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: #include <ap_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& rd_data_coun...
The wrong part of the code is: rd_ptr = (rd_ptr << 17); The right code snippet is: rd_ptr = (rd_ptr == 16) ? 0 : rd_ptr;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& rd_data_count ) {...
The right code snippet is: rd_ptr = (rd_ptr == 16) ? 0 : rd_ptr;
'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_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& r...
The wrong part of the code is: rd_ptr = (rd_ptr << 17); 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_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool&...
The wrong part of the code is: rd_ptr = (rd_ptr << 17); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: rd_ptr = (rd_ptr == 16) ? 0 : rd_ptr;
'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_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& rd_data_coun...
The wrong part of the code is: while(0) { // do something } The right code snippet is: while(1) { // do something }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& rd_data_count ) {...
The right code snippet is: while(1) { // do something }
'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_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& r...
The wrong part of the code is: while(0) { // do something } 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_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool&...
The wrong part of the code is: while(0) { // do something } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: while(1) { // do something }
'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_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& rd_data_coun...
The wrong part of the code is: ap_int<8> rd_data_count_reg = 0; The right code snippet is: ap_uint<8> rd_data_count_reg = 0;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& rd_data_count ) {...
The right code snippet is: ap_uint<8> rd_data_count_reg = 0;
'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_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool& full, bool& empty, ap_uint<8>& r...
The wrong part of the code is: ap_int<8> rd_data_count_reg = 0; 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_axi_sdata.h> typedef ap_axis<64, 1, 1, 1> axis_t; void rx_fifo( bool rst, axis_t& wr_axis, axis_t& rd_axis, bool&...
The wrong part of the code is: ap_int<8> rd_data_count_reg = 0; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<8> rd_data_count_reg = 0;
'USE'