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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i ...
The wrong part of the code is: for (int i = 1; i <= 4; i++) { The right code snippet is: for (int i = 1; i <= 8; i++) {
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i = 1; ...
The right code snippet is: for (int i = 1; i <= 8; i++) {
'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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; ...
The wrong part of the code is: for (int i = 1; i <= 4; i++) { 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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9...
The wrong part of the code is: for (int i = 1; i <= 4; i++) { The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 1; i <= 8; i++) {
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9] = {1,1,1,1,1,1,1,1,1}; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0]...
The wrong part of the code is: int g[9] = {1,1,1,1,1,1,1,1,1}; The right code snippet is: int g[9];
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9] = {1,1,1,1,1,1,1,1,1}; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0;...
The right code snippet is: int g[9];
'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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9] = {1,1,1,1,1,1,1,1,1}; int p[9]; int e[9]; int f[9]; g[0] = ...
The wrong part of the code is: int g[9] = {1,1,1,1,1,1,1,1,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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9] = {1,1,1,1,1,1,1,1,1}; int p[9]; ...
The wrong part of the code is: int g[9] = {1,1,1,1,1,1,1,1,1}; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: int g[9];
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[8]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i ...
The wrong part of the code is: int p[8]; The right code snippet is: int p[9];
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[8]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i = 1; ...
The right code snippet is: int p[9];
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[8]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; ...
The wrong part of the code is: int p[8]; The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[8]; int e[9]; int f[9...
The wrong part of the code is: int p[8]; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: int p[9];
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i ...
The wrong part of the code is: #pragma HLS array_partition variable=g cyclic The right code snippet is: #pragma HLS array_partition variable=g complete
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i = 1; ...
The right code snippet is: #pragma HLS array_partition variable=g complete
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; ...
The wrong part of the code is: #pragma HLS array_partition variable=g cyclic The high-level-synthesis bug type of the code is: 'APT'
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9...
The wrong part of the code is: #pragma HLS array_partition variable=g cyclic The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=g complete
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i ...
The wrong part of the code is: #pragma HLS array_partition variable=g complete factor=2 The right code snippet is: #pragma HLS array_partition variable=g complete
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i = 1; ...
The right code snippet is: #pragma HLS array_partition variable=g complete
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; ...
The wrong part of the code is: #pragma HLS array_partition variable=g complete factor=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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9...
The wrong part of the code is: #pragma HLS array_partition variable=g complete factor=2 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=g complete
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i ...
The wrong part of the code is: #pragma HLS array_partition variable=g dim=2 The right code snippet is: #pragma HLS array_partition variable=g complete
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i = 1; ...
The right code snippet is: #pragma HLS array_partition variable=g complete
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; ...
The wrong part of the code is: #pragma HLS array_partition variable=g dim=2 The high-level-synthesis bug type of the code is: 'DID'
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9...
The wrong part of the code is: #pragma HLS array_partition variable=g dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=g complete
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i ...
The wrong part of the code is: #pragma HLS dataflow region The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i = 1; ...
The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; ...
The wrong part of the code is: #pragma HLS dataflow region The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9...
The wrong part of the code is: #pragma HLS dataflow region The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i ...
The wrong part of the code is: #pragma HLS interface ap_ctrl_hs port=return The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i = 1; ...
The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; ...
The wrong part of the code is: #pragma HLS interface ap_ctrl_hs port=return The high-level-synthesis bug type of the code is: 'IDAP'
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9...
The wrong part of the code is: #pragma HLS interface ap_ctrl_hs port=return The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i ...
The wrong part of the code is: #pragma HLS interface m_axi port=a offset=slave bundle=gmem1 The right code snippet is: #pragma HLS interface m_axi port=a offset=slave bundle=gmem0
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i = 1; ...
The right code snippet is: #pragma HLS interface m_axi port=a offset=slave bundle=gmem0
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; ...
The wrong part of the code is: #pragma HLS interface m_axi port=a offset=slave bundle=gmem1 The high-level-synthesis bug type of the code is: 'RAMB'
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9...
The wrong part of the code is: #pragma HLS interface m_axi port=a offset=slave bundle=gmem1 The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=a offset=slave bundle=gmem0
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i ...
The wrong part of the code is: #pragma HLS interface bram port=g The right code snippet is: #pragma HLS interface ap_memory port=g
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i = 1; ...
The right code snippet is: #pragma HLS interface ap_memory port=g
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; ...
The wrong part of the code is: #pragma HLS interface bram port=g The high-level-synthesis bug type of the code is: 'SMA'
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9...
The wrong part of the code is: #pragma HLS interface bram port=g The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_memory port=g
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i ...
The wrong part of the code is: #pragma HLS interface ap_vld port=overflow The right code snippet is: #pragma HLS interface ap_none port=overflow
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i = 1; ...
The right code snippet is: #pragma HLS interface ap_none port=overflow
'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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; ...
The wrong part of the code is: #pragma HLS interface ap_vld port=overflow 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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9...
The wrong part of the code is: #pragma HLS interface ap_vld port=overflow The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_none port=overflow
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i ...
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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; for (int i = 1; ...
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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; ...
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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9...
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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; #pragma HLS...
The wrong part of the code is: #pragma HLS unroll for (int i = 1; i <= 8; i++) { The right code snippet is: for (int i = 1; i <= 8; i++) {
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; #pragma HLS unro...
The right code snippet is: for (int i = 1; i <= 8; i++) {
'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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9]; g[0] = 0; p[0] = 0; ...
The wrong part of the code is: #pragma HLS unroll for (int i = 1; i <= 8; i++) { 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: ``` void adder_8bit (int a[8], int b[8], int s[8], bool& overflow) { int c[9]; int g[9]; int p[9]; int e[9]; int f[9...
The wrong part of the code is: #pragma HLS unroll for (int i = 1; i <= 8; i++) { The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: for (int i = 1; i <= 8; i++) {
'ILNU'
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: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out) { ap_uint<16> out_uninit; out = out_uninit; } ```
The wrong part of the code is: ap_uint<16> out_uninit; out = out_uninit; The right code snippet is: out = in.range(25, 10);
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS Code: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out) { ap_uint<16> out_uninit; out = out_uninit; } ``` The wrong part of the code is: ap_uint<16>...
The right code snippet is: out = in.range(25, 10);
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: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out) { ap_uint<16> out_uninit; out = out_uninit; } ```
The wrong part of the code is: ap_uint<16> out_uninit; out = out_uninit; The high-level-synthesis bug type of the code is: INIT
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: HLS Code: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out) { ap_uint<16> out_uninit; out = out_uninit; } `...
The wrong part of the code is: ap_uint<16> out_uninit; out = out_uninit; The high-level-synthesis bug type of the code is: INIT The right code snippet is: out = in.range(25, 10);
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: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out) { out = (ap_int<16>)in.range(25, 10); } ```
The wrong part of the code is: out = (ap_int<16>)in.range(25, 10); The right code snippet is: out = in.range(25, 10);
USE
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS Code: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out) { out = (ap_int<16>)in.range(25, 10); } ``` The wrong part of the code is: out = (ap_int<16>...
The right code snippet is: out = in.range(25, 10);
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: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out) { out = (ap_int<16>)in.range(25, 10); } ```
The wrong part of the code is: out = (ap_int<16>)in.range(25, 10); 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: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out) { out = (ap_int<16>)in.range(25, 10); } ``` ...
The wrong part of the code is: out = (ap_int<16>)in.range(25, 10); The high-level-synthesis bug type of the code is: USE The right code snippet is: out = in.range(25, 10);
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: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out, ap_uint<1> sel) { if (sel == 1) { out[0] = in.range(25, 10); } else { out[1...
The wrong part of the code is: void slice_module(ap_uint<32> in, ap_uint<16>& out, ap_uint<1> sel) { if (sel == 1) { out[0] = in.range(25, 10); } else { out[1] = in.range(25, 10); } } The right code snippet is: void slice_module(ap_uint<32> in, ap_uint<16>& out) { out = ...
SMA
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS Code: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out, ap_uint<1> sel) { if (sel == 1) { out[0] = in.range(25, 10); } else { out[1] = i...
The right code snippet is: void slice_module(ap_uint<32> in, ap_uint<16>& out) { out = in.range(25, 10); }
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: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out, ap_uint<1> sel) { if (sel == 1) { out[0] = in.range(25, 10); } else { ...
The wrong part of the code is: void slice_module(ap_uint<32> in, ap_uint<16>& out, ap_uint<1> sel) { if (sel == 1) { out[0] = in.range(25, 10); } else { out[1] = in.range(25, 10); } } 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: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out, ap_uint<1> sel) { if (sel == 1) { out[0...
The wrong part of the code is: void slice_module(ap_uint<32> in, ap_uint<16>& out, ap_uint<1> sel) { if (sel == 1) { out[0] = in.range(25, 10); } else { out[1] = in.range(25, 10); } } The high-level-synthesis bug type of the code is: SMA The right code snippet is: void s...
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: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out) { #pragma HLS unroll factor(2) out = in.range(25, 10); } ```
The wrong part of the code is: void slice_module(ap_uint<32> in, ap_uint<16>& out) { #pragma HLS unroll factor(2) out = in.range(25, 10); } The right code snippet is: void slice_module(ap_uint<32> in, ap_uint<16>& out) { out = in.range(25, 10); }
ILNU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS Code: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out) { #pragma HLS unroll factor(2) out = in.range(25, 10); } ``` The wrong part of the code is: ...
The right code snippet is: void slice_module(ap_uint<32> in, ap_uint<16>& out) { out = in.range(25, 10); }
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: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out) { #pragma HLS unroll factor(2) out = in.range(25, 10); } ```
The wrong part of the code is: void slice_module(ap_uint<32> in, ap_uint<16>& out) { #pragma HLS unroll factor(2) out = in.range(25, 10); } 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: ``` #include <ap_int.h> void slice_module(ap_uint<32> in, ap_uint<16>& out) { #pragma HLS unroll factor(2) out = in.ran...
The wrong part of the code is: void slice_module(ap_uint<32> in, ap_uint<16>& out) { #pragma HLS unroll factor(2) out = in.range(25, 10); } The high-level-synthesis bug type of the code is: ILNU The right code snippet is: void slice_module(ap_uint<32> in, ap_uint<16>& out) { out = in.ra...
ILNU
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=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: base[i+1] = A1[i] + A2[i]; The right code snippet is: base[i] = A1[i] + A2[i];
'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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none port=D1...
The right code snippet is: base[i] = A1[i] + A2[i];
'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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE...
The wrong part of the code is: base[i+1] = A1[i] + A2[i]; 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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: base[i+1] = A1[i] + A2[i]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: base[i] = A1[i] + A2[i];
'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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: int sum; The right code snippet is: int sum = 0;
'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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none port=D1...
The right code snippet is: int sum = 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: #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE...
The wrong part of the code is: int sum; 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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: int sum; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: int sum = 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: #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: int shifted = num << 32; The right code snippet is: int shifted = num << 2;
'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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none port=D1...
The right code snippet is: int shifted = num << 2;
'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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE...
The wrong part of the code is: int shifted = num << 32; 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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: int shifted = num << 32; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: int shifted = num << 2;
'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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: for(int i=0; i>=0; i++){ // some code here } The right code snippet is: for(int i=0; i<10; i++){ // some code here }
'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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none port=D1...
The right code snippet is: for(int i=0; i<10; i++){ // some code here }
'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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE...
The wrong part of the code is: for(int i=0; i>=0; i++){ // some code here } 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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: for(int i=0; i>=0; i++){ // some code here } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for(int i=0; i<10; i++){ // some code here }
'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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: signed char val = 200; int result = val * 2; The right code snippet is: unsigned char val = 200; int result = val * 2;
'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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none port=D1...
The right code snippet is: unsigned char val = 200; int result = val * 2;
'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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE...
The wrong part of the code is: signed char val = 200; int result = val * 2; 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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: signed char val = 200; int result = val * 2; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: unsigned char val = 200; int result = val * 2;
'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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: for(int i=0; i<5; i++){ // some code here } The right code snippet is: for(int i=0; i<10; i++){ // some code here }
'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=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none port=D1...
The right code snippet is: for(int i=0; i<10; i++){ // some code here }
'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=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE...
The wrong part of the code is: for(int i=0; i<5; i++){ // some code here } 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_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: for(int i=0; i<5; i++){ // some code here } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for(int i=0; i<10; i++){ // some code here }
'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=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: int num = 0; The right code snippet is: int num = 10;
'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=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none port=D1...
The right code snippet is: int num = 10;
'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=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE...
The wrong part of the code is: int num = 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=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: int num = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: int num = 10;
'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=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: memcpy(dest+size, 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: #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE ap_none port=D1...
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: #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 #pragma HLS INTERFACE...
The wrong part of the code is: memcpy(dest+size, 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: #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: memcpy(dest+size, src, size); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memcpy(dest, src, size);
'BUF'