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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a[-1]; } else { out_always = b; } } ```
The wrong part of the code is: out_always = a[-1]; The right code snippet is: out_always = a;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a[-1]; } else { out_always = b; } } ``` The wrong part of the...
The right code snippet is: out_always = a;
'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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a[-1]; } else { out_always = b; } } ```
The wrong part of the code is: out_always = a[-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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a[-1]; } else { ...
The wrong part of the code is: out_always = a[-1]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: out_always = a;
'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 mux_2to1(bool a, bool b, bool sel, bool& out_always = true;) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: bool& out_always = true; The right code snippet is: bool& out_always
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always = true;) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of...
The right code snippet is: bool& out_always
'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 mux_2to1(bool a, bool b, bool sel, bool& out_always = true;) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: bool& out_always = true; 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 mux_2to1(bool a, bool b, bool sel, bool& out_always = true;) { if(sel == false) { out_always = a; } else { ...
The wrong part of the code is: bool& out_always = true; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: bool& out_always
'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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b << 10; } } ```
The wrong part of the code is: out_always = b << 10; The right code snippet is: out_always = b;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b << 10; } } ``` The wrong part of t...
The right code snippet is: out_always = b;
'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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b << 10; } } ```
The wrong part of the code is: out_always = b << 10; 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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
The wrong part of the code is: out_always = b << 10; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: out_always = b;
'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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == true) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: if(sel == true) { The right code snippet is: if(sel == false) {
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == true) { out_always = a; } else { out_always = b; } } ``` The wrong part of the code...
The right code snippet is: if(sel == false) {
'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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == true) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: if(sel == 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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == true) { out_always = a; } else { out_a...
The wrong part of the code is: if(sel == true) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if(sel == false) {
'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 mux_2to1(int a, int b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: int a, int b The right code snippet is: bool a, bool b
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void mux_2to1(int a, int b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the code ...
The right code snippet is: bool a, bool b
'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 mux_2to1(int a, int b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: int a, int b 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 mux_2to1(int a, int b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_al...
The wrong part of the code is: int a, int b The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: bool a, bool b
'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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: for(int i=0; i<10; i+=2) { 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the cod...
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
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: None
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: bool& out_always = 0; The right code snippet is: None
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the cod...
The right code snippet is: None
'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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: bool& out_always = 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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
The wrong part of the code is: bool& out_always = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: None
'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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: out_always = buffer2; 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the cod...
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: out_always = buffer2; 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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
The wrong part of the code is: out_always = buffer2; 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS array_partition variable=out_always cyclic factor=3 dim=1 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the cod...
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS array_partition variable=out_always cyclic factor=3 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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
The wrong part of the code is: #pragma HLS array_partition variable=out_always cyclic factor=3 dim=1 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS array_partition variable=out_always cyclic factor=7 dim=1 The right code snippet is: None
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the cod...
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS array_partition variable=out_always cyclic factor=7 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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
The wrong part of the code is: #pragma HLS array_partition variable=out_always cyclic factor=7 dim=1 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: None
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS array_partition variable=out_always cyclic factor=3 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the cod...
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS array_partition variable=out_always cyclic factor=3 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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
The wrong part of the code is: #pragma HLS array_partition variable=out_always cyclic factor=3 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS dataflow loop_flatten 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the cod...
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS dataflow loop_flatten 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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
The wrong part of the code is: #pragma HLS dataflow loop_flatten 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS interface ap_fifo depth=5 port=out_always 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the cod...
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS interface ap_fifo depth=5 port=out_always 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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
The wrong part of the code is: #pragma HLS interface ap_fifo depth=5 port=out_always 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS interface m_axi port=out_always 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the cod...
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS interface m_axi port=out_always 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
The wrong part of the code is: #pragma HLS interface m_axi port=out_always 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS interface bram port=out_always 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the cod...
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS interface bram port=out_always 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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
The wrong part of the code is: #pragma HLS interface bram port=out_always 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS interface ap_vld port=out_always 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the cod...
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS interface ap_vld port=out_always 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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
The wrong part of the code is: #pragma HLS interface ap_vld port=out_always 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the cod...
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop=True 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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ``` The wrong part of the cod...
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: ``` void mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_always = b; } } ```
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop=True 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 mux_2to1(bool a, bool b, bool sel, bool& out_always) { if(sel == false) { out_always = a; } else { out_...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop=True The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: None
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=select #pragma HLS INTER...
The wrong part of the code is: count_out_complement = (unsigned char)count_reg; The right code snippet is: count_out_complement = ~count_reg;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=select #pragma HLS INTERFACE ...
The right code snippet is: count_out_complement = ~count_reg;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=select #pragm...
The wrong part of the code is: count_out_complement = (unsigned char)count_reg; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS...
The wrong part of the code is: count_out_complement = (unsigned char)count_reg; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: count_out_complement = ~count_reg;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=select #pragma HLS INTER...
The wrong part of the code is: #pragma HLS UNROLL factor=2 The right code snippet is: #pragma HLS PIPELINE II=1
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=select #pragma HLS INTERFACE ...
The right code snippet is: #pragma HLS PIPELINE II=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: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=select #pragm...
The wrong part of the code is: #pragma HLS UNROLL factor=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: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS...
The wrong part of the code is: #pragma HLS UNROLL factor=2 The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: #pragma HLS PIPELINE II=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: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=select #pragma HLS INTER...
The wrong part of the code is: while(1) { count_reg = 16'h0000; count_out = 4'h0; } The right code snippet is: if (reset) { count_reg = 16'h0000; count_out = 4'h0; } else { count_reg = adder_out; count_out = count_out_select; }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=select #pragma HLS INTERFACE ...
The right code snippet is: if (reset) { count_reg = 16'h0000; count_out = 4'h0; } else { count_reg = adder_out; count_out = count_out_select; }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=select #pragm...
The wrong part of the code is: while(1) { count_reg = 16'h0000; count_out = 4'h0; } The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS...
The wrong part of the code is: while(1) { count_reg = 16'h0000; count_out = 4'h0; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (reset) { count_reg = 16'h0000; count_out = 4'h0; } else { count_reg = adder_out; count_out = count_out_s...
'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 <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The wrong part of the code is: for (int i = 0; i < 5; i++) { #pragma HLS UNROLL S1[i] = ~(A[i] & B[i]); } The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL S1[i] = ~(A[i] & B[i]); }
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Cout ) { #pragma HLS INTERFACE ap_none port=A #prag...
The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL S1[i] = ~(A[i] & B[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: ``` #include <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Cout ) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: for (int i = 0; i < 5; i++) { #pragma HLS UNROLL S1[i] = ~(A[i] & B[i]); } The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Co...
The wrong part of the code is: for (int i = 0; i < 5; i++) { #pragma HLS UNROLL S1[i] = ~(A[i] & B[i]); } The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL S1[i] = ~(A[i] & B[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: ``` #include <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The wrong part of the code is: ap_uint<4> S1, S2, S3, S4; ap_uint<4> S5; bool C1, C2, C3; The right code snippet is: ap_uint<4> S1, S2, S3, S4; bool C1, C2, C3;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Cout ) { #pragma HLS INTERFACE ap_none port=A #prag...
The right code snippet is: ap_uint<4> S1, S2, S3, S4; bool C1, C2, C3;
'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 <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Cout ) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: ap_uint<4> S1, S2, S3, S4; ap_uint<4> S5; bool C1, C2, C3; 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 <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Co...
The wrong part of the code is: ap_uint<4> S1, S2, S3, S4; ap_uint<4> S5; bool C1, C2, C3; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<4> S1, S2, S3, S4; bool C1, C2, C3;
'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 <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The wrong part of the code is: S = ~(S5 + (C1 << 5) + Cout); The right code snippet is: S = ~(S5 + (C1 << 1) + Cout);
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Cout ) { #pragma HLS INTERFACE ap_none port=A #prag...
The right code snippet is: S = ~(S5 + (C1 << 1) + Cout);
'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 <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Cout ) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: S = ~(S5 + (C1 << 5) + Cout); 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 <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Co...
The wrong part of the code is: S = ~(S5 + (C1 << 5) + Cout); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: S = ~(S5 + (C1 << 1) + Cout);
'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 <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Cout ) { #pragma HLS INTERFACE ap_none port=A ...
The wrong part of the code is: for (int i = 0; i >= 0; i--) { #pragma HLS UNROLL S4[i] = ~(A[i] & B[i] & S3[i]); } The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL S4[i] = ~(A[i] & B[i] & S3[i]); }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Cout ) { #pragma HLS INTERFACE ap_none port=A #prag...
The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL S4[i] = ~(A[i] & B[i] & S3[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: ``` #include <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Cout ) { #pragma HLS INTERFACE ap_non...
The wrong part of the code is: for (int i = 0; i >= 0; i--) { #pragma HLS UNROLL S4[i] = ~(A[i] & B[i] & S3[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: ``` #include <hls_math.h> void four_bit_adder( const ap_uint<4> A, const ap_uint<4> B, const bool Cin, ap_uint<4> &S, bool &Co...
The wrong part of the code is: for (int i = 0; i >= 0; i--) { #pragma HLS UNROLL S4[i] = ~(A[i] & B[i] & S3[i]); } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL S4[i] = ~(A[i] & B[i] & S3[i]); }
'INF'