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: ```c++ #include <ap_int.h> void alu(ap_uint<32> a, ap_uint<32> b, ap_uint<5> aluc, ap_uint<32>& result) { switch(aluc) { case 0: // Addition (signed) result = ...
The wrong part of the code is: #pragma HLS interface ap_vld port=array The right code snippet is: #pragma HLS interface axis port=array
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void alu(ap_uint<32> a, ap_uint<32> b, ap_uint<5> aluc, ap_uint<32>& result) { switch(aluc) { case 0: // Addition (signed) result = a + b...
The right code snippet is: #pragma HLS interface axis port=array
'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: ```c++ #include <ap_int.h> void alu(ap_uint<32> a, ap_uint<32> b, ap_uint<5> aluc, ap_uint<32>& result) { switch(aluc) { case 0: // Addition (signed) ...
The wrong part of the code is: #pragma HLS interface ap_vld port=array 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: ```c++ #include <ap_int.h> void alu(ap_uint<32> a, ap_uint<32> b, ap_uint<5> aluc, ap_uint<32>& result) { switch(aluc) { ca...
The wrong part of the code is: #pragma HLS interface ap_vld port=array The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface axis port=array
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ #include <ap_int.h> void alu(ap_uint<32> a, ap_uint<32> b, ap_uint<5> aluc, ap_uint<32>& result) { switch(aluc) { case 0: // Addition (signed) result = ...
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: ```c++ #include <ap_int.h> void alu(ap_uint<32> a, ap_uint<32> b, ap_uint<5> aluc, ap_uint<32>& result) { switch(aluc) { case 0: // Addition (signed) result = a + b...
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: ```c++ #include <ap_int.h> void alu(ap_uint<32> a, ap_uint<32> b, ap_uint<5> aluc, ap_uint<32>& result) { switch(aluc) { case 0: // Addition (signed) ...
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: ```c++ #include <ap_int.h> void alu(ap_uint<32> a, ap_uint<32> b, ap_uint<5> aluc, ap_uint<32>& result) { switch(aluc) { ca...
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: ```c++ #include <ap_int.h> void alu(ap_uint<32> a, ap_uint<32> b, ap_uint<5> aluc, ap_uint<32>& result) { switch(aluc) { case 0: // Addition (signed) result = ...
The wrong part of the code is: #pragma HLS unroll factor=1 The right code snippet is: #pragma HLS unroll factor=2
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ #include <ap_int.h> void alu(ap_uint<32> a, ap_uint<32> b, ap_uint<5> aluc, ap_uint<32>& result) { switch(aluc) { case 0: // Addition (signed) result = a + b...
The right code snippet is: #pragma HLS unroll factor=2
'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: ```c++ #include <ap_int.h> void alu(ap_uint<32> a, ap_uint<32> b, ap_uint<5> aluc, ap_uint<32>& result) { switch(aluc) { case 0: // Addition (signed) ...
The wrong part of the code is: #pragma HLS unroll factor=1 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: ```c++ #include <ap_int.h> void alu(ap_uint<32> a, ap_uint<32> b, ap_uint<5> aluc, ap_uint<32>& result) { switch(aluc) { ca...
The wrong part of the code is: #pragma HLS unroll factor=1 The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: #pragma HLS unroll factor=2
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1_N void my_module(bool Y, bool A1...
The wrong part of the code is: bool VPWR; Bug_type: USE The right code snippet is: bool VPWR = true;
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=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1_N void my_module(bool Y, bool A1, boo...
The right code snippet is: bool VPWR = true;
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=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1_N void my_module(bool...
The wrong part of the code is: bool VPWR; Bug_type: USE 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=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: bool VPWR; Bug_type: USE The high-level-synthesis bug type of the code is: INIT The right code snippet is: bool VPWR = true;
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: shift_reg = (shift_reg.range(6, 1), TE); The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: shift_reg = (shift_reg.range(6, 1), TE); 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: shift_reg = (shift_reg.range(6, 1), TE); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: static ap_uint<7> shift_reg; The right code snippet is: static ap_uint<7> shift_reg = 0;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: static ap_uint<7> shift_reg = 0;
'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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: static ap_uint<7> shift_reg; 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: static ap_uint<7> shift_reg; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<7> shift_reg = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: shift_reg = (shift_reg.range(6, 2), TE); The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: shift_reg = (shift_reg.range(6, 2), TE); 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: shift_reg = (shift_reg.range(6, 2), TE); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: while (EN) { shift_reg = (shift_reg.range(5, 0), TE); } The right code snippet is: if (EN) { shift_reg = (shift_reg.range(5, 0), TE); }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: if (EN) { shift_reg = (shift_reg.range(5, 0), TE); }
'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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: while (EN) { shift_reg = (shift_reg.range(5, 0), TE); } 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: while (EN) { shift_reg = (shift_reg.range(5, 0), TE); } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (EN) { shift_reg = (shift_reg.range(5, 0), TE); }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: ENCLK = (int)EN; The right code snippet is: ENCLK = EN;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: ENCLK = EN;
'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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: ENCLK = (int)EN; 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: ENCLK = (int)EN; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ENCLK = EN;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: shift_reg = (shift_reg.range(5, 0), TE); shift_reg = (shift_reg.range(5, 0), TE); The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: shift_reg = (shift_reg.range(5, 0), TE); shift_reg = (shift_reg.range(5, 0), TE); 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: shift_reg = (shift_reg.range(5, 0), TE); shift_reg = (shift_reg.range(5, 0), TE); The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: static ap_uint<7> shift_reg = 1; The right code snippet is: static ap_uint<7> shift_reg = 0;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: static ap_uint<7> shift_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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: static ap_uint<7> shift_reg = 1; 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: static ap_uint<7> shift_reg = 1; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static ap_uint<7> shift_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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: shift_reg = (shift_reg.range(5, 0), TE); shift_reg = (shift_reg.range(5, 0), TE); The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: shift_reg = (shift_reg.range(5, 0), TE); shift_reg = (shift_reg.range(5, 0), TE); 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: shift_reg = (shift_reg.range(5, 0), TE); shift_reg = (shift_reg.range(5, 0), TE); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg cyclic dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg cyclic 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg cyclic dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=2 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=2 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=2 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=3 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=3 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=3 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: #pragma HLS DATAFLOW pipeline 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: #pragma HLS DATAFLOW pipeline 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS DATAFLOW pipeline 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_fifo port=CLK #pragma HL...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=CLK The right code snippet is: #pragma HLS INTERFACE axis port=CLK
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_fifo port=CLK #pragma HLS INT...
The right code snippet is: #pragma HLS INTERFACE axis port=CLK
'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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_fifo port=CLK ...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=CLK 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=CLK The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS INTERFACE axis port=CLK
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=shift_reg offset=slave The right code snippet is: #pragma HLS INTERFACE m_axi port=shift_reg
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: #pragma HLS INTERFACE m_axi port=shift_reg
'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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=shift_reg offset=slave 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=shift_reg offset=slave The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS INTERFACE m_axi port=shift_reg
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: #pragma HLS INTERFACE bram port=EN The right code snippet is: #pragma HLS INTERFACE axis port=EN
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: #pragma HLS INTERFACE axis port=EN
'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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: #pragma HLS INTERFACE bram port=EN 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS INTERFACE bram port=EN The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS INTERFACE axis port=EN
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=EN The right code snippet is: #pragma HLS INTERFACE axis port=EN
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: #pragma HLS INTERFACE axis port=EN
'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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=EN 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: #pragma HLS INTERFACE ap_none port=EN The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS INTERFACE axis port=EN
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS I...
The wrong part of the code is: for (int i = 0; i < 5; i++) { shift_reg = (shift_reg.range(5, 0), TE); } The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #pragma HLS INTERF...
The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=CLK #p...
The wrong part of the code is: for (int i = 0; i < 5; i++) { shift_reg = (shift_reg.range(5, 0), TE); } 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: ```c++ void shift_register_gated(bool CLK, bool EN, bool TE, bool& ENCLK) { #pragma HLS INTERFACE ap_ctrl_none port=return #prag...
The wrong part of the code is: for (int i = 0; i < 5; i++) { shift_reg = (shift_reg.range(5, 0), TE); } The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: shift_reg = (shift_reg.range(5, 0), TE);
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=comp_in #pragma HLS INTERFACE ap_none port=ena #pragma HLS INTERFACE ap...
The wrong part of the code is: case 16: bcd_out = 0; break; The right code snippet is: case 15: bcd_out = 0; break;
'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_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=comp_in #pragma HLS INTERFACE ap_none port=ena #pragma HLS INTERFACE ap_none...
The right code snippet is: case 15: bcd_out = 0; break;
'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_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=comp_in #pragma HLS INTERFACE ap_none port=ena #pragma HLS I...
The wrong part of the code is: case 16: bcd_out = 0; break; 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_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=comp_in #pragma HLS INT...
The wrong part of the code is: case 16: bcd_out = 0; break; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: case 15: bcd_out = 0; break;
'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_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=comp_in #pragma HLS INTERFACE ap_none port=ena #pragma HLS INTERFACE ap...
The wrong part of the code is: ap_uint<4> gray_count; The right code snippet is: static ap_uint<4> gray_count;
'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_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=comp_in #pragma HLS INTERFACE ap_none port=ena #pragma HLS INTERFACE ap_none...
The right code snippet is: static ap_uint<4> gray_count;
'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_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=comp_in #pragma HLS INTERFACE ap_none port=ena #pragma HLS I...
The wrong part of the code is: ap_uint<4> gray_count; 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_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=comp_in #pragma HLS INT...
The wrong part of the code is: ap_uint<4> gray_count; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<4> gray_count;
'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_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=comp_in #pragma HLS INTERFACE ap_none port=ena #pragma HLS INTERFACE ap...
The wrong part of the code is: gray_count<<=5; The right code snippet is: gray_count++;
'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_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=comp_in #pragma HLS INTERFACE ap_none port=ena #pragma HLS INTERFACE ap_none...
The right code snippet is: gray_count++;
'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_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=comp_in #pragma HLS INTERFACE ap_none port=ena #pragma HLS I...
The wrong part of the code is: gray_count<<=5; 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_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=comp_in #pragma HLS INT...
The wrong part of the code is: gray_count<<=5; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: gray_count++;
'SHFT'