instruction
stringlengths
139
357k
response
stringlengths
36
4.54k
buggy_type
stringclasses
745 values
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=clk #pragma HLS INTERFACE ap_none port=en #pragma HLS INTERFACE ap_none port=te #pragma HLS INTERFACE ap_none port=enclk #include "ap_tlu.h" void c...
The wrong part of the code is: #pragma HLS unroll factor=2 The right code snippet is: #pragma HLS unroll
'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_none port=clk #pragma HLS INTERFACE ap_none port=en #pragma HLS INTERFACE ap_none port=te #pragma HLS INTERFACE ap_none port=enclk #include "ap_tlu.h" void clock_...
The right code snippet is: #pragma HLS unroll
'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_none port=clk #pragma HLS INTERFACE ap_none port=en #pragma HLS INTERFACE ap_none port=te #pragma HLS INTERFACE ap_none port=enclk #include "ap_tlu...
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_none port=clk #pragma HLS INTERFACE ap_none port=en #pragma HLS INTERFACE ap_none port=te #pragma HLS INTERFACE...
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 unroll
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: j = d + 1; The right code snippet is: j = d;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: j = d;
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: j = d + 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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: j = d + 1; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: j = d;
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: bool j, k; The right code snippet is: static bool j, k;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: static bool j, k;
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: bool j, k; 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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: bool j, k; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static bool j, k;
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: q = ~k << 2 ^ q_temp; The right code snippet is: q = ~k ^ q_temp;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: q = ~k ^ q_temp;
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: q = ~k << 2 ^ q_temp; 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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: q = ~k << 2 ^ q_temp; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: q = ~k ^ q_temp;
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: while(j){ The right code snippet is: while(1){
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: while(1){
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: while(j){ 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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: while(j){ The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: while(1){
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: q = (signed)~k ^ q_temp; The right code snippet is: q = ~k ^ q_temp;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: q = ~k ^ q_temp;
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: q = (signed)~k ^ q_temp; 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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: q = (signed)~k ^ q_temp; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: q = ~k ^ q_temp;
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: for(int i=0; i<10; i+=2){ The right code snippet is: for(int i=0; i<10; i++){
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: for(int i=0; i<10; i++){
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: for(int i=0; i<10; i+=2){ The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for(int i=0; i<10; i++){
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: static bool j = 0, k = 0; The right code snippet is: static bool j, k;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: static bool j, k;
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: static bool j = 0, k = 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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: static bool j = 0, k = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static bool j, k;
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: memcpy(bufferA, &bufferB[size], size); The right code snippet is: memcpy(bufferA, bufferB, size);
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: memcpy(bufferA, bufferB, size);
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: memcpy(bufferA, &bufferB[size], size); 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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: memcpy(bufferA, &bufferB[size], size); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memcpy(bufferA, bufferB, size);
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: #pragma HLS array_partition variable=q cyclic The right code snippet is: #pragma HLS array_partition variable=q complete
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: #pragma HLS array_partition variable=q complete
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: #pragma HLS array_partition variable=q cyclic The high-level-synthesis bug type of the code is: 'APT'
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS array_partition variable=q cyclic The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=q complete
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: #pragma HLS array_partition variable=q cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=q cyclic factor=2
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: #pragma HLS array_partition variable=q cyclic factor=2
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: #pragma HLS array_partition variable=q cyclic factor=3 The high-level-synthesis bug type of the code is: 'FND'
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS array_partition variable=q cyclic factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=q cyclic factor=2
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: #pragma HLS array_partition variable=q cyclic factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=q cyclic factor=2 dim=1
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: #pragma HLS array_partition variable=q cyclic factor=2 dim=1
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: #pragma HLS array_partition variable=q cyclic factor=2 dim=2 The high-level-synthesis bug type of the code is: 'DID'
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS array_partition variable=q cyclic factor=2 dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=q cyclic factor=2 dim=1
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: #pragma HLS dataflow region The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: #pragma HLS dataflow region The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS dataflow region The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: #pragma HLS interface ap_vld port=q The right code snippet is: #pragma HLS interface ap_none port=q
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: #pragma HLS interface ap_none port=q
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: #pragma HLS interface ap_vld port=q 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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS interface ap_vld port=q The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_none port=q
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: #pragma HLS interface m_axi port=q random The right code snippet is: #pragma HLS interface m_axi port=q
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: #pragma HLS interface m_axi port=q
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: #pragma HLS interface m_axi port=q 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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS interface m_axi port=q random The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=q
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: #pragma HLS interface bram port=q The right code snippet is: #pragma HLS interface ap_memory port=q
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: #pragma HLS interface ap_memory port=q
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: #pragma HLS interface bram port=q 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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS interface bram port=q The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_memory port=q
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: #pragma HLS interface ap_none port=q The right code snippet is: #pragma HLS interface axis port=q
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: #pragma HLS interface axis port=q
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
The wrong part of the code is: #pragma HLS interface ap_none port=q 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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS interface ap_none port=q The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface axis port=q
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline II=1
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: #pragma HLS pipeline II=1
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #...
The wrong part of the code is: #pragma HLS unroll factor=2 The right code snippet is: #pragma HLS unroll
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis port=d #pragm...
The right code snippet is: #pragma HLS unroll
'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 d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=clk #pragma HLS INTERFACE axis p...
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: ``` void d_to_jk_ff (bool clk, bool d, bool &q) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port...
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 unroll
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: dec_out[4] = ~(in[0] & in[1]); // Accessing out-of-bounds index of dec_out array The right code snippet is: dec_out[0] = ~(in[0] & in[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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: dec_out[0] = ~(in[0] & in[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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: dec_out[4] = ~(in[0] & in[1]); // Accessing out-of-bounds index of dec_out array 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: dec_out[4] = ~(in[0] & in[1]); // Accessing out-of-bounds index of dec_out array The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: dec_out[0] = ~(in[0] & in[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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: ap_uint<4> dec_out; // dec_out is not initialized The right code snippet is: ap_uint<4> dec_out;
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: ap_uint<4> dec_out;
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: ap_uint<4> dec_out; // dec_out is not initialized 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: ap_uint<4> dec_out; // dec_out is not initialized The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<4> dec_out;
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: addsub_out = a << 5; // Shifting a by an out-of-bounds amount The right code snippet is: addsub_out = a + b;
'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> void top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: addsub_out = a + 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: ``` #include <ap_int.h> void top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: addsub_out = a << 5; // Shifting a by an out-of-bounds amount 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> void top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: addsub_out = a << 5; // Shifting a by an out-of-bounds amount The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: addsub_out = a + 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: ``` #include <ap_int.h> void top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // Incorrect loop termination condition dec_out[i] = 0; } The right code snippet is: for (int i = 0; i < 4; i++) { dec_out[i] = 0; }
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: for (int i = 0; i < 4; i++) { dec_out[i] = 0; }
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // Incorrect loop termination condition dec_out[i] = 0; } 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { // Incorrect loop termination condition dec_out[i] = 0; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 4; i++) { dec_out[i] = 0; }
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: unsigned int addsub_overflow; // Unintended sign extension when assigning to addsub_overflow The right code snippet is: bool addsub_overflow;
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: bool addsub_overflow;
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: unsigned int addsub_overflow; // Unintended sign extension when assigning to addsub_overflow 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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: unsigned int addsub_overflow; // Unintended sign extension when assigning to addsub_overflow The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: bool addsub_overflow;
'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 top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #p...
The wrong part of the code is: for (int i = 0; i < 4; i+=3) { // Incorrect manual loop unrolling factor dec_out[i] = 0; dec_out[i+1] = 0; dec_out[i+2] = 0; } The right code snippet is: // No manual loop unrolling in this code
'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> void top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The right code snippet is: // No manual loop unrolling in this code
'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> void top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #pragma HLS INTERFACE ap_ctrl_none port=re...
The wrong part of the code is: for (int i = 0; i < 4; i+=3) { // Incorrect manual loop unrolling factor dec_out[i] = 0; dec_out[i+1] = 0; dec_out[i+2] = 0; } 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: ``` #include <ap_int.h> void top_module(ap_uint<2> in, ap_uint<4> a, ap_uint<4> b, bool sub, ap_uint<4> &q, bool &overflow) { #prag...
The wrong part of the code is: for (int i = 0; i < 4; i+=3) { // Incorrect manual loop unrolling factor dec_out[i] = 0; dec_out[i+1] = 0; dec_out[i+2] = 0; } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: // No manual loop unrolling in this code
'MLU'