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_clk port=clk_i #pragma HLS INTERFACE ap_rst port=reset_i #pragma HLS INTERFACE axis port=data_i #pragma HLS INTERFACE axis port=src_r_i #pragma HLS INTERFACE a...
The wrong part of the code is: static data_t data_r; The right code snippet is: static data_t data_r = 0;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk_i #pragma HLS INTERFACE ap_rst port=reset_i #pragma HLS INTERFACE axis port=data_i #pragma HLS INTERFACE axis port=src_r_i #pragma HLS INTERFACE axis p...
The right code snippet is: static data_t data_r = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk_i #pragma HLS INTERFACE ap_rst port=reset_i #pragma HLS INTERFACE axis port=data_i #pragma HLS INTERFACE axis port=src_r_i #pragma HLS ...
The wrong part of the code is: static data_t data_r; The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk_i #pragma HLS INTERFACE ap_rst port=reset_i #pragma HLS INTERFACE axis port=data_i #pragma HLS INT...
The wrong part of the code is: static data_t data_r; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static data_t data_r = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk_i #pragma HLS INTERFACE ap_rst port=reset_i #pragma HLS INTERFACE axis port=data_i #pragma HLS INTERFACE axis port=src_r_i #pragma HLS INTERFACE a...
The wrong part of the code is: data_broadcast_out = (data_broadcast_in, dirs_p/2) & src_r_i_val; The right code snippet is: data_broadcast_out = (data_broadcast_in, dirs_p) & src_r_i_val;
'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_clk port=clk_i #pragma HLS INTERFACE ap_rst port=reset_i #pragma HLS INTERFACE axis port=data_i #pragma HLS INTERFACE axis port=src_r_i #pragma HLS INTERFACE axis p...
The right code snippet is: data_broadcast_out = (data_broadcast_in, dirs_p) & src_r_i_val;
'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_clk port=clk_i #pragma HLS INTERFACE ap_rst port=reset_i #pragma HLS INTERFACE axis port=data_i #pragma HLS INTERFACE axis port=src_r_i #pragma HLS ...
The wrong part of the code is: data_broadcast_out = (data_broadcast_in, dirs_p/2) & src_r_i_val; 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_clk port=clk_i #pragma HLS INTERFACE ap_rst port=reset_i #pragma HLS INTERFACE axis port=data_i #pragma HLS INT...
The wrong part of the code is: data_broadcast_out = (data_broadcast_in, dirs_p/2) & src_r_i_val; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: data_broadcast_out = (data_broadcast_in, dirs_p) & src_r_i_val;
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
The wrong part of the code is: for (int i = 0; i <= n; i++) { sum += in[i] * hls::cos(hls::Pi * k * (2 * i + 1) / (2 * n)); } The right code snippet is: for (int i = 0; i < n; i++) { sum += in[i] * hls::cos(hls::Pi * k * (2 * i + 1) / (2 * n)); }
OOB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
The right code snippet is: for (int i = 0; i < n; i++) { sum += in[i] * hls::cos(hls::Pi * k * (2 * i + 1) / (2 * n)); }
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: for (int i = 0; i <= n; i++) { sum += in[i] * hls::cos(hls::Pi * k * (2 * i + 1) / (2 * n)); } 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: for (int i = 0; i <= n; i++) { sum += in[i] * hls::cos(hls::Pi * k * (2 * i + 1) / (2 * n)); } The high-level-synthesis bug type of the code is: OOB The right code snippet is: for (int i = 0; i < n; i++) { sum += in[i] * hls::cos(hls::Pi * k * (2 * i + 1) / (2...
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
The wrong part of the code is: data_t sum = 0; for (int i = 1; i < n; i++) { The right code snippet is: data_t sum; for (int i = 0; i < n; i++) {
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
The right code snippet is: data_t sum; for (int i = 0; i < n; i++) {
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: data_t sum = 0; for (int i = 1; i < n; i++) { 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: data_t sum = 0; for (int i = 1; i < n; i++) { The high-level-synthesis bug type of the code is: INIT The right code snippet is: data_t sum; for (int i = 0; i < n; i++) {
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
The wrong part of the code is: for (int k = 0; k < n; k++) { sum += in[i] * hls::cos(hls::Pi * k * (2 * i + 1) / (2 * n + 1)); } The right code snippet is: for (int k = 0; k < n; k++) { sum += in[i] * hls::cos(hls::Pi * k * (2 * i + 1) / (2 * n)); }
SHFT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
The right code snippet is: for (int k = 0; k < n; k++) { sum += in[i] * hls::cos(hls::Pi * k * (2 * i + 1) / (2 * n)); }
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: for (int k = 0; k < n; k++) { sum += in[i] * hls::cos(hls::Pi * k * (2 * i + 1) / (2 * n + 1)); } 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: for (int k = 0; k < n; k++) { sum += in[i] * hls::cos(hls::Pi * k * (2 * i + 1) / (2 * n + 1)); } The high-level-synthesis bug type of the code is: SHFT The right code snippet is: for (int k = 0; k < n; k++) { sum += in[i] * hls::cos(hls::Pi * k * (2 * i + 1) ...
SHFT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
The wrong part of the code is: for (int k = 0; ; k++) { The right code snippet is: for (int k = 0; k < n; k++) {
INF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
The right code snippet is: for (int k = 0; k < n; k++) {
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: for (int k = 0; ; k++) { 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: for (int k = 0; ; k++) { The high-level-synthesis bug type of the code is: INF The right code snippet is: for (int k = 0; k < n; k++) {
INF
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, -1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k...
The wrong part of the code is: typedef ap_fixed<16, -1> data_t; The right code snippet is: typedef ap_fixed<16, 1> data_t;
USE
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, -1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0;...
The right code snippet is: typedef ap_fixed<16, 1> data_t;
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, -1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: typedef ap_fixed<16, -1> data_t; 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, -1> data_t; void DCT(data_t in[n],...
The wrong part of the code is: typedef ap_fixed<16, -1> data_t; The high-level-synthesis bug type of the code is: USE The right code snippet is: typedef ap_fixed<16, 1> data_t;
USE
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
The wrong part of the code is: for (int k = 0; k < n/2; k++) { The right code snippet is: for (int k = 0; k < n; k++) {
MLU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
The right code snippet is: for (int k = 0; k < n; k++) {
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: for (int k = 0; k < n/2; k++) { 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: for (int k = 0; k < n/2; k++) { The high-level-synthesis bug type of the code is: MLU The right code snippet is: for (int k = 0; k < n; k++) {
MLU
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum = 0; for (in...
The wrong part of the code is: data_t sum = 0; The right code snippet is: data_t sum;
ZERO
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum = 0; for (int k =...
The right code snippet is: data_t sum;
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum = 0; ...
The wrong part of the code is: data_t sum = 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: data_t sum = 0; The high-level-synthesis bug type of the code is: ZERO The right code snippet is: data_t sum;
ZERO
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n/2], data_t out[n/2]) { data_t sum; for (in...
The wrong part of the code is: void DCT(data_t in[n/2], data_t out[n/2]) { The right code snippet is: void DCT(data_t in[n], data_t out[n]) {
BUF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n/2], data_t out[n/2]) { data_t sum; for (int k =...
The right code snippet is: void DCT(data_t in[n], data_t out[n]) {
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n/2], data_t out[n/2]) { data_t sum; ...
The wrong part of the code is: void DCT(data_t in[n/2], data_t out[n/2]) { 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n/2]...
The wrong part of the code is: void DCT(data_t in[n/2], data_t out[n/2]) { The high-level-synthesis bug type of the code is: BUF The right code snippet is: void DCT(data_t in[n], data_t out[n]) {
BUF
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
The wrong part of the code is: #pragma HLS array_partition cyclic variable=in The right code snippet is: #pragma HLS array_partition complete variable=in
APT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
The right code snippet is: #pragma HLS array_partition complete variable=in
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: #pragma HLS array_partition cyclic variable=in 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: #pragma HLS array_partition cyclic variable=in The high-level-synthesis bug type of the code is: APT The right code snippet is: #pragma HLS array_partition complete variable=in
APT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
The wrong part of the code is: #pragma HLS array_partition block variable=in The right code snippet is: #pragma HLS array_partition complete variable=in
FND
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
The right code snippet is: #pragma HLS array_partition complete variable=in
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: #pragma HLS array_partition block variable=in 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: #pragma HLS array_partition block variable=in The high-level-synthesis bug type of the code is: FND The right code snippet is: #pragma HLS array_partition complete variable=in
FND
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
The wrong part of the code is: #pragma HLS array_partition complete dim=2 variable=in The right code snippet is: #pragma HLS array_partition complete dim=1 variable=in
DID
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
The right code snippet is: #pragma HLS array_partition complete dim=1 variable=in
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: #pragma HLS array_partition complete dim=2 variable=in 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: #pragma HLS array_partition complete dim=2 variable=in The high-level-synthesis bug type of the code is: DID The right code snippet is: #pragma HLS array_partition complete dim=1 variable=in
DID
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
The wrong part of the code is: #pragma HLS interface ap_memory port=in The right code snippet is: #pragma HLS interface ap_fifo port=in
IDAP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
The right code snippet is: #pragma HLS interface ap_fifo port=in
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: #pragma HLS interface ap_memory port=in 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: #pragma HLS interface ap_memory port=in The high-level-synthesis bug type of the code is: IDAP The right code snippet is: #pragma HLS interface ap_fifo port=in
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
The wrong part of the code is: #pragma HLS interface m_axi depth=256 port=in The right code snippet is: #pragma HLS interface m_axi port=in
RAMB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
The right code snippet is: #pragma HLS interface m_axi port=in
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: #pragma HLS interface m_axi depth=256 port=in 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: #pragma HLS interface m_axi depth=256 port=in The high-level-synthesis bug type of the code is: RAMB The right code snippet is: #pragma HLS interface m_axi port=in
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
The wrong part of the code is: #pragma HLS interface bram port=in The right code snippet is: #pragma HLS interface axis port=in
SMA
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
The right code snippet is: #pragma HLS interface axis port=in
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: #pragma HLS interface bram port=in 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: #pragma HLS interface bram port=in The high-level-synthesis bug type of the code is: SMA The right code snippet is: #pragma HLS interface axis port=in
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
The wrong part of the code is: #pragma HLS interface ap_vld port=in The right code snippet is: #pragma HLS interface ap_none port=in
AMS
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
The right code snippet is: #pragma HLS interface ap_none port=in
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: #pragma HLS interface ap_vld port=in 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: #pragma HLS interface ap_vld port=in The high-level-synthesis bug type of the code is: AMS The right code snippet is: #pragma HLS interface ap_none port=in
AMS
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k ...
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; for (int k = 0; ...
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; #pragma HLS...
The wrong part of the code is: #pragma HLS unroll for (int k = 0; k < n; k++) { The right code snippet is: for (int k = 0; k < n; k++) {
ILNU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; #pragma HLS unro...
The right code snippet is: for (int k = 0; k < n; k++) {
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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], data_t out[n]) { data_t sum; ...
The wrong part of the code is: #pragma HLS unroll for (int k = 0; k < n; k++) { 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: HLS code for DCT: #include "ap_fixed.h" #include "hls_math.h" const int n = 8; typedef ap_fixed<16, 1> data_t; void DCT(data_t in[n], ...
The wrong part of the code is: #pragma HLS unroll for (int k = 0; k < n; k++) { The high-level-synthesis bug type of the code is: ILNU The right code snippet is: for (int k = 0; k < n; k++) {
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 <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> &inputReady...
The wrong part of the code is: if (!fifo.full() && inputValid_in.read()) { fifo.write(inputData_in.read()); fifo.write(inputData_in.read()); } The right code snippet is: if (!fifo.full() && inputValid_in.read()) { fifo.write(inputData_in.read()); }
OOB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> &inputReady_out,...
The right code snippet is: if (!fifo.full() && inputValid_in.read()) { fifo.write(inputData_in.read()); }
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 <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> ...
The wrong part of the code is: if (!fifo.full() && inputValid_in.read()) { fifo.write(inputData_in.read()); fifo.write(inputData_in.read()); } 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 <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in,...
The wrong part of the code is: if (!fifo.full() && inputValid_in.read()) { fifo.write(inputData_in.read()); fifo.write(inputData_in.read()); } The high-level-synthesis bug type of the code is: OOB The right code snippet is: if (!fifo.full() && inputValid_in.read()) { fifo.write(inputDat...
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 <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> &inputReady...
The wrong part of the code is: bool inputFull = false; inputFull = true; The right code snippet is: bool inputFull;
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> &inputReady_out,...
The right code snippet is: bool inputFull;
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 <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> ...
The wrong part of the code is: bool inputFull = false; inputFull = true; The high-level-synthesis bug type of the code is: INIT
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in,...
The wrong part of the code is: bool inputFull = false; inputFull = true; The high-level-synthesis bug type of the code is: INIT The right code snippet is: bool inputFull;
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 <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> &inputReady...
The wrong part of the code is: depth_out << 10 The right code snippet is: depth_out
SHFT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> &inputReady_out,...
The right code snippet is: depth_out
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 <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> ...
The wrong part of the code is: depth_out << 10 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 <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in,...
The wrong part of the code is: depth_out << 10 The high-level-synthesis bug type of the code is: SHFT The right code snippet is: depth_out
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 <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> &inputReady...
The wrong part of the code is: for (int i = 0; i >= depth_out; i++) { The right code snippet is: for (int i = 0; i < depth_out; i++) {
INF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> &inputReady_out,...
The right code snippet is: for (int i = 0; i < depth_out; i++) {
INF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> ...
The wrong part of the code is: for (int i = 0; i >= depth_out; i++) { The high-level-synthesis bug type of the code is: INF
INF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in,...
The wrong part of the code is: for (int i = 0; i >= depth_out; i++) { The high-level-synthesis bug type of the code is: INF The right code snippet is: for (int i = 0; i < depth_out; i++) {
INF
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> &inputReady...
The wrong part of the code is: int depth_out The right code snippet is: unsigned char depth_out
USE
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> &inputReady_out,...
The right code snippet is: unsigned char depth_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 <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in, hls::stream<bool> ...
The wrong part of the code is: int depth_out 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 <hls_stream.h> void fifo_wrapper(hls::stream<unsigned char> &inputData_in, hls::stream<bool> &inputValid_in,...
The wrong part of the code is: int depth_out The high-level-synthesis bug type of the code is: USE The right code snippet is: unsigned char depth_out
USE