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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
The wrong part of the code is: while(0){ //infinite loop } The right code snippet is: while(1){ //infinite loop }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
The right code snippet is: while(1){ //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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #p...
The wrong part of the code is: while(0){ //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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
The wrong part of the code is: while(0){ //infinite loop } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: while(1){ //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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
The wrong part of the code is: signed bool select; The right code snippet is: bool select;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
The right code snippet is: bool select;
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #p...
The wrong part of the code is: signed bool select; 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
The wrong part of the code is: signed bool select; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: bool select;
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
The wrong part of the code is: for (int i = 0; i < 11; i++) { //loop body } The right code snippet is: for (int i = 0; i < 10; i++) { //loop body }
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
The right code snippet is: for (int i = 0; i < 10; i++) { //loop body }
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #p...
The wrong part of the code is: for (int i = 0; i < 11; i++) { //loop body } 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
The wrong part of the code is: for (int i = 0; i < 11; i++) { //loop body } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 10; i++) { //loop body }
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
The wrong part of the code is: ap_uint<8> q_ff = 0; The right code snippet is: ap_uint<8> q_ff;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
The right code snippet is: ap_uint<8> q_ff;
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #p...
The wrong part of the code is: ap_uint<8> q_ff = 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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
The wrong part of the code is: ap_uint<8> q_ff = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_uint<8> q_ff;
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
The wrong part of the code is: mux2to1(select, counter_out, q, select_out); The right code snippet is: mux2to1(select, counter_out, q_ff, select_out);
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
The right code snippet is: mux2to1(select, counter_out, q_ff, select_out);
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #p...
The wrong part of the code is: mux2to1(select, counter_out, q, select_out); 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
The wrong part of the code is: mux2to1(select, counter_out, q, select_out); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: mux2to1(select, counter_out, q_ff, select_out);
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
The wrong part of the code is: #pragma HLS array_partition variable=select_out block factor=2 dim=1 The right code snippet is: #pragma HLS array_partition variable=select_out cyclic factor=2 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
The right code snippet is: #pragma HLS array_partition variable=select_out cyclic factor=2 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #p...
The wrong part of the code is: #pragma HLS array_partition variable=select_out block factor=2 dim=1 The high-level-synthesis bug type of the code is: 'APT'
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
The wrong part of the code is: #pragma HLS array_partition variable=select_out block factor=2 dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=select_out cyclic factor=2 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
The wrong part of the code is: #pragma HLS array_partition variable=select_out cyclic factor=3 dim=1 The right code snippet is: #pragma HLS array_partition variable=select_out cyclic factor=2 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
The right code snippet is: #pragma HLS array_partition variable=select_out cyclic factor=2 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #p...
The wrong part of the code is: #pragma HLS array_partition variable=select_out cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: 'FND'
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
The wrong part of the code is: #pragma HLS array_partition variable=select_out cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=select_out cyclic factor=2 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
The wrong part of the code is: #pragma HLS array_partition variable=select_out cyclic factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=select_out 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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
The right code snippet is: #pragma HLS array_partition variable=select_out 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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #p...
The wrong part of the code is: #pragma HLS array_partition variable=select_out 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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
The wrong part of the code is: #pragma HLS array_partition variable=select_out 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=select_out 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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
The wrong part of the code is: #pragma HLS dataflow init 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #p...
The wrong part of the code is: #pragma HLS dataflow init 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
The wrong part of the code is: #pragma HLS dataflow init 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
The wrong part of the code is: #pragma HLS interface ap_vld 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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #p...
The wrong part of the code is: #pragma HLS interface ap_vld 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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
The wrong part of the code is: #pragma HLS interface ap_vld 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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
The wrong part of the code is: #pragma HLS interface m_axi port=select_out offset=1024 The right code snippet is: #pragma HLS interface m_axi port=select_out offset=slave
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
The right code snippet is: #pragma HLS interface m_axi port=select_out offset=slave
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #p...
The wrong part of the code is: #pragma HLS interface m_axi port=select_out offset=1024 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
The wrong part of the code is: #pragma HLS interface m_axi port=select_out offset=1024 The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=select_out offset=slave
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
The wrong part of the code is: #pragma HLS interface ap_memory port=select_out The right code snippet is: #pragma HLS interface ap_none port=select_out
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
The right code snippet is: #pragma HLS interface ap_none port=select_out
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #p...
The wrong part of the code is: #pragma HLS interface ap_memory port=select_out 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
The wrong part of the code is: #pragma HLS interface ap_memory port=select_out The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_none port=select_out
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
The wrong part of the code is: #pragma HLS interface ap_none port=select_out The right code snippet is: #pragma HLS interface ap_memory port=select_out
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
The right code snippet is: #pragma HLS interface ap_memory port=select_out
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #p...
The wrong part of the code is: #pragma HLS interface ap_none port=select_out 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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
The wrong part of the code is: #pragma HLS interface ap_none port=select_out The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_memory port=select_out
'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 <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS I...
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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #pragma HLS INTERF...
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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, hls::stream<ap_uint<8> >& q ) { #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: #include <hls_math.h> void top_module( hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<8> >& d, h...
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register...
The wrong part of the code is: bool sr[d+1]; The right code snippet is: bool sr[d];
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register with...
The right code snippet is: bool sr[d];
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shi...
The wrong part of the code is: bool sr[d+1]; 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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clo...
The wrong part of the code is: bool sr[d+1]; The high-level-synthesis bug type of the code is: INIT The right code snippet is: bool sr[d];
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register...
The wrong part of the code is: sr[d] = in_val; The right code snippet is: sr[d-1] = in_val;
OOB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register with...
The right code snippet is: sr[d-1] = in_val;
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shi...
The wrong part of the code is: sr[d] = in_val; 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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clo...
The wrong part of the code is: sr[d] = in_val; The high-level-synthesis bug type of the code is: OOB The right code snippet is: sr[d-1] = in_val;
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register...
The wrong part of the code is: while (1) { The right code snippet is: while (true) {
INF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register with...
The right code snippet is: while (true) {
INF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shi...
The wrong part of the code is: while (1) { 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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clo...
The wrong part of the code is: while (1) { The high-level-synthesis bug type of the code is: INF The right code snippet is: while (true) {
INF
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register...
The wrong part of the code is: for (int i = 0; i <= d-1; i++) { The right code snippet is: for (int i = 0; i < d-1; i++) {
ILNU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register with...
The right code snippet is: for (int i = 0; i < d-1; 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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shi...
The wrong part of the code is: for (int i = 0; i <= d-1; 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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clo...
The wrong part of the code is: for (int i = 0; i <= d-1; i++) { The high-level-synthesis bug type of the code is: ILNU The right code snippet is: for (int i = 0; i < d-1; 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: ``` void delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register...
The wrong part of the code is: sr[i] = sr[i+2]; The right code snippet is: sr[i] = sr[i+1];
SHFT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register with...
The right code snippet is: sr[i] = sr[i+1];
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shi...
The wrong part of the code is: sr[i] = sr[i+2]; 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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clo...
The wrong part of the code is: sr[i] = sr[i+2]; The high-level-synthesis bug type of the code is: SHFT The right code snippet is: sr[i] = sr[i+1];
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const unsigned int d = 4; // number of clock cycles of delay // Define a shift...
The wrong part of the code is: const unsigned int d = 4; The right code snippet is: const int d = 4;
USE
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const unsigned int d = 4; // number of clock cycles of delay // Define a shift regi...
The right code snippet is: const int d = 4;
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const unsigned int d = 4; // number of clock cycles of delay // Def...
The wrong part of the code is: const unsigned int d = 4; 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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const unsigned int d = 4; // numb...
The wrong part of the code is: const unsigned int d = 4; The high-level-synthesis bug type of the code is: USE The right code snippet is: const int d = 4;
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register...
The wrong part of the code is: sr[i] = 0; The right code snippet is: sr[i] = false;
ZERO
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register with...
The right code snippet is: sr[i] = false;
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shi...
The wrong part of the code is: sr[i] = 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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clo...
The wrong part of the code is: sr[i] = 0; The high-level-synthesis bug type of the code is: ZERO The right code snippet is: sr[i] = false;
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register...
The wrong part of the code is: in_val = out.read(); The right code snippet is: in_val = in.read();
BUF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register with...
The right code snippet is: in_val = in.read();
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shi...
The wrong part of the code is: in_val = out.read(); 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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clo...
The wrong part of the code is: in_val = out.read(); The high-level-synthesis bug type of the code is: BUF The right code snippet is: in_val = in.read();
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register...
The wrong part of the code is: #pragma HLS array_partition variable=sr block factor=2 The right code snippet is: #pragma HLS array_partition variable=sr cyclic factor=2
APT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register with...
The right code snippet is: #pragma HLS array_partition variable=sr cyclic factor=2
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shi...
The wrong part of the code is: #pragma HLS array_partition variable=sr block factor=2 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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clo...
The wrong part of the code is: #pragma HLS array_partition variable=sr block factor=2 The high-level-synthesis bug type of the code is: APT The right code snippet is: #pragma HLS array_partition variable=sr cyclic factor=2
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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register...
The wrong part of the code is: #pragma HLS array_partition variable=sr cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=sr 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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shift register with...
The right code snippet is: #pragma HLS array_partition variable=sr 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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clock cycles of delay // Define a shi...
The wrong part of the code is: #pragma HLS array_partition variable=sr 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 delay_line( hls::stream<bool>& clk, hls::stream<bool>& in, hls::stream<bool>& out ) { const int d = 4; // number of clo...
The wrong part of the code is: #pragma HLS array_partition variable=sr cyclic factor=3 The high-level-synthesis bug type of the code is: FND The right code snippet is: #pragma HLS array_partition variable=sr cyclic factor=2
FND