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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: ready_random.write(ready_counter[5] << 10 ^ ready_counter[4]); The right code snippet is: ready_random.write(ready_counter[5] ^ ready_counter[4]);
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: ready_random.write(ready_counter[5] ^ ready_counter[4]);
'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: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: ready_random.write(ready_counter[5] << 10 ^ ready_counter[4]); 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: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: ready_random.write(ready_counter[5] << 10 ^ ready_counter[4]); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: ready_random.write(ready_counter[5] ^ ready_counter[4]);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: while (1+1 == 2) { The right code snippet is: while (true) {
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: while (true) {
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: while (1+1 == 2) { 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: while (1+1 == 2) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: while (true) {
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: int WAIT_val; int nreset_val; int clk_val; The right code snippet is: bool WAIT_val; bool nreset_val; bool clk_val;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: bool WAIT_val; bool nreset_val; bool clk_val;
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: int WAIT_val; int nreset_val; int clk_val; 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: int WAIT_val; int nreset_val; int clk_val; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: bool WAIT_val; bool nreset_val; bool clk_val;
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: ready_counter[0] = ready_counter[1]; for (int i = 1; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; } The right code snippet is: for (int i = 0; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; }
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: for (int i = 0; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; }
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: ready_counter[0] = ready_counter[1]; for (int i = 1; i < 9; i++) { ready_counter[i] = ready_counter[i+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: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: ready_counter[0] = ready_counter[1]; for (int i = 1; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; ...
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: bool ready_counter[9] = {0}; The right code snippet is: bool ready_counter[9];
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: bool ready_counter[9];
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: bool ready_counter[9] = {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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: bool ready_counter[9] = {0}; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: bool ready_counter[9];
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: ready_random.write(ready_counter[4] ^ ready_counter[3]); The right code snippet is: ready_random.write(ready_counter[5] ^ ready_counter[4]);
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: ready_random.write(ready_counter[5] ^ ready_counter[4]);
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: ready_random.write(ready_counter[4] ^ ready_counter[3]); 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: ready_random.write(ready_counter[4] ^ ready_counter[3]); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: ready_random.write(ready_counter[5] ^ ready_counter[4]);
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=ready_counter cyclic factor=2 dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=ready_counter complete dim=1
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=ready_counter complete dim=1
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=ready_counter cyclic factor=2 dim=1 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=ready_counter cyclic factor=2 dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=ready_counter complete dim=1
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=ready_counter cyclic factor=3 dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=ready_counter complete dim=1
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=ready_counter complete dim=1
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=ready_counter cyclic factor=3 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: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=ready_counter cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=ready_counter complete dim=1
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=ready_counter cyclic factor=4 dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=ready_counter complete 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=ready_counter complete 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=ready_counter cyclic factor=4 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: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=ready_counter cyclic factor=4 dim=1 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=ready_counter complete 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: #pragma HLS dataflow wait(-1) 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS dataflow wait(-1) The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: #pragma HLS dataflow wait(-1) 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=ready_random The right code snippet is: #pragma HLS INTERFACE axis port=ready_random
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: #pragma HLS INTERFACE axis port=ready_random
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=ready_random 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=ready_random The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS INTERFACE axis port=ready_random
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=ready_random The right code snippet is: #pragma HLS INTERFACE axis port=ready_random
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: #pragma HLS INTERFACE axis port=ready_random
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=ready_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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=ready_random The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS INTERFACE axis port=ready_random
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: #pragma HLS INTERFACE bram port=ready_random The right code snippet is: #pragma HLS INTERFACE axis port=ready_random
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: #pragma HLS INTERFACE axis port=ready_random
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS INTERFACE bram port=ready_random 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: #pragma HLS INTERFACE bram port=ready_random The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS INTERFACE axis port=ready_random
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=ready_random The right code snippet is: #pragma HLS INTERFACE axis port=ready_random
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: #pragma HLS INTERFACE axis port=ready_random
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=ready_random 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=ready_random The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS INTERFACE axis port=ready_random
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: #pragma HLS unroll for (int i = 0; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; } The right code snippet is: for (int i = 0; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; }
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: for (int i = 0; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; }
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: #pragma HLS unroll for (int i = 0; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; } The high-level-synthesis bug type of the code is: 'ILNU'
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: #pragma HLS unroll for (int i = 0; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; } The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: for (int i = 0; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; }
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[2]; if (CLK_EN) { if (s...
The wrong part of the code is: CLK_EN = EN & state[2]; The right code snippet is: CLK_EN = EN & state[1];
OOB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[2]; if (CLK_EN) { if (state ...
The right code snippet is: CLK_EN = EN & state[1];
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[2]; if (CLK_EN) ...
The wrong part of the code is: CLK_EN = EN & state[2]; The high-level-synthesis bug type of the code is: OOB
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CL...
The wrong part of the code is: CLK_EN = EN & state[2]; The high-level-synthesis bug type of the code is: OOB The right code snippet is: CLK_EN = EN & state[1];
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) { if (state...
The wrong part of the code is: ap_uint<2> state; The right code snippet is: ap_uint<2> state = 0;
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) { if (state == 1...
The right code snippet is: ap_uint<2> state = 0;
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) { ...
The wrong part of the code is: ap_uint<2> state; The high-level-synthesis bug type of the code is: INIT
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state; bool CLK_EN; CLK_EN...
The wrong part of the code is: ap_uint<2> state; The high-level-synthesis bug type of the code is: INIT The right code snippet is: ap_uint<2> state = 0;
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) { if (s...
The wrong part of the code is: case 2: // TEST ENABLED if (TE) { state = 1; // ENABLED } break; The right code snippet is: case 2: // TEST ENABLED if (!TE) { state = 1; // ENABLED } break;
INF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) { if (state ...
The right code snippet is: case 2: // TEST ENABLED if (!TE) { state = 1; // ENABLED } break;
INF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) ...
The wrong part of the code is: case 2: // TEST ENABLED if (TE) { state = 1; // ENABLED } break; The high-level-synthesis bug type of the code is: INF
INF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CL...
The wrong part of the code is: case 2: // TEST ENABLED if (TE) { state = 1; // ENABLED } break; The high-level-synthesis bug type of the code is: INF The right code snippet is: case 2: // TEST ENABLED if (!TE) { state = 1; // ENABLED } break;
INF
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; int CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) { if (st...
The wrong part of the code is: int CLK_EN; The right code snippet is: bool CLK_EN;
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> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; int CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) { if (state =...
The right code snippet is: bool CLK_EN;
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> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; int CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) {...
The wrong part of the code is: int CLK_EN; 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> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; int CLK_EN; CLK...
The wrong part of the code is: int CLK_EN; The high-level-synthesis bug type of the code is: USE The right code snippet is: bool CLK_EN;
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> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN_half; CLK_EN = EN & state[1]; if (CLK_EN) { ...
The wrong part of the code is: bool CLK_EN_half; The right code snippet is: bool CLK_EN;
BUF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN_half; CLK_EN = EN & state[1]; if (CLK_EN) { if (s...
The right code snippet is: bool CLK_EN;
BUF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN_half; CLK_EN = EN & state[1]; if (CLK...
The wrong part of the code is: bool CLK_EN_half; The high-level-synthesis bug type of the code is: BUF
BUF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN_half; ...
The wrong part of the code is: bool CLK_EN_half; The high-level-synthesis bug type of the code is: BUF The right code snippet is: bool CLK_EN;
BUF
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) { if (s...
The wrong part of the code is: #pragma HLS array_partition variable=state cyclic dim=1 The right code snippet is: #pragma HLS array_partition variable=state complete dim=1
APT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) { if (state ...
The right code snippet is: #pragma HLS array_partition variable=state complete dim=1
APT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) ...
The wrong part of the code is: #pragma HLS array_partition variable=state cyclic dim=1 The high-level-synthesis bug type of the code is: APT
APT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CL...
The wrong part of the code is: #pragma HLS array_partition variable=state cyclic dim=1 The high-level-synthesis bug type of the code is: APT The right code snippet is: #pragma HLS array_partition variable=state complete dim=1
APT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) { if (s...
The wrong part of the code is: #pragma HLS array_partition variable=state complete dim=2 The right code snippet is: #pragma HLS array_partition variable=state complete dim=1
FND
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) { if (state ...
The right code snippet is: #pragma HLS array_partition variable=state complete dim=1
FND
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) ...
The wrong part of the code is: #pragma HLS array_partition variable=state complete dim=2 The high-level-synthesis bug type of the code is: FND
FND
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CL...
The wrong part of the code is: #pragma HLS array_partition variable=state complete dim=2 The high-level-synthesis bug type of the code is: FND The right code snippet is: #pragma HLS array_partition variable=state complete dim=1
FND
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) { if (s...
The wrong part of the code is: #pragma HLS array_partition variable=state complete dim=3 The right code snippet is: #pragma HLS array_partition variable=state complete dim=1
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> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) { if (state ...
The right code snippet is: #pragma HLS array_partition variable=state complete 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: #include <ap_int.h> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK_EN) ...
The wrong part of the code is: #pragma HLS array_partition variable=state complete dim=3 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> void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CL...
The wrong part of the code is: #pragma HLS array_partition variable=state complete dim=3 The high-level-synthesis bug type of the code is: DID The right code snippet is: #pragma HLS array_partition variable=state complete 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: #include <ap_int.h> #pragma HLS dataflow void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if...
The wrong part of the code is: #pragma HLS dataflow void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { The right code snippet is: void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) {
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> #pragma HLS dataflow void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & state[1]; if (CLK...
The right code snippet is: void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) {
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> #pragma HLS dataflow void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; bool CLK_EN; CLK_EN = EN & stat...
The wrong part of the code is: #pragma HLS dataflow void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { 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> #pragma HLS dataflow void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { ap_uint<2> state = 0; ...
The wrong part of the code is: #pragma HLS dataflow void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) { The high-level-synthesis bug type of the code is: DFP The right code snippet is: void clock_gate( bool CLK, bool EN, bool TE, bool &ENCLK ) {
DFP