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 <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { ...
The wrong part of the code is: ap_uint<5> temp_out = 0; The right code snippet is: None.
ZERO
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { temp...
The right code snippet is: None.
ZERO
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0...
The wrong part of the code is: ap_uint<5> temp_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: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out;...
The wrong part of the code is: ap_uint<5> temp_out = 0; The high-level-synthesis bug type of the code is: ZERO The right code snippet is: None.
ZERO
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { ...
The wrong part of the code is: temp_out = buffer_2[0]; The right code snippet is: None.
BUF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { temp...
The right code snippet is: None.
BUF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0...
The wrong part of the code is: temp_out = buffer_2[0]; The high-level-synthesis bug type of the code is: BUF
BUF
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out;...
The wrong part of the code is: temp_out = buffer_2[0]; The high-level-synthesis bug type of the code is: BUF The right code snippet is: None.
BUF
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { ...
The wrong part of the code is: #pragma HLS array_partition variable=temp_out cyclic factor=2 dim=1 The right code snippet is: None.
APT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { temp...
The right code snippet is: None.
APT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0...
The wrong part of the code is: #pragma HLS array_partition variable=temp_out 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 <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out;...
The wrong part of the code is: #pragma HLS array_partition variable=temp_out cyclic factor=2 dim=1 The high-level-synthesis bug type of the code is: APT The right code snippet is: None.
APT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { ...
The wrong part of the code is: #pragma HLS array_partition variable=temp_out cyclic factor=3 dim=2 The right code snippet is: None.
FND
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { temp...
The right code snippet is: None.
FND
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0...
The wrong part of the code is: #pragma HLS array_partition variable=temp_out cyclic factor=3 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: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out;...
The wrong part of the code is: #pragma HLS array_partition variable=temp_out cyclic factor=3 dim=2 The high-level-synthesis bug type of the code is: FND The right code snippet is: None.
FND
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { ...
The wrong part of the code is: #pragma HLS array_partition variable=temp_out cyclic factor=2 dim=2 The right code snippet is: None.
DID
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { temp...
The right code snippet is: None.
DID
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0...
The wrong part of the code is: #pragma HLS array_partition variable=temp_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 <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out;...
The wrong part of the code is: #pragma HLS array_partition variable=temp_out cyclic factor=2 dim=2 The high-level-synthesis bug type of the code is: DID The right code snippet is: None.
DID
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { ...
The wrong part of the code is: #pragma HLS dataflow The right code snippet is: None.
DFP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { temp...
The right code snippet is: None.
DFP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0...
The wrong part of the code is: #pragma HLS dataflow The high-level-synthesis bug type of the code is: DFP
DFP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out;...
The wrong part of the code is: #pragma HLS dataflow The high-level-synthesis bug type of the code is: DFP The right code snippet is: None.
DFP
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { ...
The wrong part of the code is: #pragma HLS interface ap_none port=out The right code snippet is: None.
IDAP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { temp...
The right code snippet is: None.
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0...
The wrong part of the code is: #pragma HLS interface ap_none port=out The high-level-synthesis bug type of the code is: IDAP
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out;...
The wrong part of the code is: #pragma HLS interface ap_none port=out The high-level-synthesis bug type of the code is: IDAP The right code snippet is: None.
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { ...
The wrong part of the code is: #pragma HLS interface m_axi port=out offset=off bundle=AXIS The right code snippet is: None.
RAMB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { temp...
The right code snippet is: None.
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0...
The wrong part of the code is: #pragma HLS interface m_axi port=out offset=off bundle=AXIS The high-level-synthesis bug type of the code is: RAMB
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out;...
The wrong part of the code is: #pragma HLS interface m_axi port=out offset=off bundle=AXIS The high-level-synthesis bug type of the code is: RAMB The right code snippet is: None.
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { ...
The wrong part of the code is: #pragma HLS interface ap_memory port=out The right code snippet is: None.
SMA
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { temp...
The right code snippet is: None.
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0...
The wrong part of the code is: #pragma HLS interface ap_memory port=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 <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out;...
The wrong part of the code is: #pragma HLS interface ap_memory port=out The high-level-synthesis bug type of the code is: SMA The right code snippet is: None.
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { ...
The wrong part of the code is: #pragma HLS interface ap_vld port=out The right code snippet is: None.
AMS
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { temp...
The right code snippet is: None.
AMS
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0...
The wrong part of the code is: #pragma HLS interface ap_vld port=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 <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out;...
The wrong part of the code is: #pragma HLS interface ap_vld port=out The high-level-synthesis bug type of the code is: AMS The right code snippet is: None.
AMS
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { ...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: None.
MLP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { temp...
The right code snippet is: None.
MLP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0...
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 <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out;...
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: None.
MLP
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { ...
The wrong part of the code is: #pragma HLS unroll The right code snippet is: None.
ILNU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0) { temp...
The right code snippet is: None.
ILNU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out; bool temp_ov; if (ctrl == 0...
The wrong part of the code is: #pragma HLS unroll The high-level-synthesis bug type of the code is: ILNU
ILNU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void addsub_4bit(ap_uint<4> in_0, ap_uint<4> in_1, bool ctrl, ap_uint<4>& out, bool& ov) { ap_uint<5> temp_out;...
The wrong part of the code is: #pragma HLS unroll The high-level-synthesis bug type of the code is: ILNU The right code snippet is: None.
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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { Q = false; } ...
The wrong part of the code is: Q = D[-1]; The right code snippet is: Q = D;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { Q = false; } else ...
The right code snippet is: Q = D;
'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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { Q = ...
The wrong part of the code is: Q = D[-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: void clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN ? CLK : false; // Clock gate implemen...
The wrong part of the code is: Q = D[-1]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: Q = D;
'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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK = true; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { Q = fals...
The wrong part of the code is: bool ENCLK = true; The right code snippet is: bool ENCLK;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK = true; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { Q = false; ...
The right code snippet is: bool ENCLK;
'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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK = true; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { ...
The wrong part of the code is: bool ENCLK = true; 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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK = true; ENCLK = EN ? CLK : false; // Clock gate i...
The wrong part of the code is: bool ENCLK = true; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: bool ENCLK;
'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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN << CLK; // Clock gate implementation if (TE == false) { Q = false; } else { ...
The wrong part of the code is: ENCLK = EN << CLK; The right code snippet is: ENCLK = EN ? CLK : false;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN << CLK; // Clock gate implementation if (TE == false) { Q = false; } else { Q...
The right code snippet is: ENCLK = EN ? CLK : false;
'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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN << CLK; // Clock gate implementation if (TE == false) { Q = false; ...
The wrong part of the code is: ENCLK = EN << CLK; 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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN << CLK; // Clock gate implementation ...
The wrong part of the code is: ENCLK = EN << CLK; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: ENCLK = EN ? CLK : false;
'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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { Q = false; } ...
The wrong part of the code is: while (TE == true) { Q = D; } The right code snippet is: if (TE == false) { Q = false; } else { Q = D; }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { Q = false; } else ...
The right code snippet is: if (TE == false) { Q = false; } else { Q = D; }
'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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { Q = ...
The wrong part of the code is: while (TE == true) { Q = D; } 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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN ? CLK : false; // Clock gate implemen...
The wrong part of the code is: while (TE == true) { Q = D; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (TE == false) { Q = false; } else { Q = D; }
'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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { Q = false; } ...
The wrong part of the code is: Q = (int)D; The right code snippet is: Q = D;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { Q = false; } else ...
The right code snippet is: Q = D;
'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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { Q = ...
The wrong part of the code is: Q = (int)D; 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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK; ENCLK = EN ? CLK : false; // Clock gate implemen...
The wrong part of the code is: Q = (int)D; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: Q = D;
'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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK = 0; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { Q = false; ...
The wrong part of the code is: bool ENCLK = 0; The right code snippet is: bool ENCLK;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK = 0; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { Q = false; } e...
The right code snippet is: bool ENCLK;
'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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK = 0; ENCLK = EN ? CLK : false; // Clock gate implementation if (TE == false) { ...
The wrong part of the code is: bool ENCLK = 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 clock_gate_d_ff_en(bool CLK, bool EN, bool TE, bool D, bool &Q) { bool ENCLK = 0; ENCLK = EN ? CLK : false; // Clock gate impl...
The wrong part of the code is: bool ENCLK = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: bool ENCLK;
'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 and_gate(bool A, bool B, bool C, bool &Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=A #pragma HLS INTERFACE axis port=B #...
The wrong part of the code is: Y = (A[0] & B[1] & C[2]); The right code snippet is: Y = (A & B & C);
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void and_gate(bool A, bool B, bool C, bool &Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=A #pragma HLS INTERFACE axis port=B #pragm...
The right code snippet is: Y = (A & B & C);
'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 and_gate(bool A, bool B, bool C, bool &Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=A #pragma HLS INTERFACE axis p...
The wrong part of the code is: Y = (A[0] & B[1] & C[2]); 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 and_gate(bool A, bool B, bool C, bool &Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: Y = (A[0] & B[1] & C[2]); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: Y = (A & B & C);
'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 and_gate(bool A, bool B, bool C, bool Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=A #pragma HLS INTERFACE axis port=B #p...
The wrong part of the code is: bool A, bool B, bool C, bool Y The right code snippet is: bool A, bool B, bool C, bool &Y
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void and_gate(bool A, bool B, bool C, bool Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=A #pragma HLS INTERFACE axis port=B #pragma...
The right code snippet is: bool A, bool B, bool C, bool &Y
'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 and_gate(bool A, bool B, bool C, bool Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=A #pragma HLS INTERFACE axis po...
The wrong part of the code is: bool A, bool B, bool C, bool Y 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 and_gate(bool A, bool B, bool C, bool Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis por...
The wrong part of the code is: bool A, bool B, bool C, bool Y The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: bool A, bool B, bool C, bool &Y
'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 and_gate(bool A, bool B, bool C, bool &Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=A #pragma HLS INTERFACE axis port=B #...
The wrong part of the code is: while(true) { Y = (A & B & C); } The right code snippet is: Y = (A & B & C);
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void and_gate(bool A, bool B, bool C, bool &Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=A #pragma HLS INTERFACE axis port=B #pragm...
The right code snippet is: Y = (A & B & C);
'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 and_gate(bool A, bool B, bool C, bool &Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=A #pragma HLS INTERFACE axis p...
The wrong part of the code is: while(true) { Y = (A & B & C); } 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 and_gate(bool A, bool B, bool C, bool &Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: while(true) { Y = (A & B & C); } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: Y = (A & B & C);
'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 and_gate(bool A, bool B, bool C, bool &Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=A #pragma HLS INTERFACE axis port=B #...
The wrong part of the code is: Y = (int(A) & int(B) & int(C)); The right code snippet is: Y = (A & B & C);
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void and_gate(bool A, bool B, bool C, bool &Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=A #pragma HLS INTERFACE axis port=B #pragm...
The right code snippet is: Y = (A & B & C);
'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 and_gate(bool A, bool B, bool C, bool &Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=A #pragma HLS INTERFACE axis p...
The wrong part of the code is: Y = (int(A) & int(B) & int(C)); 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 and_gate(bool A, bool B, bool C, bool &Y) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis po...
The wrong part of the code is: Y = (int(A) & int(B) & int(C)); The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: Y = (A & B & C);
'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 and_gate(bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 complete dim=1 #pragma HLS ARRAY_PARTITION variable=B1 complete dim=1 #pragma HLS ARRAY_PARTIT...
The wrong part of the code is: bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 complete dim=1 #pragma HLS ARRAY_PARTITION variable=B1 complete dim=1 #pragma HLS ARRAY_PARTITION variable=C1 complete dim=1 #pragma HLS ARRAY_PARTITION variable=Y1 complete dim=1 for(int i=0; i<2; i++) { ...
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void and_gate(bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 complete dim=1 #pragma HLS ARRAY_PARTITION variable=B1 complete dim=1 #pragma HLS ARRAY_PARTITION v...
The right code snippet is: bool A, bool B, bool C, bool &Y
'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 and_gate(bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 complete dim=1 #pragma HLS ARRAY_PARTITION variable=B1 complete dim=1 #pragma HLS A...
The wrong part of the code is: bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 complete dim=1 #pragma HLS ARRAY_PARTITION variable=B1 complete dim=1 #pragma HLS ARRAY_PARTITION variable=C1 complete dim=1 #pragma HLS ARRAY_PARTITION variable=Y1 complete dim=1 for(int i=0; i<2; i++) { ...
'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 and_gate(bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 complete dim=1 #pragma HLS ARRAY_PARTITION var...
The wrong part of the code is: bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 complete dim=1 #pragma HLS ARRAY_PARTITION variable=B1 complete dim=1 #pragma HLS ARRAY_PARTITION variable=C1 complete dim=1 #pragma HLS ARRAY_PARTITION variable=Y1 complete dim=1 for(int i=0; i<2; 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: ``` void and_gate(bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=3 dim=1 #pragma HLS ARRAY_PARTITION variable=B1 cyclic factor=3 dim=1 #pragma HL...
The wrong part of the code is: bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=3 dim=1 #pragma HLS ARRAY_PARTITION variable=B1 cyclic factor=3 dim=1 #pragma HLS ARRAY_PARTITION variable=C1 cyclic factor=3 dim=1 #pragma HLS ARRAY_PARTITION variable=Y1 cyclic factor=3 dim=1...
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void and_gate(bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=3 dim=1 #pragma HLS ARRAY_PARTITION variable=B1 cyclic factor=3 dim=1 #pragma HLS ARR...
The right code snippet is: bool A, bool B, bool C, bool &Y
'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 and_gate(bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=3 dim=1 #pragma HLS ARRAY_PARTITION variable=B1 cyclic factor=3 dim=1...
The wrong part of the code is: bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=3 dim=1 #pragma HLS ARRAY_PARTITION variable=B1 cyclic factor=3 dim=1 #pragma HLS ARRAY_PARTITION variable=C1 cyclic factor=3 dim=1 #pragma HLS ARRAY_PARTITION variable=Y1 cyclic factor=3 dim=1...
'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 and_gate(bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=3 dim=1 #pragma HLS ARRAY_PARTIT...
The wrong part of the code is: bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=3 dim=1 #pragma HLS ARRAY_PARTITION variable=B1 cyclic factor=3 dim=1 #pragma HLS ARRAY_PARTITION variable=C1 cyclic factor=3 dim=1 #pragma HLS ARRAY_PARTITION variable=Y1 cyclic factor=3 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: ``` void and_gate(bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=2 dim=1 #pragma HLS ARRAY_PARTITION variable=B1 cyclic factor=2 dim=1 #pragma HL...
The wrong part of the code is: bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=2 dim=1 #pragma HLS ARRAY_PARTITION variable=B1 cyclic factor=2 dim=1 #pragma HLS ARRAY_PARTITION variable=C1 cyclic factor=2 dim=1 #pragma HLS ARRAY_PARTITION variable=Y1 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: ``` void and_gate(bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=2 dim=1 #pragma HLS ARRAY_PARTITION variable=B1 cyclic factor=2 dim=1 #pragma HLS ARR...
The right code snippet is: bool A, bool B, bool C, bool &Y
'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 and_gate(bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=2 dim=1 #pragma HLS ARRAY_PARTITION variable=B1 cyclic factor=2 dim=1...
The wrong part of the code is: bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=2 dim=1 #pragma HLS ARRAY_PARTITION variable=B1 cyclic factor=2 dim=1 #pragma HLS ARRAY_PARTITION variable=C1 cyclic factor=2 dim=1 #pragma HLS ARRAY_PARTITION variable=Y1 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, and tell the right code snippet The buggy code is: ``` void and_gate(bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=2 dim=1 #pragma HLS ARRAY_PARTIT...
The wrong part of the code is: bool A1[2], B1[2], C1[2], Y1[2]; #pragma HLS ARRAY_PARTITION variable=A1 cyclic factor=2 dim=1 #pragma HLS ARRAY_PARTITION variable=B1 cyclic factor=2 dim=1 #pragma HLS ARRAY_PARTITION variable=C1 cyclic factor=2 dim=1 #pragma HLS ARRAY_PARTITION variable=Y1 cyclic factor=2 dim=1...
'FND'