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,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b && a <= c && ...
The wrong part of the code is: void top_module(int a, int b, int c, int d, bool clk, bool reset, int &q) { #pragma HLS PIPELINE static int counter = 0; int min_value_out; for (int i = 0; i < 4; i++) { min_value(a, b, c, d, min_value_out); functional_module(counter, min_value_ou...
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b && a <= c && a <= ...
The right code snippet is: void top_module(int a, int b, int c, int d, bool clk, bool reset, int &q) { #pragma HLS PIPELINE static int counter = 0; int min_value_out; min_value(a, b, c, d, min_value_out); functional_module(counter, min_value_out, q); if (reset) counter = 0; ...
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b &&...
The wrong part of the code is: void top_module(int a, int b, int c, int d, bool clk, bool reset, int &q) { #pragma HLS PIPELINE static int counter = 0; int min_value_out; for (int i = 0; i < 4; i++) { min_value(a, b, c, d, min_value_out); functional_module(counter, min_value_ou...
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c,...
The wrong part of the code is: void top_module(int a, int b, int c, int d, bool clk, bool reset, int &q) { #pragma HLS PIPELINE static int counter = 0; int min_value_out; for (int i = 0; i < 4; i++) { min_value(a, b, c, d, min_value_out); functional_module(counter, min_value_ou...
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b && a <= c && ...
The wrong part of the code is: int min_value_out = 0; The right code snippet is: int min_value_out;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b && a <= c && a <= ...
The right code snippet is: int min_value_out;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b &&...
The wrong part of the code is: int min_value_out = 0; The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c,...
The wrong part of the code is: int min_value_out = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: int min_value_out;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b && a <= c && ...
The wrong part of the code is: void functional_module(int counter_out, int min_value_out, int &q) { q = counter_out - ((min_value_out >> 16) & 0xF); // Extract the lower 4 bits from the wrong half of the buffer } The right code snippet is: void functional_module(int counter_out, int min_value_out, ...
'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,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b && a <= c && a <= ...
The right code snippet is: void functional_module(int counter_out, int min_value_out, int &q) { q = counter_out - (min_value_out & 0xF); // Extract the lower 4 bits }
'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,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b &&...
The wrong part of the code is: void functional_module(int counter_out, int min_value_out, int &q) { q = counter_out - ((min_value_out >> 16) & 0xF); // Extract the lower 4 bits from the wrong half of the buffer } 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,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c,...
The wrong part of the code is: void functional_module(int counter_out, int min_value_out, int &q) { q = counter_out - ((min_value_out >> 16) & 0xF); // Extract the lower 4 bits from the wrong half of the buffer } The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: ...
'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_fifo port=a,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b && a <= c && ...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=a,b,c,d,clk,reset The right code snippet is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,reset
'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_fifo port=a,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b && a <= c && a <= ...
The right code snippet is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,reset
'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_fifo port=a,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b &&...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=a,b,c,d,clk,reset 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_fifo port=a,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c,...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=a,b,c,d,clk,reset The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS INTERFACE ap_none port=a,b,c,d,clk,reset
'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,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b && a <= c && ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=a complete dim=2 #pragma HLS ARRAY_PARTITION variable=b complete dim=2 #pragma HLS ARRAY_PARTITION The right code snippet is: #pragma HLS ARRAY_PARTITION variable=a complete dim=1 #pragma HLS ARRAY_PARTITION variable=b 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,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b && a <= c && a <= ...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=a complete dim=1 #pragma HLS ARRAY_PARTITION variable=b complete dim=1 #pragma HLS ARRAY_PARTITION variable=c complete dim=1 #pragma HLS ARRAY_PARTITION variable=d 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,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c, int d, int &min) { if (a <= b &&...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=a complete dim=2 #pragma HLS ARRAY_PARTITION variable=b complete dim=2 #pragma HLS ARRAY_PARTITION 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,b,c,d,clk,reset #pragma HLS INTERFACE ap_ctrl_none port=return void min_value(int a, int b, int c,...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=a complete dim=2 #pragma HLS ARRAY_PARTITION variable=b complete dim=2 #pragma HLS ARRAY_PARTITION The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=a complete d...
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: ap_uint<4> count; The right code snippet is: count = 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_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = 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_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: ap_uint<4> count; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: ap_uint<4> count; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: count = 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_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: while (1) {} The right code snippet is: count = count + 1;
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = count + 1;
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: while (1) {} The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: while (1) {} The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: count = count + 1;
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS unroll factor(2) for (int i = 0; i < 2; i++) { count = count + 1; } The right code snippet is: count = count + 1;
'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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = count + 1;
'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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS unroll factor(2) for (int i = 0; i < 2; i++) { count = count + 1; } 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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: #pragma HLS unroll factor(2) for (int i = 0; i < 2; i++) { count = count + 1; } The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: count = count + 1;
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS interface s_axilite port=count bundle=control count = count + 1; The right code snippet is: count = count + 1;
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = count + 1;
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS interface s_axilite port=count bundle=control count = count + 1; The high-level-synthesis bug type of the code is: 'IDAP'
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: #pragma HLS interface s_axilite port=count bundle=control count = count + 1; The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: count = count + 1;
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: count = count << 5; The right code snippet is: count = count + 1;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = count + 1;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: count = count << 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: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: count = count << 5; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: count = count + 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: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS array_partition variable=count cyclic factor=2 The right code snippet is: count = count + 1;
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = count + 1;
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS array_partition variable=count cyclic factor=2 The high-level-synthesis bug type of the code is: 'APT'
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: #pragma HLS array_partition variable=count cyclic factor=2 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: count = count + 1;
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: count[5] = 1; The right code snippet is: count = count + 1;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = count + 1;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: count[5] = 1; The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: count[5] = 1; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: count = count + 1;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS array_partition variable=count complete count = count + 1; The right code snippet is: count = count + 1;
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = count + 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: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS array_partition variable=count complete count = count + 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: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: #pragma HLS array_partition variable=count complete count = count + 1; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: count = count + 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: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS array_partition variable=count cyclic factor=3 The right code snippet is: count = count + 1;
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = count + 1;
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS array_partition variable=count cyclic 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: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: #pragma HLS array_partition variable=count cyclic factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: count = count + 1;
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS dataflow count = count + 1; The right code snippet is: count = count + 1;
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = count + 1;
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS dataflow count = count + 1; The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: #pragma HLS dataflow count = count + 1; The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: count = count + 1;
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS interface ap_memory depth=16 port=count The right code snippet is: count = count + 1;
'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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = count + 1;
'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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS interface ap_memory depth=16 port=count 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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: #pragma HLS interface ap_memory depth=16 port=count The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: count = count + 1;
'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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS interface s_axilite port=count The right code snippet is: count = count + 1;
'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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = count + 1;
'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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS interface s_axilite port=count 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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: #pragma HLS interface s_axilite port=count The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: count = count + 1;
'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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS pipeline II=2 count = count + 1; The right code snippet is: count = count + 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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = count + 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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: #pragma HLS pipeline II=2 count = count + 1; 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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: #pragma HLS pipeline II=2 count = count + 1; The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: count = count + 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 binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: count = 1; The right code snippet is: count = 0;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk ...
The right code snippet is: count = 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: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap...
The wrong part of the code is: count = 1; The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void binary_counter(ap_uint<1> clk, ap_uint<1> rst, ap_uint<4> &count) { #pragma HLS INTERFACE ap_ctrl_none p...
The wrong part of the code is: count = 1; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: count = 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 #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned char UINT4...
The wrong part of the code is: read_data = mem[read_addr+1]; The right code snippet is: read_data = mem[read_addr];
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned char UINT4; typ...
The right code snippet is: read_data = mem[read_addr];
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned...
The wrong part of the code is: read_data = mem[read_addr+1]; The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef ...
The wrong part of the code is: read_data = mem[read_addr+1]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: read_data = mem[read_addr];
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned char UINT4...
The wrong part of the code is: UINT4 mem[8]; The right code snippet is: static UINT4 mem[8];
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned char UINT4; typ...
The right code snippet is: static UINT4 mem[8];
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned...
The wrong part of the code is: UINT4 mem[8]; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef ...
The wrong part of the code is: UINT4 mem[8]; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static UINT4 mem[8];
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned char UINT4...
The wrong part of the code is: read_data = mem[read_addr << 2]; The right code snippet is: read_data = mem[read_addr];
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned char UINT4; typ...
The right code snippet is: read_data = mem[read_addr];
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned...
The wrong part of the code is: read_data = mem[read_addr << 2]; The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef ...
The wrong part of the code is: read_data = mem[read_addr << 2]; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: read_data = mem[read_addr];
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned char UINT4...
The wrong part of the code is: while (read_en) { read_data = mem[read_addr]; } The right code snippet is: if (read_en) { read_data = mem[read_addr]; }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned char UINT4; typ...
The right code snippet is: if (read_en) { read_data = mem[read_addr]; }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned...
The wrong part of the code is: while (read_en) { read_data = mem[read_addr]; } The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef ...
The wrong part of the code is: while (read_en) { read_data = mem[read_addr]; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (read_en) { read_data = mem[read_addr]; }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef signed char UINT8; typedef unsigned char UINT4; ...
The wrong part of the code is: typedef signed char UINT8; The right code snippet is: typedef unsigned char UINT8;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef signed char UINT8; typedef unsigned char UINT4; typed...
The right code snippet is: typedef unsigned char UINT8;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef signed char UINT8; typedef unsigned c...
The wrong part of the code is: typedef signed char UINT8; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef ...
The wrong part of the code is: typedef signed char UINT8; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: typedef unsigned char UINT8;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned char UINT4...
The wrong part of the code is: mem[0] = 0; mem[1] = 0; mem[2] = 0; mem[3] = 0; mem[4] = 0; mem[5] = 0; mem[6] = 0; mem[7] = 0; The right code snippet is: for (int i = 0; i < 8; i++) { mem[i] = 0; }
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned char UINT4; typ...
The right code snippet is: for (int i = 0; i < 8; i++) { mem[i] = 0; }
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef unsigned char UINT8; typedef unsigned...
The wrong part of the code is: mem[0] = 0; mem[1] = 0; mem[2] = 0; mem[3] = 0; mem[4] = 0; mem[5] = 0; mem[6] = 0; mem[7] = 0; The high-level-synthesis bug type of the code is: 'MLU'
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst_n port=rst_n #pragma HLS INTERFACE ap_ctrl_none port=return typedef ...
The wrong part of the code is: mem[0] = 0; mem[1] = 0; mem[2] = 0; mem[3] = 0; mem[4] = 0; mem[5] = 0; mem[6] = 0; mem[7] = 0; The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 8; i++) { mem[i] = 0; }
'MLU'