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_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=a #pragma HLS INTERFACE ap_none port=b #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: #pragma HLS interface ap The right code snippet is: #pragma HLS interface bram port=a
'AMS'
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_none port=a #pragma HLS INTERFACE ap_none port=b #pragma HLS INTERFACE ap_none port=su...
The right code snippet is: #pragma HLS interface bram port=a
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=a #pragma HLS INTERFACE ap_none port=b #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS interface ap 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: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=a #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS interface ap The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface bram port=a
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: memory[2][2] = (0b11, temp); The right code snippet is: memory[1][1] = (0b11, temp);
'OOB'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: memory[1][1] = (0b11, temp);
'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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: memory[2][2] = (0b11, temp); 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: memory[2][2] = (0b11, temp); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: memory[1][1] = (0b11, temp);
'OOB'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: ap_uint<2> memory[2][2] = {0}; The right code snippet is: ap_uint<2> memory[2][2];
'INIT'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: ap_uint<2> memory[2][2];
'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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: ap_uint<2> memory[2][2] = {0}; 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: ap_uint<2> memory[2][2] = {0}; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<2> memory[2][2];
'INIT'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: memory[1][1] = (0b11 << 3, temp); The right code snippet is: memory[1][1] = (0b11, temp);
'SHFT'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: memory[1][1] = (0b11, 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: memory[1][1] = (0b11 << 3, 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: memory[1][1] = (0b11 << 3, temp); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: memory[1][1] = (0b11, 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: if (memory[1] == ((temp, temp), (temp, temp))) { The right code snippet is: if (memory[1] != ((temp, temp), (temp, temp))) {
'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_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: if (memory[1] != ((temp, temp), (temp, temp))) {
'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_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: if (memory[1] == ((temp, temp), (temp, temp))) { 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_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: if (memory[1] == ((temp, temp), (temp, temp))) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (memory[1] != ((temp, temp), (temp, temp))) {
'INF'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: memory[1][0] = (ap_uint<2>)-1; The right code snippet is: memory[1][0] = 0b00;
'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_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: memory[1][0] = 0b00;
'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_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: memory[1][0] = (ap_uint<2>)-1; 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_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: memory[1][0] = (ap_uint<2>)-1; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: memory[1][0] = 0b00;
'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_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: memory[0][0] = 0; memory[0][1] = 0; memory[1][0] = 0; memory[1][1] = 0; The right code snippet is: for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { memory[i][j] = 0; } }
'MLU'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { memory[i][j] = 0; } }
'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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: memory[0][0] = 0; memory[0][1] = 0; memory[1][0] = 0; memory[1][1] = 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: memory[0][0] = 0; memory[0][1] = 0; memory[1][0] = 0; memory[1][1] = 0; The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { memory[i][j] = 0; } }
'MLU'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: memory[1][0] = 0; The right code snippet is: memory[1][0] = 0b00;
'ZERO'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: memory[1][0] = 0b00;
'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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: memory[1][0] = 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: memory[1][0] = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: memory[1][0] = 0b00;
'ZERO'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: memory[0] = (memory[1], (0b11, temp)); The right code snippet is: memory[1] = (memory[1], (0b11, temp));
'BUF'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: memory[1] = (memory[1], (0b11, temp));
'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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: memory[0] = (memory[1], (0b11, temp)); 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: memory[0] = (memory[1], (0b11, temp)); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memory[1] = (memory[1], (0b11, temp));
'BUF'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: #pragma HLS array_partition variable=memory cyclic dim=0 The right code snippet is: #pragma HLS array_partition variable=memory complete dim=0
'APT'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: #pragma HLS array_partition variable=memory complete dim=0
'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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: #pragma HLS array_partition variable=memory cyclic dim=0 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: #pragma HLS array_partition variable=memory cyclic dim=0 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=memory complete dim=0
'APT'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: #pragma HLS array_partition variable=memory complete dim=1 The right code snippet is: #pragma HLS array_partition variable=memory complete dim=0
'FND'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: #pragma HLS array_partition variable=memory complete dim=0
'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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: #pragma HLS array_partition variable=memory complete 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: #pragma HLS array_partition variable=memory complete dim=1 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=memory complete dim=0
'FND'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: #pragma HLS array_partition variable=memory complete dim=2 The right code snippet is: #pragma HLS array_partition variable=memory complete dim=0
'DID'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: #pragma HLS array_partition variable=memory complete dim=0
'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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: #pragma HLS array_partition variable=memory complete 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: #pragma HLS array_partition variable=memory complete dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=memory complete dim=0
'DID'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: #pragma HLS dataflow pipeline II=2 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: #pragma HLS dataflow pipeline II=2 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: #pragma HLS dataflow pipeline II=2 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: #pragma HLS interface ap_vld port=temp The right code snippet is: #pragma HLS interface ap_none port=temp
'IDAP'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: #pragma HLS interface ap_none port=temp
'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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: #pragma HLS interface ap_vld port=temp 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: #pragma HLS interface ap_vld port=temp The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_none port=temp
'IDAP'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: #pragma HLS interface m_axi port=memory random The right code snippet is: #pragma HLS interface m_axi port=memory
'RAMB'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: #pragma HLS interface m_axi port=memory
'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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: #pragma HLS interface m_axi port=memory 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: #pragma HLS interface m_axi port=memory random The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=memory
'RAMB'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: #pragma HLS interface bram port=temp The right code snippet is: #pragma HLS interface ap_none port=temp
'SMA'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: #pragma HLS interface ap_none port=temp
'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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: #pragma HLS interface bram port=temp 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: #pragma HLS interface bram port=temp The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_none port=temp
'SMA'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
The wrong part of the code is: #pragma HLS interface ap_memory port=temp The right code snippet is: #pragma HLS interface ap_none port=temp
'AMS'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
The right code snippet is: #pragma HLS interface ap_none port=temp
'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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
The wrong part of the code is: #pragma HLS interface ap_memory port=temp 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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
The wrong part of the code is: #pragma HLS interface ap_memory port=temp The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_none port=temp
'AMS'
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
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: #pragma HLS INTERFACE ap_none port=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_...
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2> temp, ap_uint<...
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include <ap_int.h> void my_module(ap_uint<2...
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=temp #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=pass #include...
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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: gain_t gain_value = gain_t(); // uninitialized variable The right code snippet is: gain_t gain_value;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: gain_t gain_value;
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: gain_t gain_value = gain_t(); // uninitialized variable 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: gain_t gain_value = gain_t(); // uninitialized variable The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: gain_t gain_value;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: case 0x18: return -0x100; // out-of-bounds array access The right code snippet is: case 0x18: return -0x09; // small gain reduction
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: case 0x18: return -0x09; // small gain reduction
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: case 0x18: return -0x100; // out-of-bounds array access 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: case 0x18: return -0x100; // out-of-bounds array access The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: case 0x18: return -0x09; // small gain reduction
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: adjusted_signal = input_signal << gain_value; // bit shift by an out-of-bounds amount The right code snippet is: adjusted_signal = input_signal * gain_value;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: adjusted_signal = input_signal * gain_value;
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: adjusted_signal = input_signal << gain_value; // bit shift 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: adjusted_signal = input_signal << gain_value; // bit shift by an out-of-bounds amount The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: adjusted_signal = input_signal * gain_value;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: for (int i = 0; i < 10; i++) { // incorrect loop termination } The right code snippet is: for (;;) { // infinite loop }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: for (;;) { // infinite loop }
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: for (int i = 0; i < 10; i++) { // incorrect loop termination } 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: for (int i = 0; i < 10; i++) { // incorrect loop termination } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (;;) { // infinite loop }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: adjusted_signal = (int)input_signal * gain_value; // unintended sign extension The right code snippet is: adjusted_signal = input_signal * gain_value;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: adjusted_signal = input_signal * gain_value;
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: adjusted_signal = (int)input_signal * gain_value; // unintended sign extension 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: adjusted_signal = (int)input_signal * gain_value; // unintended sign extension The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: adjusted_signal = input_signal * gain_value;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typed...
The wrong part of the code is: for (int i = 0; i < 8; i++) { // manual loop unrolling with wrong factor adjusted_signal = input_signal * gain_value; } The right code snippet is: // no manual loop unrolling
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data type typedef ap...
The right code snippet is: // no manual loop unrolling
'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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_fixed<16, 1> signal_t; // signal data...
The wrong part of the code is: for (int i = 0; i < 8; i++) { // manual loop unrolling with wrong factor adjusted_signal = input_signal * gain_value; } 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: HLS code translation: ``` #include <ap_fixed.h> const int gain_bits = 8; // number of bits used to represent the gain value typedef ap_...
The wrong part of the code is: for (int i = 0; i < 8; i++) { // manual loop unrolling with wrong factor adjusted_signal = input_signal * gain_value; } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: // no manual loop unrolling
'MLU'