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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: #pragma HLS interface ap_memory port=LED_out The right code snippet is: #pragma HLS interface ap_none port=LED_out
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: #pragma HLS interface ap_none port=LED_out
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: #pragma HLS interface ap_memory port=LED_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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: #pragma HLS interface ap_memory port=LED_out The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_none port=LED_out
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
The wrong part of the code is: #pragma HLS interface ap_none port=P_Data The right code snippet is: #pragma HLS interface axis port=P_Data
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
The right code snippet is: #pragma HLS interface axis port=P_Data
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
The wrong part of the code is: #pragma HLS interface ap_none port=P_Data 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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
The wrong part of the code is: #pragma HLS interface ap_none port=P_Data The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface axis port=P_Data
'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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
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 LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool&...
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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out, bool& ledc...
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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& counter_set, ap_uint<16>& LED_out...
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: #include "ap_int.h" void LED_counter( bool clk, bool rst, bool Start, bool EN, ap_uint<32> P_Data, ap_uint<2>& ...
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: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: There are no arrays in the code to cause an out-of-bounds array access. The right code snippet is: None
'OOB': Out-of-bounds array access
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'OOB': Out-of-bounds array access
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: There are no arrays in the code to cause an out-of-bounds array access. The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access
'OOB': Out-of-bounds array access
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: There are no arrays in the code to cause an out-of-bounds array access. The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access The right code snippet is: None
'OOB': Out-of-bounds array access
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: ``` static bool q_delayed; ``` The right code snippet is: ``` static bool q_delayed = false; ```
'INIT': Read of uninitialized variable
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: ``` static bool q_delayed = false; ```
'INIT': Read of uninitialized variable
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: ``` static bool q_delayed; ``` The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable
'INIT': Read of uninitialized variable
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: ``` static bool q_delayed; ``` The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable The right code snippet is: ``` static bool q_delayed = false; ```
'INIT': Read of uninitialized variable
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: ``` q = d << 3; ``` The right code snippet is: None
'SHFT': Bit shift by an out-of-bounds amount
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'SHFT': Bit shift by an out-of-bounds amount
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: ``` q = d << 3; ``` The high-level-synthesis bug type of the code is: 'SHFT': Bit shift by an out-of-bounds amount
'SHFT': Bit shift by an out-of-bounds amount
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: ``` q = d << 3; ``` The high-level-synthesis bug type of the code is: 'SHFT': Bit shift by an out-of-bounds amount The right code snippet is: None
'SHFT': Bit shift by an out-of-bounds amount
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: ``` while (1) { // do something } ``` The right code snippet is: None
'INF': An infinite loop arising from an incorrect loop termination
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'INF': An infinite loop arising from an incorrect loop termination
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: ``` while (1) { // do something } ``` The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination
'INF': An infinite loop arising from an incorrect loop termination
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: ``` while (1) { // do something } ``` The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination The right code snippet is: None
'INF': An infinite loop arising from an incorrect loop termination
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: ``` unsigned char uc = 255; int i = (int) uc; ``` The right code snippet is: None
'USE': Unintended sign extension
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'USE': Unintended sign extension
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: ``` unsigned char uc = 255; int i = (int) uc; ``` The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension
'USE': Unintended sign extension
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: ``` unsigned char uc = 255; int i = (int) uc; ``` The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension The right code snippet is: None
'USE': Unintended sign extension
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: ``` for (int i = 0; i < 10; i+=2) { // do something } ``` The right code snippet is: None
'MLU': Errors in manual loop unrolling
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'MLU': Errors in manual loop unrolling
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: ``` for (int i = 0; i < 10; i+=2) { // do something } ``` The high-level-synthesis bug type of the code is: 'MLU': Errors in manual loop unrolling
'MLU': Errors in manual loop unrolling
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: ``` for (int i = 0; i < 10; i+=2) { // do something } ``` The high-level-synthesis bug type of the code is: 'MLU': Errors in manual loop unrolling The right code snippet is: None
'MLU': Errors in manual loop unrolling
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: ``` static bool q_delayed = 0; ``` The right code snippet is: ``` static bool q_delayed = false; ```
'ZERO': Variable initialized to zero instead of nonzero initializer
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: ``` static bool q_delayed = false; ```
'ZERO': Variable initialized to zero instead of nonzero initializer
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: ``` static bool q_delayed = 0; ``` The high-level-synthesis bug type of the code is: 'ZERO': Variable initialized to zero instead of nonzero initializer
'ZERO': Variable initialized to zero instead of nonzero initializer
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: ``` static bool q_delayed = 0; ``` The high-level-synthesis bug type of the code is: 'ZERO': Variable initialized to zero instead of nonzero initializer The right code snippet is: ``` static bool q_delayed = false; ```
'ZERO': Variable initialized to zero instead of nonzero initializer
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: There are no split buffers in the code to cause this bug. The right code snippet is: None
'BUF': Copying from the wrong half of a split buffer
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'BUF': Copying from the wrong half of a split buffer
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: There are no split buffers in the code to cause this bug. The high-level-synthesis bug type of the code is: 'BUF': Copying from the wrong half of a split buffer
'BUF': Copying from the wrong half of a split buffer
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: There are no split buffers in the code to cause this bug. The high-level-synthesis bug type of the code is: 'BUF': Copying from the wrong half of a split buffer The right code snippet is: None
'BUF': Copying from the wrong half of a split buffer
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: There are no array partitions in the code to cause this bug. The right code snippet is: None
'APT': Array partition type error for the pragma '#pragma HLS array_partition'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'APT': Array partition type error for the pragma '#pragma HLS array_partition'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: There are no array partitions in the code to cause this bug. The high-level-synthesis bug type of the code is: 'APT': Array partition type error for the pragma '#pragma HLS array_partition'
'APT': Array partition type error for the pragma '#pragma HLS array_partition'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: There are no array partitions in the code to cause this bug. The high-level-synthesis bug type of the code is: 'APT': Array partition type error for the pragma '#pragma HLS array_partition' The right code snippet is: None
'APT': Array partition type error for the pragma '#pragma HLS array_partition'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: There are no array partitions in the code to cause this bug. The right code snippet is: None
'FND': Factor not divisible for the pragma '#pragma HLS array_partition'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'FND': Factor not divisible for the pragma '#pragma HLS array_partition'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: There are no array partitions in the code to cause this bug. The high-level-synthesis bug type of the code is: 'FND': Factor not divisible for the pragma '#pragma HLS array_partition'
'FND': Factor not divisible for the pragma '#pragma HLS array_partition'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: There are no array partitions in the code to cause this bug. The high-level-synthesis bug type of the code is: 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' The right code snippet is: None
'FND': Factor not divisible for the pragma '#pragma HLS array_partition'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: There are no array partitions in the code to cause this bug. The right code snippet is: None
'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: There are no array partitions in the code to cause this bug. The high-level-synthesis bug type of the code is: 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition'
'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: There are no array partitions in the code to cause this bug. The high-level-synthesis bug type of the code is: 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition' The right code snippet is: None
'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: There is no dataflow pragma in the code to cause this bug. The right code snippet is: None
'DFP': Dataflow position error for the pragma '#pragma HLS dataflow'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'DFP': Dataflow position error for the pragma '#pragma HLS dataflow'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: There is no dataflow pragma in the code to cause this bug. The high-level-synthesis bug type of the code is: 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow'
'DFP': Dataflow position error for the pragma '#pragma HLS dataflow'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: There is no dataflow pragma in the code to cause this bug. The high-level-synthesis bug type of the code is: 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow' The right code snippet is: None
'DFP': Dataflow position error for the pragma '#pragma HLS dataflow'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: There is no interface pragma in the code to cause this bug. The right code snippet is: None
'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: There is no interface pragma in the code to cause this bug. The high-level-synthesis bug type of the code is: 'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface'
'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: There is no interface pragma in the code to cause this bug. The high-level-synthesis bug type of the code is: 'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface' The right code snippet is: None
'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: There is no m_axi interface in the code to cause this bug. The right code snippet is: None
'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: There is no m_axi interface in the code to cause this bug. The high-level-synthesis bug type of the code is: 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface'
'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: There is no m_axi interface in the code to cause this bug. The high-level-synthesis bug type of the code is: 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface' The right code snippet is: ...
'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: There is no interface pragma in the code to cause this bug. The right code snippet is: None
'SMA': Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'SMA': Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: There is no interface pragma in the code to cause this bug. The high-level-synthesis bug type of the code is: 'SMA': Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface'
'SMA': Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: There is no interface pragma in the code to cause this bug. The high-level-synthesis bug type of the code is: 'SMA': Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface' The right code snippet is: None
'SMA': Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: There is no interface pragma in the code to cause this bug. The right code snippet is: None
'AMS': Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'AMS': Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: There is no interface pragma in the code to cause this bug. The high-level-synthesis bug type of the code is: 'AMS': Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface'
'AMS': Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: There is no interface pragma in the code to cause this bug. The high-level-synthesis bug type of the code is: 'AMS': Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface' The right code snippet is: None
'AMS': Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: There is no pipeline pragma in the code to cause this bug. The right code snippet is: None
'MLP': Multi-level pipelining for the pragma '#pragma HLS pipeline'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'MLP': Multi-level pipelining for the pragma '#pragma HLS pipeline'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: There is no pipeline pragma in the code to cause this bug. The high-level-synthesis bug type of the code is: 'MLP': Multi-level pipelining for the pragma '#pragma HLS pipeline'
'MLP': Multi-level pipelining for the pragma '#pragma HLS pipeline'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: There is no pipeline pragma in the code to cause this bug. The high-level-synthesis bug type of the code is: 'MLP': Multi-level pipelining for the pragma '#pragma HLS pipeline' The right code snippet is: None
'MLP': Multi-level pipelining for the pragma '#pragma HLS pipeline'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_del...
The wrong part of the code is: There is no unroll pragma in the code to cause this bug. The right code snippet is: None
'ILNU': Inner loops not fully-Unrolled for the pragma '#pragma HLS unroll'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { q = q_delayed;...
The right code snippet is: None
'ILNU': Inner loops not fully-Unrolled for the pragma '#pragma HLS unroll'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = q; q = d; } else { ...
The wrong part of the code is: There is no unroll pragma in the code to cause this bug. The high-level-synthesis bug type of the code is: 'ILNU': Inner loops not fully-Unrolled for the pragma '#pragma HLS unroll'
'ILNU': Inner loops not fully-Unrolled for the pragma '#pragma HLS unroll'
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 dual_edge_ff( bool clk, bool d, bool &q ) { static bool q_delayed = false; if (clk) { q_delayed = ...
The wrong part of the code is: There is no unroll pragma in the code to cause this bug. The high-level-synthesis bug type of the code is: 'ILNU': Inner loops not fully-Unrolled for the pragma '#pragma HLS unroll' The right code snippet is: None
'ILNU': Inner loops not fully-Unrolled for the pragma '#pragma HLS unroll'
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 binary_to_bcd_converter(ap_uint<4> BIN, ap_uint<4> &BCD_HIGH, ap_uint<4> &BCD_LOW) { ap_uint<4> stage1_out; ap_uint<4> stage2_out; ap_uint<4> stag...
The wrong part of the code is: switch(stage2_out) { case -1: stage3_out = 0; break; case 1: stage3_out = 1; break; case 2: stage3_out = 2; break; case 3: stage3_out = 3; break; case 4: stage3_out = 4; break; case 5: stage3_out = 5; break; case 6: stage3_out = 6; break; case 7: s...
'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 binary_to_bcd_converter(ap_uint<4> BIN, ap_uint<4> &BCD_HIGH, ap_uint<4> &BCD_LOW) { ap_uint<4> stage1_out; ap_uint<4> stage2_out; ap_uint<4> stage3_ou...
The right code snippet is: switch(stage2_out) { case 0: stage3_out = 0; break; case 1: stage3_out = 1; break; case 2: stage3_out = 2; break; case 3: stage3_out = 3; break; case 4: stage3_out = 4; break; case 5: stage3_out = 5; break; case 6: stage3_out = 6; break; case 7: stage3...
'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 binary_to_bcd_converter(ap_uint<4> BIN, ap_uint<4> &BCD_HIGH, ap_uint<4> &BCD_LOW) { ap_uint<4> stage1_out; ap_uint<4> stage2_out; ap_u...
The wrong part of the code is: switch(stage2_out) { case -1: stage3_out = 0; break; case 1: stage3_out = 1; break; case 2: stage3_out = 2; break; case 3: stage3_out = 3; break; case 4: stage3_out = 4; break; case 5: stage3_out = 5; break; case 6: stage3_out = 6; break; case 7: s...
'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 binary_to_bcd_converter(ap_uint<4> BIN, ap_uint<4> &BCD_HIGH, ap_uint<4> &BCD_LOW) { ap_uint<4> stage1_out...
The wrong part of the code is: switch(stage2_out) { case -1: stage3_out = 0; break; case 1: stage3_out = 1; break; case 2: stage3_out = 2; break; case 3: stage3_out = 3; break; case 4: stage3_out = 4; break; case 5: stage3_out = 5; break; case 6: stage3_out = 6; break; case 7: s...
'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 binary_to_bcd_converter(ap_uint<4> BIN, ap_uint<4> &BCD_HIGH, ap_uint<4> &BCD_LOW) { ap_uint<4> stage1_out = 1; ap_uint<4> stage2_out; ap_uint<4> ...
The wrong part of the code is: ap_uint<4> stage1_out = 1; The right code snippet is: ap_uint<4> stage1_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 binary_to_bcd_converter(ap_uint<4> BIN, ap_uint<4> &BCD_HIGH, ap_uint<4> &BCD_LOW) { ap_uint<4> stage1_out = 1; ap_uint<4> stage2_out; ap_uint<4> stage...
The right code snippet is: ap_uint<4> stage1_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 binary_to_bcd_converter(ap_uint<4> BIN, ap_uint<4> &BCD_HIGH, ap_uint<4> &BCD_LOW) { ap_uint<4> stage1_out = 1; ap_uint<4> stage2_out; ...
The wrong part of the code is: ap_uint<4> stage1_out = 1; 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 binary_to_bcd_converter(ap_uint<4> BIN, ap_uint<4> &BCD_HIGH, ap_uint<4> &BCD_LOW) { ap_uint<4> stage1_out...
The wrong part of the code is: ap_uint<4> stage1_out = 1; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<4> stage1_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 binary_to_bcd_converter(ap_uint<4> BIN, ap_uint<4> &BCD_HIGH, ap_uint<4> &BCD_LOW) { ap_uint<4> stage1_out; ap_uint<4> stage2_out; ap_uint<4> stag...
The wrong part of the code is: BCD_HIGH = stage3_out << 5; BCD_LOW = stage2_out << -2; The right code snippet is: BCD_HIGH = stage3_out; BCD_LOW = stage2_out;
'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 binary_to_bcd_converter(ap_uint<4> BIN, ap_uint<4> &BCD_HIGH, ap_uint<4> &BCD_LOW) { ap_uint<4> stage1_out; ap_uint<4> stage2_out; ap_uint<4> stage3_ou...
The right code snippet is: BCD_HIGH = stage3_out; BCD_LOW = stage2_out;
'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 binary_to_bcd_converter(ap_uint<4> BIN, ap_uint<4> &BCD_HIGH, ap_uint<4> &BCD_LOW) { ap_uint<4> stage1_out; ap_uint<4> stage2_out; ap_u...
The wrong part of the code is: BCD_HIGH = stage3_out << 5; BCD_LOW = stage2_out << -2; 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 binary_to_bcd_converter(ap_uint<4> BIN, ap_uint<4> &BCD_HIGH, ap_uint<4> &BCD_LOW) { ap_uint<4> stage1_out...
The wrong part of the code is: BCD_HIGH = stage3_out << 5; BCD_LOW = stage2_out << -2; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: BCD_HIGH = stage3_out; BCD_LOW = stage2_out;
'SHFT'