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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE a...
The wrong part of the code is: for (int i=N/2; i<N; i++) { The right code snippet is: for (int i=0; i<N; i++) {
BUF
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE ap_non...
The right code snippet is: for (int i=0; i<N; 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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS ...
The wrong part of the code is: for (int i=N/2; i<N; i++) { 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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERF...
The wrong part of the code is: for (int i=N/2; i<N; i++) { The high-level-synthesis bug type of the code is: BUF The right code snippet is: for (int i=0; i<N; 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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=temp cyclic The right code snippet is: #pragma HLS array_partition variable=temp complete
APT
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS array_partition variable=temp complete
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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS ...
The wrong part of the code is: #pragma HLS array_partition variable=temp cyclic 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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS array_partition variable=temp cyclic The high-level-synthesis bug type of the code is: APT The right code snippet is: #pragma HLS array_partition variable=temp complete
APT
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=buffer cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=buffer complete
FND
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS array_partition variable=buffer complete
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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS ...
The wrong part of the code is: #pragma HLS array_partition variable=buffer cyclic factor=3 The high-level-synthesis bug type of the code is: FND
FND
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS array_partition variable=buffer cyclic factor=3 The high-level-synthesis bug type of the code is: FND The right code snippet is: #pragma HLS array_partition variable=buffer complete
FND
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=buffer cyclic dim=1 factor=2 The right code snippet is: #pragma HLS array_partition variable=buffer cyclic factor=2
DID
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS array_partition variable=buffer cyclic factor=2
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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS ...
The wrong part of the code is: #pragma HLS array_partition variable=buffer cyclic dim=1 factor=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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS array_partition variable=buffer cyclic dim=1 factor=2 The high-level-synthesis bug type of the code is: DID The right code snippet is: #pragma HLS array_partition variable=buffer cyclic factor=2
DID
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS dataflow loop_flatten 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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE ap_non...
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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS ...
The wrong part of the code is: #pragma HLS dataflow loop_flatten 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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS dataflow loop_flatten 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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS interface ap_fifo port=in The right code snippet is: #pragma HLS interface ap_none port=in
IDAP
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS interface ap_none port=in
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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS ...
The wrong part of the code is: #pragma HLS interface ap_fifo port=in 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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS interface ap_fifo port=in The high-level-synthesis bug type of the code is: IDAP The right code snippet is: #pragma HLS interface ap_none port=in
IDAP
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS interface m_axi port=in max_read_burst_length=16 max_write_burst_length=16 The right code snippet is: #pragma HLS interface m_axi port=in
RAMB
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS interface m_axi port=in
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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS ...
The wrong part of the code is: #pragma HLS interface m_axi port=in max_read_burst_length=16 max_write_burst_length=16 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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS interface m_axi port=in max_read_burst_length=16 max_write_burst_length=16 The high-level-synthesis bug type of the code is: RAMB The right code snippet is: #pragma HLS interface m_axi port=in
RAMB
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS interface bram port=ref The right code snippet is: #pragma HLS interface ap_none port=ref
SMA
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS interface ap_none port=ref
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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS ...
The wrong part of the code is: #pragma HLS interface bram port=ref 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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS interface bram port=ref The high-level-synthesis bug type of the code is: SMA The right code snippet is: #pragma HLS interface ap_none port=ref
SMA
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS interface ap_fifo port=buffer The right code snippet is: #pragma HLS interface ap_none port=buffer
AMS
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS interface ap_none port=buffer
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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS ...
The wrong part of the code is: #pragma HLS interface ap_fifo port=buffer 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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS interface ap_fifo port=buffer The high-level-synthesis bug type of the code is: AMS The right code snippet is: #pragma HLS interface ap_none port=buffer
AMS
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=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE a...
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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE ap_non...
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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS ...
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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERF...
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: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS unroll factor=2 The right code snippet is: #pragma HLS unroll
ILNU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS unroll
ILNU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERFACE ap_none port=current #pragma HLS ...
The wrong part of the code is: #pragma HLS unroll factor=2 The high-level-synthesis bug type of the code is: ILNU
ILNU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=ref #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=error #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS unroll factor=2 The high-level-synthesis bug type of the code is: ILNU The right code snippet is: #pragma HLS unroll
ILNU
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=RESET_B #pragma HLS INTERFACE ap_none port=VPWR #pragma HLS INTERFACE ap_none port=VGND #pragma HLS INTERFACE ap...
The wrong part of the code is: static bool Q_reg; Bug_type: OOB The right code snippet is: static bool Q_reg = 0;
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=D #pragma HLS INTERFACE ap_none port=RESET_B #pragma HLS INTERFACE ap_none port=VPWR #pragma HLS INTERFACE ap_none port=VGND #pragma HLS INTERFACE ap_none...
The right code snippet is: static bool Q_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: #pragma HLS INTERFACE ap_none port=D #pragma HLS INTERFACE ap_none port=RESET_B #pragma HLS INTERFACE ap_none port=VPWR #pragma HLS INTERFACE ap_none port=VGND #pragma HLS I...
The wrong part of the code is: static bool Q_reg; Bug_type: OOB 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=D #pragma HLS INTERFACE ap_none port=RESET_B #pragma HLS INTERFACE ap_none port=VPWR #pragma HLS INTE...
The wrong part of the code is: static bool Q_reg; Bug_type: OOB The high-level-synthesis bug type of the code is: INIT The right code snippet is: static bool Q_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: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #...
The wrong part of the code is: stage1 = stage5; The right code snippet is: stage1 = data_in;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The right code snippet is: stage1 = data_in;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=r...
The wrong part of the code is: stage1 = stage5; The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pra...
The wrong part of the code is: stage1 = stage5; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: stage1 = data_in;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #...
The wrong part of the code is: ap_uint<4> stage1, stage2, stage3, stage4; The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=r...
The wrong part of the code is: ap_uint<4> stage1, stage2, stage3, stage4; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pra...
The wrong part of the code is: ap_uint<4> stage1, stage2, stage3, stage4; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #...
The wrong part of the code is: stage1 = stage4 << 5; The right code snippet is: stage1 = stage4;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The right code snippet is: stage1 = stage4;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=r...
The wrong part of the code is: stage1 = stage4 << 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: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pra...
The wrong part of the code is: stage1 = stage4 << 5; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: stage1 = stage4;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #...
The wrong part of the code is: while (load) { The right code snippet is: if (load) {
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The right code snippet is: if (load) {
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=r...
The wrong part of the code is: while (load) { The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pra...
The wrong part of the code is: while (load) { The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (load) {
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, int& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma ...
The wrong part of the code is: int& data_out The right code snippet is: ap_uint<4>& data_out
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, int& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
The right code snippet is: ap_uint<4>& data_out
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, int& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: int& data_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: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, int& data_out ) { #pragma HLS...
The wrong part of the code is: int& data_out The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<4>& data_out
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #...
The wrong part of the code is: for (int i = 0; i < 3; i++) { The right code snippet is: for (int i = 0; i < 4; i++) {
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The right code snippet is: for (int i = 0; i < 4; 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 <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=r...
The wrong part of the code is: for (int i = 0; i < 3; 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 <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pra...
The wrong part of the code is: for (int i = 0; i < 3; i++) { The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 4; 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 <ap_int.h> void shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #...
The wrong part of the code is: static ap_uint<4> stage1 = 0, stage2, stage3, stage4; The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=r...
The wrong part of the code is: static ap_uint<4> stage1 = 0, stage2, stage3, stage4; 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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pra...
The wrong part of the code is: static ap_uint<4> stage1 = 0, stage2, stage3, stage4; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #...
The wrong part of the code is: stage1 = data_in_half2; The right code snippet is: stage1 = data_in;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The right code snippet is: stage1 = data_in;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=r...
The wrong part of the code is: stage1 = data_in_half2; 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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pra...
The wrong part of the code is: stage1 = data_in_half2; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: stage1 = data_in;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #...
The wrong part of the code is: #pragma HLS array_partition variable=stage1 cyclic factor=3 The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=r...
The wrong part of the code is: #pragma HLS array_partition variable=stage1 cyclic factor=3 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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pra...
The wrong part of the code is: #pragma HLS array_partition variable=stage1 cyclic factor=3 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #...
The wrong part of the code is: #pragma HLS array_partition variable=stage1 cyclic factor=5 The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=r...
The wrong part of the code is: #pragma HLS array_partition variable=stage1 cyclic factor=5 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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pra...
The wrong part of the code is: #pragma HLS array_partition variable=stage1 cyclic factor=5 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #...
The wrong part of the code is: #pragma HLS array_partition variable=stage1 dim=2 The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=r...
The wrong part of the code is: #pragma HLS array_partition variable=stage1 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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pra...
The wrong part of the code is: #pragma HLS array_partition variable=stage1 dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: static ap_uint<4> stage1, stage2, stage3, stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #...
The wrong part of the code is: #pragma HLS dataflow stage1 = stage4; The right code snippet is: stage1 = stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The right code snippet is: stage1 = stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pragma HLS INTERFACE ap_ctrl_none port=r...
The wrong part of the code is: #pragma HLS dataflow stage1 = stage4; 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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4>& data_out ) { #pra...
The wrong part of the code is: #pragma HLS dataflow stage1 = stage4; The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: stage1 = stage4;
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4> data_out[2] ) { #pragma HLS INTERFACE ap_ctrl_none port=return ...
The wrong part of the code is: ap_uint<4> data_out[2] The right code snippet is: ap_uint<4>& data_out
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4> data_out[2] ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pra...
The right code snippet is: ap_uint<4>& data_out
'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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4> data_out[2] ) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: ap_uint<4> data_out[2] 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 shift_register( bool clk, bool load, ap_uint<4> data_in, ap_uint<4> data_out[2] ) { #p...
The wrong part of the code is: ap_uint<4> data_out[2] The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: ap_uint<4>& data_out
'IDAP'