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 #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS INTERFACE bram port=shift_reg The right code snippet is: #pragma HLS INTERFACE ap_none port=shift_reg
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS INTERFACE ap_none port=shift_reg
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: #pragma HLS INTERFACE bram port=shift_reg The high-level-synthesis bug type of the code is: 'SMA'
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS INTERFACE bram port=shift_reg The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS INTERFACE ap_none port=shift_reg
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS INTERFACE ap_array port=shift_reg The right code snippet is: #pragma HLS INTERFACE ap_none port=shift_reg
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS INTERFACE ap_none port=shift_reg
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: #pragma HLS INTERFACE ap_array port=shift_reg The high-level-synthesis bug type of the code is: 'AMS'
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS INTERFACE ap_array port=shift_reg The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS INTERFACE ap_none port=shift_reg
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS PIPELINE II=2 The right code snippet is: #pragma HLS PIPELINE II=1
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS PIPELINE II=1
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: #pragma HLS PIPELINE II=2 The high-level-synthesis bug type of the code is: 'MLP'
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS PIPELINE II=2 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: #pragma HLS PIPELINE II=1
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: for (int i = 0; i < 3; i++) { shift_reg = (shift_reg.range(6, 0), 0); } The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL shift_reg = (shift_reg.range(6, 0), 0); }
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL shift_reg = (shift_reg.range(6, 0), 0); }
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: for (int i = 0; i < 3; i++) { shift_reg = (shift_reg.range(6, 0), 0); } The high-level-synthesis bug type of the code is: 'ILNU'
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: for (int i = 0; i < 3; i++) { shift_reg = (shift_reg.range(6, 0), 0); } The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL shift_reg = (shift_reg.range(6, 0), 0); }
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: o2 = vec[3]; The right code snippet is: o2 = vec[2];
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: o2 = vec[2];
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: o2 = vec[3]; 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: o2 = vec[3]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: o2 = vec[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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: static ap_uint<100> rot_data; The right code snippet is: static ap_uint<100> rot_data = 0;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: static ap_uint<100> rot_data = 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: static ap_uint<100> rot_data; 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: static ap_uint<100> rot_data; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<100> rot_data = 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: rot_data = (rot_data[2], rot_data.range(99,1)); The right code snippet is: rot_data = (rot_data[0], rot_data.range(99,1));
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: rot_data = (rot_data[0], rot_data.range(99,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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: rot_data = (rot_data[2], rot_data.range(99,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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: rot_data = (rot_data[2], rot_data.range(99,1)); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: rot_data = (rot_data[0], rot_data.range(99,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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: while(1); The right code snippet is: None
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: None
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
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: None
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: outv = (o2, o1, (unsigned int)o0); The right code snippet is: outv = (o2, o1, o0);
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: outv = (o2, o1, o0);
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: outv = (o2, o1, (unsigned int)o0); 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: outv = (o2, o1, (unsigned int)o0); The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: outv = (o2, o1, o0);
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: for (int i = 0; i < 2; i++) { if (ena == 1) rot_data = (rot_data.range(98,0), rot_data[99]); else if (ena == 2) rot_data = (rot_data[0], rot_data.range(99,1)); } The right code snippet is: None
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: None
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: for (int i = 0; i < 2; i++) { if (ena == 1) rot_data = (rot_data.range(98,0), rot_data[99]); else if (ena == 2) rot_data = (rot_data[0], rot_data.range(99,1)); } 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: for (int i = 0; i < 2; i++) { if (ena == 1) rot_data = (rot_data.range(98,0), rot_data[99]); else if (ena == 2) rot_data = (rot_data[0], rot_data.range(99,1)); } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: None
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: static ap_uint<100> rot_data(0); The right code snippet is: static ap_uint<100> rot_data = 0;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: static ap_uint<100> rot_data = 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: static ap_uint<100> rot_data(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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: static ap_uint<100> rot_data(0); The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static ap_uint<100> rot_data = 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: q = rot_data | (o2, o0, o1); The right code snippet is: None
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: None
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: q = rot_data | (o2, o0, o1); 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: q = rot_data | (o2, o0, o1); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: None
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: #pragma HLS array_partition variable=vec cyclic factor=3 dim=2 The right code snippet is: None
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: None
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: #pragma HLS array_partition variable=vec cyclic factor=3 dim=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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: #pragma HLS array_partition variable=vec cyclic factor=3 dim=2 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: None
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: #pragma HLS array_partition variable=vec cyclic factor=4 dim=1 The right code snippet is: None
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: None
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: #pragma HLS array_partition variable=vec cyclic factor=4 dim=1 The high-level-synthesis bug type of the code is: 'FND'
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: #pragma HLS array_partition variable=vec cyclic factor=4 dim=1 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: None
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: #pragma HLS array_partition variable=vec cyclic factor=3 dim=1 The right code snippet is: None
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: None
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: #pragma HLS array_partition variable=vec cyclic factor=3 dim=1 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: #pragma HLS array_partition variable=vec cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: None
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: #pragma HLS dataflow The right code snippet is: None
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: None
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: #pragma HLS dataflow 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: #pragma HLS dataflow The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: None
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: #pragma HLS interface ap_none register port=vec The right code snippet is: None
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: None
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: #pragma HLS interface ap_none register port=vec 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: #pragma HLS interface ap_none register port=vec The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: None
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: #pragma HLS interface m_axi port=vec offset=slave The right code snippet is: None
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: None
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: #pragma HLS interface m_axi port=vec offset=slave 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: #pragma HLS interface m_axi port=vec offset=slave The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: None
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: #pragma HLS interface ap_fifo port=vec The right code snippet is: None
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: None
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: #pragma HLS interface ap_fifo port=vec 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: #pragma HLS interface ap_fifo port=vec The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: None
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: #pragma HLS interface ap_vld port=o2 The right code snippet is: None
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: None
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: #pragma HLS interface ap_vld port=o2 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: #pragma HLS interface ap_vld port=o2 The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: None
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: None
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: None
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
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: None
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uin...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop The right code snippet is: None
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> &o1, ap_uint<1> ...
The right code snippet is: None
'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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<3> &outv, ap_uint<1> &o2, ap_uint<1> ...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop 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: ```c++ #include <ap_int.h> void top_module(ap_uint<1> clk, ap_uint<1> load, ap_uint<2> ena, ap_uint<100> data, ap_uint<3> vec, ap_uint<...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: None
'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_clk port=clka #pragma HLS INTERFACE ap_clk port=clkb #pragma HLS INTERFACE ap_none port=addra #pragma HLS INTERFACE ap_none port=addrb #pragma HLS INTERFACE ap...
The wrong part of the code is: if (wea) memory[addra+65536] = dina; The right code snippet is: if (wea) memory[addra] = dina;
'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=clka #pragma HLS INTERFACE ap_clk port=clkb #pragma HLS INTERFACE ap_none port=addra #pragma HLS INTERFACE ap_none port=addrb #pragma HLS INTERFACE ap_none...
The right code snippet is: if (wea) memory[addra] = dina;
'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=clka #pragma HLS INTERFACE ap_clk port=clkb #pragma HLS INTERFACE ap_none port=addra #pragma HLS INTERFACE ap_none port=addrb #pragma HLS I...
The wrong part of the code is: if (wea) memory[addra+65536] = dina; 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=clka #pragma HLS INTERFACE ap_clk port=clkb #pragma HLS INTERFACE ap_none port=addra #pragma HLS INTER...
The wrong part of the code is: if (wea) memory[addra+65536] = dina; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: if (wea) memory[addra] = dina;
'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=clka #pragma HLS INTERFACE ap_clk port=clkb #pragma HLS INTERFACE ap_none port=addra #pragma HLS INTERFACE ap_none port=addrb #pragma HLS INTERFACE ap...
The wrong part of the code is: mem_t memory; The right code snippet is: mem_t memory[65536];
'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=clka #pragma HLS INTERFACE ap_clk port=clkb #pragma HLS INTERFACE ap_none port=addra #pragma HLS INTERFACE ap_none port=addrb #pragma HLS INTERFACE ap_none...
The right code snippet is: mem_t memory[65536];
'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=clka #pragma HLS INTERFACE ap_clk port=clkb #pragma HLS INTERFACE ap_none port=addra #pragma HLS INTERFACE ap_none port=addrb #pragma HLS I...
The wrong part of the code is: mem_t memory; 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=clka #pragma HLS INTERFACE ap_clk port=clkb #pragma HLS INTERFACE ap_none port=addra #pragma HLS INTER...
The wrong part of the code is: mem_t memory; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: mem_t memory[65536];
'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=clka #pragma HLS INTERFACE ap_clk port=clkb #pragma HLS INTERFACE ap_none port=addra #pragma HLS INTERFACE ap_none port=addrb #pragma HLS INTERFACE ap...
The wrong part of the code is: doutb = memory[addrb << 17]; The right code snippet is: doutb = memory[addrb];
'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=clka #pragma HLS INTERFACE ap_clk port=clkb #pragma HLS INTERFACE ap_none port=addra #pragma HLS INTERFACE ap_none port=addrb #pragma HLS INTERFACE ap_none...
The right code snippet is: doutb = memory[addrb];
'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=clka #pragma HLS INTERFACE ap_clk port=clkb #pragma HLS INTERFACE ap_none port=addra #pragma HLS INTERFACE ap_none port=addrb #pragma HLS I...
The wrong part of the code is: doutb = memory[addrb << 17]; The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clka #pragma HLS INTERFACE ap_clk port=clkb #pragma HLS INTERFACE ap_none port=addra #pragma HLS INTER...
The wrong part of the code is: doutb = memory[addrb << 17]; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: doutb = memory[addrb];
'SHFT'