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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , floa...
The wrong part of the code is: // Local signals bool and0_out_X_1; bool and0_out_X_2; and0_out_X_1 = A && SLEEP_B; and0_out_X_2 = A || SLEEP_B; and0_out_X = and0_out_X_1 && and0_out_X_2; The right code snippet is: // Local signals bool and0_out_X;
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , float VNB...
The right code snippet is: // Local signals bool and0_out_X;
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB ...
The wrong part of the code is: // Local signals bool and0_out_X_1; bool and0_out_X_2; and0_out_X_1 = A && SLEEP_B; and0_out_X_2 = A || SLEEP_B; and0_out_X = and0_out_X_1 && and0_out_X_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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR ...
The wrong part of the code is: // Local signals bool and0_out_X_1; bool and0_out_X_2; and0_out_X_1 = A && SLEEP_B; and0_out_X_2 = A || SLEEP_B; and0_out_X = and0_out_X_1 && and0_out_X_2; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: // Local signals bool and0_...
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , floa...
The wrong part of the code is: #pragma HLS array_partition variable=and0_out_X cyclic dim=0 The right code snippet is: #pragma HLS array_partition variable=and0_out_X complete dim=0
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , float VNB...
The right code snippet is: #pragma HLS array_partition variable=and0_out_X complete dim=0
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB ...
The wrong part of the code is: #pragma HLS array_partition variable=and0_out_X cyclic dim=0 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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR ...
The wrong part of the code is: #pragma HLS array_partition variable=and0_out_X cyclic dim=0 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=and0_out_X complete dim=0
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , floa...
The wrong part of the code is: #pragma HLS array_partition variable=and0_out_X complete factor=2 dim=0 The right code snippet is: #pragma HLS array_partition variable=and0_out_X complete dim=0
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , float VNB...
The right code snippet is: #pragma HLS array_partition variable=and0_out_X complete dim=0
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB ...
The wrong part of the code is: #pragma HLS array_partition variable=and0_out_X complete factor=2 dim=0 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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR ...
The wrong part of the code is: #pragma HLS array_partition variable=and0_out_X complete factor=2 dim=0 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=and0_out_X complete dim=0
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , floa...
The wrong part of the code is: #pragma HLS array_partition variable=and0_out_X complete dim=1 The right code snippet is: #pragma HLS array_partition variable=and0_out_X complete dim=0
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , float VNB...
The right code snippet is: #pragma HLS array_partition variable=and0_out_X complete dim=0
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB ...
The wrong part of the code is: #pragma HLS array_partition variable=and0_out_X complete dim=1 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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR ...
The wrong part of the code is: #pragma HLS array_partition variable=and0_out_X complete dim=1 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=and0_out_X complete dim=0
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , floa...
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: ``` #include <hls_math.h> void sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , float VNB...
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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB ...
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: ``` #include <hls_math.h> void sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR ...
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: ``` #include <hls_math.h> void sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , floa...
The wrong part of the code is: #pragma HLS interface ap_vld port=X #pragma HLS interface ap_vld port=A #pragma HLS interface ap_vld port=SLEEP_B #pragma HLS interface ap_vld port=VPWR #pragma HLS interface ap_vld port=VGND #pragma HLS interface ap_vld port=VPB #pragma HLS interface ap_vld port=VNB The righ...
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , float VNB...
The right code snippet is: #pragma HLS interface ap_none port=X #pragma HLS interface ap_none port=A #pragma HLS interface ap_none port=SLEEP_B #pragma HLS interface ap_none port=VPWR #pragma HLS interface ap_none port=VGND #pragma HLS interface ap_none port=VPB #pragma HLS interface ap_none port=VNB
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB ...
The wrong part of the code is: #pragma HLS interface ap_vld port=X #pragma HLS interface ap_vld port=A #pragma HLS interface ap_vld port=SLEEP_B #pragma HLS interface ap_vld port=VPWR #pragma HLS interface ap_vld port=VGND #pragma HLS interface ap_vld port=VPB #pragma HLS interface ap_vld port=VNB The high...
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR ...
The wrong part of the code is: #pragma HLS interface ap_vld port=X #pragma HLS interface ap_vld port=A #pragma HLS interface ap_vld port=SLEEP_B #pragma HLS interface ap_vld port=VPWR #pragma HLS interface ap_vld port=VGND #pragma HLS interface ap_vld port=VPB #pragma HLS interface ap_vld port=VNB The high...
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , floa...
The wrong part of the code is: #pragma The right code snippet is: #pragma HLS interface m_axi port=X offset=slave bundle=gmem #pragma HLS interface m_axi port=A offset=slave bundle=gmem #pragma HLS interface m_axi port=SLEEP_B offset=slave bundle=gmem #pragma HLS interface m_axi port=VPWR offset=slave ...
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <hls_math.h> void sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB , float VNB...
The right code snippet is: #pragma HLS interface m_axi port=X offset=slave bundle=gmem #pragma HLS interface m_axi port=A offset=slave bundle=gmem #pragma HLS interface m_axi port=SLEEP_B offset=slave bundle=gmem #pragma HLS interface m_axi port=VPWR offset=slave bundle=gmem #pragma HLS interface m_axi port=VG...
'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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR , float VGND , float VPB ...
The wrong part of the code is: #pragma 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 sky130_fd_sc_hdll__inputiso0n ( bool &X , bool A , bool SLEEP_B, float VPWR ...
The wrong part of the code is: #pragma The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=X offset=slave bundle=gmem #pragma HLS interface m_axi port=A offset=slave bundle=gmem #pragma HLS interface m_axi port=SLEEP_B offset=slave bu...
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ap_uint<1>&...
The wrong part of the code is: msg.range(128, 96) = addr; The right code snippet is: msg.range(127, 96) = addr;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ap_uint<1>& read...
The right code snippet is: msg.range(127, 96) = addr;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ...
The wrong part of the code is: msg.range(128, 96) = addr; 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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint...
The wrong part of the code is: msg.range(128, 96) = addr; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: msg.range(127, 96) = addr;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ap_uint<1>&...
The wrong part of the code is: ap_uint<1> r_out; The right code snippet is: static ap_uint<1> r_out;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ap_uint<1>& read...
The right code snippet is: static ap_uint<1> r_out;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ...
The wrong part of the code is: ap_uint<1> r_out; 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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint...
The wrong part of the code is: ap_uint<1> r_out; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<1> r_out;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ap_uint<1>&...
The wrong part of the code is: r_out = msg << pos; The right code snippet is: r_out = msg >> pos;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ap_uint<1>& read...
The right code snippet is: r_out = msg >> pos;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ...
The wrong part of the code is: r_out = msg << pos; 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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint...
The wrong part of the code is: r_out = msg << pos; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: r_out = msg >> pos;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ap_uint<1>&...
The wrong part of the code is: while(0) {} The right code snippet is: while(1) {}
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ap_uint<1>& read...
The right code snippet is: while(1) {}
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ...
The wrong part of the code is: while(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 <ap_int.h> void rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint...
The wrong part of the code is: while(0) {} The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: while(1) {}
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ap_uint<1>&...
The wrong part of the code is: msg.range(39, 0) = (ap_uint<40>)0x80000000; The right code snippet is: msg.range(39, 0) = 0x80000000;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ap_uint<1>& read...
The right code snippet is: msg.range(39, 0) = 0x80000000;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ...
The wrong part of the code is: msg.range(39, 0) = (ap_uint<40>)0x80000000; 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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint...
The wrong part of the code is: msg.range(39, 0) = (ap_uint<40>)0x80000000; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: msg.range(39, 0) = 0x80000000;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ap_uint<1>&...
The wrong part of the code is: r_ready = 0; The right code snippet is: r_ready = 1;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ap_uint<1>& read...
The right code snippet is: r_ready = 1;
'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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint<40> chan, ap_uint<16> stat, ...
The wrong part of the code is: r_ready = 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 rcswitch_send( ap_uint<1> clk, ap_uint<1> rst, ap_uint<1> send, ap_uint<40> addr, ap_uint...
The wrong part of the code is: r_ready = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: r_ready = 1;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: sum = a[16] + b[16] + cin[16]; The right code snippet is: sum = a + b + cin;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: sum = a + b + cin;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: sum = a[16] + b[16] + cin[16]; 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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: sum = a[16] + b[16] + cin[16]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: sum = a + b + cin;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: ap_uint<16> carry = 0; The right code snippet is: ap_uint<16> carry;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: ap_uint<16> carry;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: ap_uint<16> carry = 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 <ap_int.h> void top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: ap_uint<16> carry = 0; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<16> carry;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: diff = (a > b) ? a << b : b << a; The right code snippet is: diff = (a > b) ? a - b : b - a;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: diff = (a > b) ? a - b : b - a;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: diff = (a > b) ? a << b : b << a; 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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: diff = (a > b) ? a << b : b << a; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: diff = (a > b) ? a - b : b - a;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: for (int i=0; i>=0; i++) { // do something } The right code snippet is: for (int i=0; i<10; i++) { // do something }
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: for (int i=0; i<10; i++) { // do something }
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: for (int i=0; i>=0; i++) { // do something } 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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: for (int i=0; i>=0; i++) { // do something } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: for (int i=0; i<10; i++) { // do something }
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: int diff; The right code snippet is: ap_uint<16> diff;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: ap_uint<16> diff;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: int diff; 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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: int diff; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<16> diff;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: for (int i=0; i<5; i++) { // do something // do something } The right code snippet is: for (int i=0; i<10; i++) { // do something }
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: for (int i=0; i<10; i++) { // do something }
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: for (int i=0; i<5; i++) { // do something // do something } 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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: for (int i=0; i<5; i++) { // do something // do something } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i=0; i<10; i++) { // do something }
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: ap_uint<16> carry = 0; The right code snippet is: ap_uint<16> carry;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: ap_uint<16> carry;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: ap_uint<16> carry = 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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: ap_uint<16> carry = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_uint<16> carry;
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: memcpy(buffer1, buffer2+1, sizeof(buffer1)); The right code snippet is: memcpy(buffer1, buffer2, sizeof(buffer1));
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: memcpy(buffer1, buffer2, sizeof(buffer1));
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: memcpy(buffer1, buffer2+1, sizeof(buffer1)); 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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: memcpy(buffer1, buffer2+1, sizeof(buffer1)); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memcpy(buffer1, buffer2, sizeof(buffer1));
'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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=3 dim=1 The right code snippet is: #pragma HLS array_partition variable=buffer1 cyclic factor=4 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 <ap_int.h> void top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: #pragma HLS array_partition variable=buffer1 cyclic factor=4 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 <ap_int.h> void top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=3 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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=buffer1 cyclic factor=4 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 <ap_int.h> void top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=5 dim=1 The right code snippet is: #pragma HLS array_partition variable=buffer1 cyclic factor=4 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 <ap_int.h> void top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: #pragma HLS array_partition variable=buffer1 cyclic factor=4 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 <ap_int.h> void top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=5 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 <ap_int.h> void top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=5 dim=1 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=buffer1 cyclic factor=4 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 <ap_int.h> void top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=4 dim=2 The right code snippet is: #pragma HLS array_partition variable=buffer1 cyclic factor=4 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 <ap_int.h> void top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
The right code snippet is: #pragma HLS array_partition variable=buffer1 cyclic factor=4 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 <ap_int.h> void top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=4 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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=4 dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS array_partition variable=buffer1 cyclic factor=4 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 <ap_int.h> void top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a ...
The wrong part of the code is: #pragma HLS dataflow pipeline II=2 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 <ap_int.h> void top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite port=a #pra...
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 <ap_int.h> void top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE s_axilite...
The wrong part of the code is: #pragma HLS dataflow pipeline II=2 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 top_module(ap_uint<16> a, ap_uint<16> b, ap_uint<32> &sum) { #pragma HLS INTERFACE ap_ctrl_none port=retur...
The wrong part of the code is: #pragma HLS dataflow pipeline II=2 The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: #pragma HLS dataflow
'DFP'