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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. ...
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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. int ...
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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock...
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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int releas...
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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. ...
The wrong part of the code is: #pragma HLS interface ap_ctrl_hs port=return The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. int ...
The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock...
The wrong part of the code is: #pragma HLS interface ap_ctrl_hs port=return 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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int releas...
The wrong part of the code is: #pragma HLS interface ap_ctrl_hs port=return The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. ...
The wrong part of the code is: #pragma HLS interface m_axi port=release The right code snippet is: #pragma HLS interface m_axi port=return
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. int ...
The right code snippet is: #pragma HLS interface m_axi port=return
'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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock...
The wrong part of the code is: #pragma HLS interface m_axi port=release 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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int releas...
The wrong part of the code is: #pragma HLS interface m_axi port=release The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=return
'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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. ...
The wrong part of the code is: #pragma HLS interface bram port=counter The right code snippet is: #pragma HLS interface ap_memory port=counter
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. int ...
The right code snippet is: #pragma HLS interface ap_memory port=counter
'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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock...
The wrong part of the code is: #pragma HLS interface bram port=counter 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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int releas...
The wrong part of the code is: #pragma HLS interface bram port=counter The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_memory port=counter
'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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. ...
The wrong part of the code is: #pragma HLS interface ap_none port=counter The right code snippet is: #pragma HLS interface ap_vld port=counter
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. int ...
The right code snippet is: #pragma HLS interface ap_vld port=counter
'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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock...
The wrong part of the code is: #pragma HLS interface ap_none port=counter 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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int releas...
The wrong part of the code is: #pragma HLS interface ap_none port=counter The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_vld port=counter
'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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. ...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. int ...
The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock...
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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int releas...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. ...
The wrong part of the code is: #pragma HLS unroll for (int i = 0; i < release_time; i++) { The right code snippet is: for (int i = 0; i < release_time; i++) {
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock cycles. int ...
The right code snippet is: for (int i = 0; i < release_time; i++) {
'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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int release_time = 10; // release time in clock...
The wrong part of the code is: #pragma HLS unroll for (int i = 0; i < release_time; i++) { 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 async_reset_release ( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<bool>& release ) { const int releas...
The wrong part of the code is: #pragma HLS unroll for (int i = 0; i < release_time; i++) { The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: for (int i = 0; i < release_time; i++) {
'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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: for (counter = 0; counter <= 4; counter = counter + 1) { // Accessing the array out of bounds a_reg[counter] = A[counter]; } The right code snippet is: for (counter = 0; counter < 4; counter = counter + 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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: for (counter = 0; counter < 4; counter = counter + 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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: for (counter = 0; counter <= 4; counter = counter + 1) { // Accessing the array out of bounds a_reg[counter] = A[counter]; } 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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: for (counter = 0; counter <= 4; counter = counter + 1) { // Accessing the array out of bounds a_reg[counter] = A[counter]; } The high-level-synthesis bug type of the code is: OOB The right code snippet is: for (counter = 0; counter < 4; counter = counter + 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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: ap_uint<4> a_reg; // a_reg is uninitialized ap_uint<8> product_reg; ap_uint<3> counter; The right code snippet is: ap_uint<4> a_reg, b_reg; ap_uint<8> product_reg; ap_uint<3> counter;
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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: ap_uint<4> a_reg, b_reg; ap_uint<8> product_reg; ap_uint<3> counter;
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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: ap_uint<4> a_reg; // a_reg is uninitialized ap_uint<8> product_reg; ap_uint<3> counter; 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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: ap_uint<4> a_reg; // a_reg is uninitialized ap_uint<8> product_reg; ap_uint<3> counter; The high-level-synthesis bug type of the code is: INIT The right code snippet is: ap_uint<4> a_reg, b_reg; ap_uint<8> product_reg; ap_uint<3> counter;
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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: product_reg = product_reg + (a_reg << 10); // Shift amount is out of bounds The right code snippet is: product_reg = product_reg + (a_reg << counter);
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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: product_reg = product_reg + (a_reg << counter);
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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: product_reg = product_reg + (a_reg << 10); // Shift amount is out of bounds 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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: product_reg = product_reg + (a_reg << 10); // Shift amount is out of bounds The high-level-synthesis bug type of the code is: SHFT The right code snippet is: product_reg = product_reg + (a_reg << counter);
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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: for (counter = 0; ; counter = counter + 1) { // Infinite loop The right code snippet is: for (counter = 0; counter < 4; counter = counter + 1) {
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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: for (counter = 0; counter < 4; counter = counter + 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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: for (counter = 0; ; counter = counter + 1) { // Infinite loop 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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: for (counter = 0; ; counter = counter + 1) { // Infinite loop The high-level-synthesis bug type of the code is: INF The right code snippet is: for (counter = 0; counter < 4; counter = counter + 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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: ap_int<4> a_reg, b_reg; // Unintended sign extension The right code snippet is: ap_uint<4> a_reg, b_reg;
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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: ap_uint<4> a_reg, b_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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: ap_int<4> a_reg, b_reg; // 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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: ap_int<4> a_reg, b_reg; // Unintended sign extension The high-level-synthesis bug type of the code is: USE The right code snippet is: ap_uint<4> a_reg, b_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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: for (counter = 0; counter < 2; counter = counter + 1) { // Manually unrolled loop with incorrect factor The right code snippet is: for (counter = 0; counter < 4; counter = counter + 1) {
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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: for (counter = 0; counter < 4; counter = counter + 1) {
MLU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: for (counter = 0; counter < 2; counter = counter + 1) { // Manually unrolled loop with incorrect factor 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 sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: for (counter = 0; counter < 2; counter = counter + 1) { // Manually unrolled loop with incorrect factor The high-level-synthesis bug type of the code is: MLU The right code snippet is: for (counter = 0; counter < 4; counter = counter + 1) {
MLU
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: a_reg = 1; // Variable initialized to nonzero instead of zero The right code snippet is: a_reg = 0;
ZERO
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: a_reg = 0;
ZERO
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: a_reg = 1; // Variable initialized to nonzero instead of zero The high-level-synthesis bug type of the code is: ZERO
ZERO
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: a_reg = 1; // Variable initialized to nonzero instead of zero The high-level-synthesis bug type of the code is: ZERO The right code snippet is: a_reg = 0;
ZERO
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: Y = product_reg.range(3, 0); // Copying from the wrong half of a split buffer The right code snippet is: Y = product_reg;
BUF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: Y = product_reg;
BUF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: Y = product_reg.range(3, 0); // Copying from the wrong half of a split buffer The high-level-synthesis bug type of the code is: BUF
BUF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: Y = product_reg.range(3, 0); // Copying from the wrong half of a split buffer The high-level-synthesis bug type of the code is: BUF The right code snippet is: Y = product_reg;
BUF
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A cyclic factor=2 dim=1 // Incorrect array partition type The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A complete dim=1
APT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A complete dim=1
APT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A cyclic factor=2 dim=1 // Incorrect array partition type The high-level-synthesis bug type of the code is: APT
APT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A cyclic factor=2 dim=1 // Incorrect array partition type The high-level-synthesis bug type of the code is: APT The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A complete dim=1
APT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A cyclic factor=3 dim=1 // Factor not divisible The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A complete dim=1
FND
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A complete dim=1
FND
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A cyclic factor=3 dim=1 // Factor not divisible The high-level-synthesis bug type of the code is: FND
FND
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A cyclic factor=3 dim=1 // Factor not divisible The high-level-synthesis bug type of the code is: FND The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A complete dim=1
FND
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A cyclic dim=2 // Incorrect dimension The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A complete dim=1
DID
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A complete dim=1
DID
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A cyclic dim=2 // Incorrect dimension The high-level-synthesis bug type of the code is: DID
DID
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=A cyclic dim=2 // Incorrect dimension The high-level-synthesis bug type of the code is: DID The right code snippet is: #pragma HLS ARRAY_PARTITION variable=A complete dim=1
DID
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: #pragma HLS DATAFLOW wait // Dataflow position error 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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: #pragma HLS DATAFLOW wait // Dataflow position error The high-level-synthesis bug type of the code is: DFP
DFP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: #pragma HLS DATAFLOW wait // Dataflow position error 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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=A // Incorrect data access pattern The right code snippet is: #pragma HLS INTERFACE ap_none port=A
IDAP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: #pragma HLS INTERFACE ap_none port=A
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=A // Incorrect data access pattern The high-level-synthesis bug type of the code is: IDAP
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=A // Incorrect data access pattern The high-level-synthesis bug type of the code is: IDAP The right code snippet is: #pragma HLS INTERFACE ap_none port=A
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A offset=64 // Random access to m_axi interface The right code snippet is: #pragma HLS INTERFACE m_axi port=A
RAMB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: #pragma HLS INTERFACE m_axi port=A
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A offset=64 // Random access to m_axi interface The high-level-synthesis bug type of the code is: RAMB
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A offset=64 // Random access to m_axi interface The high-level-synthesis bug type of the code is: RAMB The right code snippet is: #pragma HLS INTERFACE m_axi port=A
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: #pragma HLS INTERFACE bram port=A // Scalar value mapped to array interface The right code snippet is: #pragma HLS INTERFACE ap_none port=A
SMA
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE br...
The right code snippet is: #pragma HLS INTERFACE ap_none port=A
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: #pragma HLS INTERFACE bram port=A // Scalar value mapped to array interface The high-level-synthesis bug type of the code is: SMA
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: #pragma HLS INTERFACE bram port=A // Scalar value mapped to array interface The high-level-synthesis bug type of the code is: SMA The right code snippet is: #pragma HLS INTERFACE ap_none port=A
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=A // Array value mapped to scalar interface The right code snippet is: #pragma HLS INTERFACE ap_fifo port=A
AMS
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: #pragma HLS INTERFACE ap_fifo 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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=A // Array value mapped to scalar interface The high-level-synthesis bug type of the code is: AMS
AMS
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=A // Array value mapped to scalar interface The high-level-synthesis bug type of the code is: AMS The right code snippet is: #pragma HLS INTERFACE ap_fifo 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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: #pragma HLS PIPELINE II=2 // Multi-level pipelining 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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: #pragma HLS PIPELINE II=2 // Multi-level pipelining The high-level-synthesis bug type of the code is: MLP
MLP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: #pragma HLS PIPELINE II=2 // Multi-level pipelining 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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFA...
The wrong part of the code is: for (counter = 0; counter < 4; counter = counter + 2) { // Inner loops not fully-unrolled The right code snippet is: for (counter = 0; counter < 4; counter = counter + 1) {
ILNU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap...
The right code snippet is: for (counter = 0; counter < 4; counter = counter + 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: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma ...
The wrong part of the code is: for (counter = 0; counter < 4; counter = counter + 2) { // Inner loops not fully-unrolled The high-level-synthesis bug type of the code is: ILNU
ILNU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void sequential_multiplier(ap_clk, ap_rst, A, B, Y) { #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INT...
The wrong part of the code is: for (counter = 0; counter < 4; counter = counter + 2) { // Inner loops not fully-unrolled The high-level-synthesis bug type of the code is: ILNU The right code snippet is: for (counter = 0; counter < 4; counter = counter + 1) {
ILNU