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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
The wrong part of the code is: while (true) { The right code snippet is: if (a < b + cin) {
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The right code snippet is: if (a < b + cin) {
'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: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: while (true) { 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: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
The wrong part of the code is: while (true) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (a < b + cin) {
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
The wrong part of the code is: result = (int)a - (int)b - (int)cin; The right code snippet is: result = a - b - cin;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The right code snippet is: result = a - b - cin;
'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: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: result = (int)a - (int)b - (int)cin; 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: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
The wrong part of the code is: result = (int)a - (int)b - (int)cin; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: result = a - b - cin;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
The wrong part of the code is: for (int i = 0; i <= 10; i+=2) { The right code snippet is: for (int i = 0; i < 10; i++) {
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The right code snippet is: for (int i = 0; i < 10; 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: for (int i = 0; i <= 10; i+=2) { 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
The wrong part of the code is: for (int i = 0; i <= 10; i+=2) { The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 10; 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
The wrong part of the code is: bool overflow = 0; The right code snippet is: bool overflow = false;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The right code snippet is: bool overflow = false;
'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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: bool overflow = 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: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
The wrong part of the code is: bool overflow = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: bool overflow = false;
'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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
The wrong part of the code is: memcpy(buffer2, buffer1 + sizeof(buffer1)/2, sizeof(buffer1)); The right code snippet is: memcpy(buffer2, buffer1, sizeof(buffer1));
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The right code snippet is: memcpy(buffer2, buffer1, sizeof(buffer1));
'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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: memcpy(buffer2, buffer1 + sizeof(buffer1)/2, sizeof(buffer1)); 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
The wrong part of the code is: memcpy(buffer2, buffer1 + sizeof(buffer1)/2, sizeof(buffer1)); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memcpy(buffer2, buffer1, sizeof(buffer1));
'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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
The wrong part of the code is: #pragma HLS array_partition variable=result cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=result complete
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The right code snippet is: #pragma HLS array_partition variable=result 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS array_partition variable=result cyclic factor=3 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
The wrong part of the code is: #pragma HLS array_partition variable=result cyclic factor=3 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=result 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
The wrong part of the code is: #pragma HLS array_partition variable=result cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=result cyclic factor=2
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The right code snippet is: #pragma HLS array_partition variable=result cyclic factor=2
'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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS array_partition variable=result 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: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
The wrong part of the code is: #pragma HLS array_partition variable=result cyclic factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=result cyclic factor=2
'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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
The wrong part of the code is: #pragma HLS array_partition variable=result cyclic factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=result cyclic factor=2 dim=1
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The right code snippet is: #pragma HLS array_partition variable=result cyclic factor=2 dim=1
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS array_partition variable=result cyclic factor=2 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
The wrong part of the code is: #pragma HLS array_partition variable=result cyclic factor=2 dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=result cyclic factor=2 dim=1
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
The wrong part of the code is: #pragma HLS interface ap_none 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS interface ap_none 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
The wrong part of the code is: #pragma HLS interface ap_none 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
The wrong part of the code is: #pragma HLS interface m_axi port=result randomize The right code snippet is: #pragma HLS interface m_axi port=result
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The right code snippet is: #pragma HLS interface m_axi port=result
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS interface m_axi port=result randomize 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
The wrong part of the code is: #pragma HLS interface m_axi port=result randomize The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=result
'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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
The wrong part of the code is: #pragma HLS interface bram port=control The right code snippet is: #pragma HLS interface ap_none port=control
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The right code snippet is: #pragma HLS interface ap_none port=control
'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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: #pragma HLS interface bram port=control 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
The wrong part of the code is: #pragma HLS interface bram port=control The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_none port=control
'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 add_sub( ap_uint<4> a[2]; ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: ap_uint<4> a[2]; The right code snippet is: ap_uint<4> a,
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void add_sub( ap_uint<4> a[2]; ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HL...
The right code snippet is: ap_uint<4> a,
'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 add_sub( ap_uint<4> a[2]; ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=r...
The wrong part of the code is: ap_uint<4> a[2]; 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 add_sub( ap_uint<4> a[2]; ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pra...
The wrong part of the code is: ap_uint<4> a[2]; The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: ap_uint<4> a,
'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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
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: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
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: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
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: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
The wrong part of the code is: for (int i = 0; i < 10; i+=2) { The right code snippet is: for (int i = 0; i < 10; i++) {
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The right code snippet is: for (int i = 0; i < 10; 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 add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma HLS INTERFACE ap_ctrl_none port=retu...
The wrong part of the code is: for (int i = 0; i < 10; i+=2) { The high-level-synthesis bug type of the code is: 'ILNU'
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void add_sub( ap_uint<4> a, ap_uint<4> b, bool cin, bool control, ap_uint<4>& result, bool& overflow ) { #pragma...
The wrong part of the code is: for (int i = 0; i < 10; i+=2) { The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: for (int i = 0; i < 10; 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: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: static int Q_sync[4]; The right code snippet is: static int Q_sync[4] = {0, 0, 0, 0};
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_none po...
The right code snippet is: static int Q_sync[4] = {0, 0, 0, 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: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE...
The wrong part of the code is: static int Q_sync[4]; 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: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE a...
The wrong part of the code is: static int Q_sync[4]; The high-level-synthesis bug type of the code is: INIT The right code snippet is: static int Q_sync[4] = {0, 0, 0, 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: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: D[i] = Q_sync[i+1]; The right code snippet is: D[i] = Q_sync[i];
OOB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_none po...
The right code snippet is: D[i] = Q_sync[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: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE...
The wrong part of the code is: D[i] = Q_sync[i+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: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE a...
The wrong part of the code is: D[i] = Q_sync[i+1]; The high-level-synthesis bug type of the code is: OOB The right code snippet is: D[i] = Q_sync[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: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { The right code snippet is: for (int i = 0; i < 4; i++) {
INF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_none po...
The right code snippet is: for (int i = 0; i < 4; i++) {
INF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { The high-level-synthesis bug type of the code is: INF
INF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE a...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { The high-level-synthesis bug type of the code is: INF The right code snippet is: for (int i = 0; i < 4; i++) {
INF
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: D[i] = (unsigned int)Q_sync[i]; The right code snippet is: D[i] = Q_sync[i];
USE
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_none po...
The right code snippet is: D[i] = Q_sync[i];
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: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE...
The wrong part of the code is: D[i] = (unsigned int)Q_sync[i]; 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: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE a...
The wrong part of the code is: D[i] = (unsigned int)Q_sync[i]; The high-level-synthesis bug type of the code is: USE The right code snippet is: D[i] = Q_sync[i];
USE
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: for (int i = 0; i < 4; i++) { The right code snippet is: #pragma HLS UNROLL
MLU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_none po...
The right code snippet is: #pragma HLS UNROLL
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 synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE...
The wrong part of the code is: for (int i = 0; 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 synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE a...
The wrong part of the code is: for (int i = 0; i < 4; i++) { The high-level-synthesis bug type of the code is: MLU The right code snippet is: #pragma HLS UNROLL
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 synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: static int Q_sync[4] = {1, 1, 1, 1}; The right code snippet is: static int Q_sync[4] = {0, 0, 0, 0};
ZERO
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_none po...
The right code snippet is: static int Q_sync[4] = {0, 0, 0, 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: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE...
The wrong part of the code is: static int Q_sync[4] = {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 synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE a...
The wrong part of the code is: static int Q_sync[4] = {1, 1, 1, 1}; The high-level-synthesis bug type of the code is: ZERO The right code snippet is: static int Q_sync[4] = {0, 0, 0, 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: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: Q_sync[i] = Q[i+2]; The right code snippet is: Q_sync[i] = Q[i];
BUF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_none po...
The right code snippet is: Q_sync[i] = Q[i];
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 synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE...
The wrong part of the code is: Q_sync[i] = Q[i+2]; The high-level-synthesis bug type of the code is: BUF
BUF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE a...
The wrong part of the code is: Q_sync[i] = Q[i+2]; The high-level-synthesis bug type of the code is: BUF The right code snippet is: Q_sync[i] = Q[i];
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 synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: #pragma HLS array_partition variable=Q_sync cyclic The right code snippet is: #pragma HLS array_partition variable=Q_sync complete
APT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_none po...
The right code snippet is: #pragma HLS array_partition variable=Q_sync 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 synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS array_partition variable=Q_sync 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 synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=Q_sync cyclic The high-level-synthesis bug type of the code is: APT The right code snippet is: #pragma HLS array_partition variable=Q_sync 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 synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: #pragma HLS array_partition variable=Q block factor=3 The right code snippet is: #pragma HLS array_partition variable=Q complete
FND
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_none po...
The right code snippet is: #pragma HLS array_partition variable=Q 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 synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS array_partition variable=Q block 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: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=Q block factor=3 The high-level-synthesis bug type of the code is: FND The right code snippet is: #pragma HLS array_partition variable=Q 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 synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_no...
The wrong part of the code is: #pragma HLS array_partition variable=Q dim=2 complete The right code snippet is: #pragma HLS array_partition variable=Q complete
DID
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE ap_ctrl_none po...
The right code snippet is: #pragma HLS array_partition variable=Q 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 synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=Q #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS array_partition variable=Q dim=2 complete 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 synchronizer_ff (int D[4], const int Q[4], bool m_aclk, bool AR) { #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=Q dim=2 complete The high-level-synthesis bug type of the code is: DID The right code snippet is: #pragma HLS array_partition variable=Q complete
DID