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 carry_lookahead_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: carry_co_direct(co[1], o[2], p[1], co[2] + 5, 0); The right code snippet is: carry_co_direct(co[1], o[2], p[1], co[2], 0);
'SHFT'
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 carry_lookahead_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_ctr...
The right code snippet is: carry_co_direct(co[1], o[2], p[1], co[2], 0);
'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 <hls_math.h> void carry_lookahead_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS ...
The wrong part of the code is: carry_co_direct(co[1], o[2], p[1], co[2] + 5, 0); 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 <hls_math.h> void carry_lookahead_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, ap_uint<4>& S, ...
The wrong part of the code is: carry_co_direct(co[1], o[2], p[1], co[2] + 5, 0); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: carry_co_direct(co[1], o[2], p[1], co[2], 0);
'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 <hls_math.h> void carry_lookahead_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: while(1) { carry_co_direct(co[2], o[3], p[2], co[3], 0); } The right code snippet is: carry_co_direct(co[2], o[3], p[2], co[3], 0);
'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 carry_lookahead_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_ctr...
The right code snippet is: carry_co_direct(co[2], o[3], p[2], co[3], 0);
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <hls_math.h> void carry_lookahead_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS ...
The wrong part of the code is: while(1) { carry_co_direct(co[2], o[3], p[2], co[3], 0); } The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <hls_math.h> void carry_lookahead_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, ap_uint<4>& S, ...
The wrong part of the code is: while(1) { carry_co_direct(co[2], o[3], p[2], co[3], 0); } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: carry_co_direct(co[2], o[3], p[2], co[3], 0);
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <hls_math.h> void carry_lookahead_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS PIPELINE II=2 carry_co_direct(co[3], o[4], p[3], g[3], Cout, 1, co[4]); The right code snippet is: carry_co_direct(co[3], o[4], p[3], g[3], Cout, 1, co[4]);
'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 carry_lookahead_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS INTERFACE ap_ctr...
The right code snippet is: carry_co_direct(co[3], o[4], p[3], g[3], Cout, 1, co[4]);
'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 carry_lookahead_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, ap_uint<4>& S, ap_uint<1>& Cout ) { #pragma HLS ...
The wrong part of the code is: #pragma HLS PIPELINE II=2 carry_co_direct(co[3], o[4], p[3], g[3], Cout, 1, co[4]); 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 carry_lookahead_adder( const ap_uint<4> A, const ap_uint<4> B, const ap_uint<1> Cin, ap_uint<4>& S, ...
The wrong part of the code is: #pragma HLS PIPELINE II=2 carry_co_direct(co[3], o[4], p[3], g[3], Cout, 1, co[4]); The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: carry_co_direct(co[3], o[4], p[3], g[3], Cout, 1, co[4]);
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma HLS INTERF...
The wrong part of the code is: out = in_4; The right code snippet is: out = in_3;
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma HLS INTERFACE a...
The right code snippet is: out = in_3;
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma...
The wrong part of the code is: out = in_4; 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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HL...
The wrong part of the code is: out = in_4; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: out = in_3;
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma HLS INTERF...
The wrong part of the code is: ap_uint<8> SHIFTED_DATA = 0; The right code snippet is: ap_uint<8> SHIFTED_DATA;
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma HLS INTERFACE a...
The right code snippet is: ap_uint<8> SHIFTED_DATA;
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma...
The wrong part of the code is: ap_uint<8> SHIFTED_DATA = 0; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HL...
The wrong part of the code is: ap_uint<8> SHIFTED_DATA = 0; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<8> SHIFTED_DATA;
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma HLS INTERF...
The wrong part of the code is: Q = (DATA, 10); The right code snippet is: Q = (DATA, 0);
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma HLS INTERFACE a...
The right code snippet is: Q = (DATA, 0);
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma...
The wrong part of the code is: Q = (DATA, 10); 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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HL...
The wrong part of the code is: Q = (DATA, 10); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: Q = (DATA, 0);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma HLS INTERF...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { The right code snippet is: for (int i = 0; i < 4; i++) {
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma HLS INTERFACE a...
The right code snippet is: for (int i = 0; i < 4; i++) {
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HL...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 0; i < 4; i++) {
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma HLS INTERF...
The wrong part of the code is: signed char signed_out = FINAL_OUTPUT; out = signed_out; The right code snippet is: out = FINAL_OUTPUT;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma HLS INTERFACE a...
The right code snippet is: out = FINAL_OUTPUT;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma...
The wrong part of the code is: signed char signed_out = FINAL_OUTPUT; out = signed_out; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HL...
The wrong part of the code is: signed char signed_out = FINAL_OUTPUT; out = signed_out; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: out = FINAL_OUTPUT;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma HLS INTERF...
The wrong part of the code is: ap_uint<4> MUX_OUT = 0; The right code snippet is: ap_uint<4> MUX_OUT;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma HLS INTERFACE a...
The right code snippet is: ap_uint<4> MUX_OUT;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HLS INTERFACE ap_none port=in_0 #pragma...
The wrong part of the code is: ap_uint<4> MUX_OUT = 0; The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=CLK #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=SHIFT #pragma HL...
The wrong part of the code is: ap_uint<4> MUX_OUT = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_uint<4> MUX_OUT;
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store...
The wrong part of the code is: env_reg[i] = env[i+1]; The right code snippet is: env_reg[i] = env[i];
'OOB'
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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store gene...
The right code snippet is: env_reg[i] = env[i];
'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 <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // regist...
The wrong part of the code is: env_reg[i] = env[i+1]; The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
The wrong part of the code is: env_reg[i] = env[i+1]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: env_reg[i] = env[i];
'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 <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n] = {0}; // register to store environmental signals int power_reg; // register to...
The wrong part of the code is: int env_reg[n] = {0}; The right code snippet is: int env_reg[n];
'INIT'
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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n] = {0}; // register to store environmental signals int power_reg; // register to stor...
The right code snippet is: int env_reg[n];
'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 <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n] = {0}; // register to store environmental signals int power_reg; // ...
The wrong part of the code is: int env_reg[n] = {0}; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n] = {0}; // register to store environ...
The wrong part of the code is: int env_reg[n] = {0}; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: int env_reg[n];
'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 <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store...
The wrong part of the code is: power_reg = hls::add(power_reg, hls::mult(env_reg[i], 32)); The right code snippet is: power_reg = hls::add(power_reg, hls::mult(env_reg[i], 8));
'SHFT'
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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store gene...
The right code snippet is: power_reg = hls::add(power_reg, hls::mult(env_reg[i], 8));
'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 <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // regist...
The wrong part of the code is: power_reg = hls::add(power_reg, hls::mult(env_reg[i], 32)); 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 <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
The wrong part of the code is: power_reg = hls::add(power_reg, hls::mult(env_reg[i], 32)); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: power_reg = hls::add(power_reg, hls::mult(env_reg[i], 8));
'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 <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store...
The wrong part of the code is: for (int i = 1; i >= 0; i++) { The right code snippet is: for (int i = 1; i < n; i++) {
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store gene...
The right code snippet is: for (int i = 1; i < n; i++) {
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // regist...
The wrong part of the code is: for (int i = 1; i >= 0; i++) { 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
The wrong part of the code is: for (int i = 1; i >= 0; i++) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i = 1; i < n; i++) {
'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 Energy_Harvesting_Block(int env[n], int& power) { unsigned int env_reg[n]; // register to store environmental signals int power_reg; // register...
The wrong part of the code is: unsigned int env_reg[n]; The right code snippet is: int env_reg[n];
'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 Energy_Harvesting_Block(int env[n], int& power) { unsigned int env_reg[n]; // register to store environmental signals int power_reg; // register to s...
The right code snippet is: int env_reg[n];
'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 Energy_Harvesting_Block(int env[n], int& power) { unsigned int env_reg[n]; // register to store environmental signals int power_reg; ...
The wrong part of the code is: unsigned int env_reg[n]; 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 Energy_Harvesting_Block(int env[n], int& power) { unsigned int env_reg[n]; // register to store envi...
The wrong part of the code is: unsigned int env_reg[n]; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: int env_reg[n];
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store...
The wrong part of the code is: for (int i = 1; i < n/2; i++) { The right code snippet is: for (int i = 1; i < n; i++) {
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store gene...
The right code snippet is: for (int i = 1; i < n; i++) {
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // regist...
The wrong part of the code is: for (int i = 1; i < n/2; i++) { 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
The wrong part of the code is: for (int i = 1; i < n/2; i++) { The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 1; i < n; i++) {
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg = 0; // register to s...
The wrong part of the code is: int power_reg = 0; The right code snippet is: int power_reg;
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg = 0; // register to store ...
The right code snippet is: int power_reg;
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg = 0; // re...
The wrong part of the code is: int power_reg = 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
The wrong part of the code is: int power_reg = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: int power_reg;
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store...
The wrong part of the code is: env_reg[i] = env[i+n/2]; The right code snippet is: env_reg[i] = env[i];
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store gene...
The right code snippet is: env_reg[i] = env[i];
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // regist...
The wrong part of the code is: env_reg[i] = env[i+n/2]; 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
The wrong part of the code is: env_reg[i] = env[i+n/2]; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: env_reg[i] = env[i];
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store...
The wrong part of the code is: #pragma HLS array_partition variable=env_reg cyclic factor=2 dim=1 The right code snippet is: #pragma HLS array_partition variable=env_reg block 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store gene...
The right code snippet is: #pragma HLS array_partition variable=env_reg block 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // regist...
The wrong part of the code is: #pragma HLS array_partition variable=env_reg cyclic 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
The wrong part of the code is: #pragma HLS array_partition variable=env_reg cyclic 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=env_reg block 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store...
The wrong part of the code is: #pragma HLS array_partition variable=env_reg block factor=3 dim=1 The right code snippet is: #pragma HLS array_partition variable=env_reg block 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store gene...
The right code snippet is: #pragma HLS array_partition variable=env_reg block 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // regist...
The wrong part of the code is: #pragma HLS array_partition variable=env_reg block 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
The wrong part of the code is: #pragma HLS array_partition variable=env_reg block 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=env_reg block 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store...
The wrong part of the code is: #pragma HLS array_partition variable=env_reg block factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=env_reg block 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store gene...
The right code snippet is: #pragma HLS array_partition variable=env_reg block 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // regist...
The wrong part of the code is: #pragma HLS array_partition variable=env_reg block 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
The wrong part of the code is: #pragma HLS array_partition variable=env_reg block 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=env_reg block 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store...
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: ``` #include <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store gene...
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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // regist...
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: ``` #include <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
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: ``` #include <hls_math.h> void Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store...
The wrong part of the code is: #pragma HLS interface ap_vld register port=env The right code snippet is: #pragma HLS interface ap_none register port=env
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store gene...
The right code snippet is: #pragma HLS interface ap_none register port=env
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // regist...
The wrong part of the code is: #pragma HLS interface ap_vld register port=env 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
The wrong part of the code is: #pragma HLS interface ap_vld register port=env The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_none register port=env
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store...
The wrong part of the code is: #pragma HLS interface m_axi port=env offset=slave bundle=gmem1 The right code snippet is: #pragma HLS interface m_axi port=env offset=slave bundle=gmem0
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store gene...
The right code snippet is: #pragma HLS interface m_axi port=env offset=slave bundle=gmem0
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // regist...
The wrong part of the code is: #pragma HLS interface m_axi port=env offset=slave bundle=gmem1 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
The wrong part of the code is: #pragma HLS interface m_axi port=env offset=slave bundle=gmem1 The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=env offset=slave bundle=gmem0
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store...
The wrong part of the code is: #pragma HLS interface bram port=power The right code snippet is: #pragma HLS interface ap_none register port=power
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store gene...
The right code snippet is: #pragma HLS interface ap_none register port=power
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // regist...
The wrong part of the code is: #pragma HLS interface bram port=power 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
The wrong part of the code is: #pragma HLS interface bram port=power The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_none register port=power
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store...
The wrong part of the code is: #pragma HLS interface ap_none register array_port=env The right code snippet is: #pragma HLS interface ap_none register port=env
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // register to store gene...
The right code snippet is: #pragma HLS interface ap_none register port=env
'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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental signals int power_reg; // regist...
The wrong part of the code is: #pragma HLS interface ap_none register array_port=env 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 Energy_Harvesting_Block(int env[n], int& power) { int env_reg[n]; // register to store environmental...
The wrong part of the code is: #pragma HLS interface ap_none register array_port=env The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_none register port=env
'AMS'