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 shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=in The right code snippet is: #pragma HLS INTERFACE ap_none port=in
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The right code snippet is: #pragma HLS INTERFACE ap_none port=in
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=in The high-level-synthesis bug type of the code is: 'IDAP'
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HL...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=in The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS INTERFACE ap_none port=in
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=in random The right code snippet is: #pragma HLS INTERFACE m_axi port=in
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The right code snippet is: #pragma HLS INTERFACE m_axi port=in
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=in random 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 shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HL...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=in random The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS INTERFACE m_axi port=in
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The wrong part of the code is: #pragma HLS INTERFACE bram port=in The right code snippet is: #pragma HLS INTERFACE ap_none port=in
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The right code snippet is: #pragma HLS INTERFACE ap_none port=in
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: #pragma HLS INTERFACE bram port=in The high-level-synthesis bug type of the code is: 'SMA'
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HL...
The wrong part of the code is: #pragma HLS INTERFACE bram port=in The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS INTERFACE ap_none port=in
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=in s_axilite=slave The right code snippet is: #pragma HLS INTERFACE ap_none port=in
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
The right code snippet is: #pragma HLS INTERFACE ap_none port=in
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=in s_axilite=slave 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 shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HL...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=in s_axilite=slave The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS INTERFACE ap_none port=in
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The wrong part of the code is: #pragma HLS PIPELINE II=2 Note: These bug types and code snippets are provided for educational purposes only. Do not intentionally insert bugs into your code. 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 shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS ...
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 shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: #pragma HLS PIPELINE II=2 Note: These bug types and code snippets are provided for educational purposes only. Do not intentionally insert bugs into your code. 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 shift_right( ap_uint<4> in, ap_uint<4> &out, bool rst ) { #pragma HLS INTERFACE ap_none port=rst #pragma HL...
The wrong part of the code is: #pragma HLS PIPELINE II=2 Note: These bug types and code snippets are provided for educational purposes only. Do not intentionally insert bugs into your code. 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: ap_uint<10> o_x = rand() % (WIDTH + OBJECT_SIZE); ap_uint<10> o_y = rand() % (HEIGHT + OBJECT_SIZE); The right code snippet is: ap_uint<10> o_x = rand() % (WIDTH - OBJECT_SIZE); ap_uint<10> o_y = rand() % (HEIGHT - OBJECT_SIZE);
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
The right code snippet is: ap_uint<10> o_x = rand() % (WIDTH - OBJECT_SIZE); ap_uint<10> o_y = rand() % (HEIGHT - OBJECT_SIZE);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: ap_uint<10> o_x = rand() % (WIDTH + OBJECT_SIZE); ap_uint<10> o_y = rand() % (HEIGHT + OBJECT_SIZE); The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: ap_uint<10> o_x = rand() % (WIDTH + OBJECT_SIZE); ap_uint<10> o_y = rand() % (HEIGHT + OBJECT_SIZE); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: ap_uint<10> o_x = rand() % (WIDTH - OBJECT_SIZE); ap_uint<10> o_y = rand() % (HEIGHT...
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: ap_uint<16> prescaler; The right code snippet is: static ap_uint<16> prescaler = 0;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
The right code snippet is: static ap_uint<16> prescaler = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: ap_uint<16> prescaler; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: ap_uint<16> prescaler; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<16> prescaler = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: ap_uint<1> object = (x>o_x) & (x<o_x+OBJECT_SIZE << 1) & (y>o_y) & (y<o_y+OBJECT_SIZE); The right code snippet is: ap_uint<1> object = (x>o_x) & (x<o_x+OBJECT_SIZE) & (y>o_y) & (y<o_y+OBJECT_SIZE);
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
The right code snippet is: ap_uint<1> object = (x>o_x) & (x<o_x+OBJECT_SIZE) & (y>o_y) & (y<o_y+OBJECT_SIZE);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: ap_uint<1> object = (x>o_x) & (x<o_x+OBJECT_SIZE << 1) & (y>o_y) & (y<o_y+OBJECT_SIZE); The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: ap_uint<1> object = (x>o_x) & (x<o_x+OBJECT_SIZE << 1) & (y>o_y) & (y<o_y+OBJECT_SIZE); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: ap_uint<1> object = (x>o_x) & (x<o_x+OBJECT_SIZE) & (y>o_y) & (y<o_y+OBJECT_SIZE);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: while(1); The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: ap_int<10> x, y; The right code snippet is: ap_uint<10> x, y;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
The right code snippet is: ap_uint<10> x, y;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: ap_int<10> x, y; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: ap_int<10> x, y; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<10> x, y;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: for (int i = 0; i < 10; i+=2) { if (~ up_switch) { o_y--; } if (~ dn_switch) { o_y++; } if (~ left_switch) { o_x--; } if (~ right_switch) { o_x++; } } 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: for (int i = 0; i < 10; i+=2) { if (~ up_switch) { o_y--; } if (~ dn_switch) { o_y++; } if (~ left_switch) { o_x--; } if (~ right_switch) { o_x++; } } The high-level-synthesis bug type of the code...
'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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: for (int i = 0; i < 10; i+=2) { if (~ up_switch) { o_y--; } if (~ dn_switch) { o_y++; } if (~ left_switch) { o_x--; } if (~ right_switch) { o_x++; } } The high-level-synthesis bug type of the code...
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: static ap_uint<10> o_x = 0; static ap_uint<10> o_y = 0; The right code snippet is: static ap_uint<10> o_x = rand() % (WIDTH - OBJECT_SIZE); static ap_uint<10> o_y = rand() % (HEIGHT - OBJECT_SIZE);
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
The right code snippet is: static ap_uint<10> o_x = rand() % (WIDTH - OBJECT_SIZE); static ap_uint<10> o_y = rand() % (HEIGHT - OBJECT_SIZE);
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: static ap_uint<10> o_x = 0; static ap_uint<10> o_y = 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: static ap_uint<10> o_x = 0; static ap_uint<10> o_y = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static ap_uint<10> o_x = rand() % (WIDTH - OBJECT_SIZE); static ap_uint<10> o_y = rand() % (HEIGHT - OBJECT_SIZE);
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: ap_uint<10> object_buffer[5]; for (int i = 0; i < 10; i++) { object_buffer[i] = i; } o_x = object_buffer[7]; o_y = object_buffer[8]; 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: ap_uint<10> object_buffer[5]; for (int i = 0; i < 10; i++) { object_buffer[i] = i; } o_x = object_buffer[7]; o_y = object_buffer[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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: ap_uint<10> object_buffer[5]; for (int i = 0; i < 10; i++) { object_buffer[i] = i; } o_x = object_buffer[7]; o_y = object_buffer[8]; 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: #pragma HLS array_partition variable=object_buffer cyclic factor=3 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: #pragma HLS array_partition variable=object_buffer 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: #pragma HLS array_partition variable=object_buffer cyclic factor=3 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: #pragma HLS array_partition variable=object_buffer cyclic factor=5 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: #pragma HLS array_partition variable=object_buffer cyclic factor=5 The high-level-synthesis bug type of the code is: 'FND'
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: #pragma HLS array_partition variable=object_buffer cyclic factor=5 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: #pragma HLS array_partition variable=object_buffer cyclic dim=2 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: #pragma HLS array_partition variable=object_buffer cyclic 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: #pragma HLS array_partition variable=object_buffer cyclic dim=2 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: #pragma HLS interface ap_fifo depth=1 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: #pragma HLS interface ap_fifo depth=1 The high-level-synthesis bug type of the code is: 'IDAP'
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: #pragma HLS interface ap_fifo depth=1 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: #pragma HLS interface m_axi port=object_buffer offset=slave bundle=gmem 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: #pragma HLS interface m_axi port=object_buffer offset=slave bundle=gmem 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: #pragma HLS interface m_axi port=object_buffer offset=slave bundle=gmem 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: #pragma HLS interface bram port=object_buffer 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: #pragma HLS interface bram port=object_buffer The high-level-synthesis bug type of the code is: 'SMA'
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: #pragma HLS interface bram port=object_buffer 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: #pragma HLS interface ap_vld port=object_buffer 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: #pragma HLS interface ap_vld port=object_buffer The high-level-synthesis bug type of the code is: 'AMS'
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: #pragma HLS interface ap_vld port=object_buffer 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR...
The wrong part of the code is: #pragma HLS unroll inner loop full 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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> OBJECT_COLOR = 0b...
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: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6> OBJECT_SIZE = 30; const ap_uint<3> O...
The wrong part of the code is: #pragma HLS unroll inner loop full The high-level-synthesis bug type of the code is: 'ILNU'
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include "ap_int.h" const ap_uint<10> WIDTH = 640; const ap_uint<10> HEIGHT = 480; const ap_uint<4> BORDER_WIDTH = 10; const ap_uint<6>...
The wrong part of the code is: #pragma HLS unroll inner loop full 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: ```c++ #include <hls_stream.h> void priority_encoder(hls::stream<int> &in, hls::stream<int> &pos) { #pragma HLS INTERFACE axis port=in #pragma HLS INTERFACE axis port=pos ...
The wrong part of the code is: pos_temp = (in_inv[4]) ? 3 : (in_inv[2]) ? 2 : (in_inv[1]) ? 1 : (in_inv[0]) ? 0 : 0 ; The right code snippet is: pos_temp = (in_inv[3]) ? 3 : (in_inv[2]) ? 2 : (in_inv[1]) ? 1 : (i...
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <hls_stream.h> void priority_encoder(hls::stream<int> &in, hls::stream<int> &pos) { #pragma HLS INTERFACE axis port=in #pragma HLS INTERFACE axis port=pos int ...
The right code snippet is: pos_temp = (in_inv[3]) ? 3 : (in_inv[2]) ? 2 : (in_inv[1]) ? 1 : (in_inv[0]) ? 0 : 0 ;
'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 <hls_stream.h> void priority_encoder(hls::stream<int> &in, hls::stream<int> &pos) { #pragma HLS INTERFACE axis port=in #pragma HLS INTERFACE axis po...
The wrong part of the code is: pos_temp = (in_inv[4]) ? 3 : (in_inv[2]) ? 2 : (in_inv[1]) ? 1 : (in_inv[0]) ? 0 : 0 ; 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 <hls_stream.h> void priority_encoder(hls::stream<int> &in, hls::stream<int> &pos) { #pragma HLS INTERFACE axis port...
The wrong part of the code is: pos_temp = (in_inv[4]) ? 3 : (in_inv[2]) ? 2 : (in_inv[1]) ? 1 : (in_inv[0]) ? 0 : 0 ; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: pos_temp = (in_inv[3]) ? 3 : ...
'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 <hls_stream.h> void priority_encoder(hls::stream<int> &in, hls::stream<int> &pos) { #pragma HLS INTERFACE axis port=in #pragma HLS INTERFACE axis port=pos ...
The wrong part of the code is: int pos_temp = 1; The right code snippet is: int pos_temp;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <hls_stream.h> void priority_encoder(hls::stream<int> &in, hls::stream<int> &pos) { #pragma HLS INTERFACE axis port=in #pragma HLS INTERFACE axis port=pos int ...
The right code snippet is: int pos_temp;
'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 <hls_stream.h> void priority_encoder(hls::stream<int> &in, hls::stream<int> &pos) { #pragma HLS INTERFACE axis port=in #pragma HLS INTERFACE axis po...
The wrong part of the code is: int pos_temp = 1; 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 <hls_stream.h> void priority_encoder(hls::stream<int> &in, hls::stream<int> &pos) { #pragma HLS INTERFACE axis port...
The wrong part of the code is: int pos_temp = 1; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: int pos_temp;
'INIT'