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_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady... |
The wrong part of the code is:
for (int i = 0; i < depth_out/2; i++) {
#pragma HLS UNROLL
}
for (int i = depth_out/2; i < depth_out; i++) {
The right code snippet is:
for (int i = 0; i < depth_out; i++) { | MLU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady_out,... |
The right code snippet is:
for (int i = 0; i < depth_out; i++) { | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> ... |
The wrong part of the code is:
for (int i = 0; i < depth_out/2; i++) {
#pragma HLS UNROLL
}
for (int i = depth_out/2; i < depth_out; i++) {
The high-level-synthesis bug type of the code is: MLU | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,... |
The wrong part of the code is:
for (int i = 0; i < depth_out/2; i++) {
#pragma HLS UNROLL
}
for (int i = depth_out/2; i < depth_out; i++) {
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
for (int i = 0; i < depth_out; i++) { | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady... |
The wrong part of the code is:
bool inputFull = 0;
The right code snippet is:
bool inputFull; | ZERO |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady_out,... |
The right code snippet is:
bool inputFull; | ZERO |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> ... |
The wrong part of the code is:
bool inputFull = 0;
The high-level-synthesis bug type of the code is: ZERO | ZERO |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,... |
The wrong part of the code is:
bool inputFull = 0;
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
bool inputFull; | ZERO |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_stream.h>
void fifo_out_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputR... |
The wrong part of the code is:
fifo_out
The right code snippet is:
fifo | BUF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void fifo_out_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady_... |
The right code snippet is:
fifo | 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_stream.h>
void fifo_out_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bo... |
The wrong part of the code is:
fifo_out
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_stream.h>
void fifo_out_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid... |
The wrong part of the code is:
fifo_out
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
fifo | 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_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady... |
The wrong part of the code is:
#pragma HLS array_partition variable=fifo cyclic factor=2
The right code snippet is:
#pragma HLS array_partition variable=fifo complete | APT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady_out,... |
The right code snippet is:
#pragma HLS array_partition variable=fifo 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:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> ... |
The wrong part of the code is:
#pragma HLS array_partition variable=fifo cyclic factor=2
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_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,... |
The wrong part of the code is:
#pragma HLS array_partition variable=fifo cyclic factor=2
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pragma HLS array_partition variable=fifo 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:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady... |
The wrong part of the code is:
#pragma HLS array_partition variable=fifo cyclic factor=3
The right code snippet is:
#pragma HLS array_partition variable=fifo complete | FND |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady_out,... |
The right code snippet is:
#pragma HLS array_partition variable=fifo 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:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> ... |
The wrong part of the code is:
#pragma HLS array_partition variable=fifo 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:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,... |
The wrong part of the code is:
#pragma HLS array_partition variable=fifo cyclic factor=3
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS array_partition variable=fifo 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:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady... |
The wrong part of the code is:
#pragma HLS array_partition variable=fifo dim=2 complete
The right code snippet is:
#pragma HLS array_partition variable=fifo complete | DID |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady_out,... |
The right code snippet is:
#pragma HLS array_partition variable=fifo complete | 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_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> ... |
The wrong part of the code is:
#pragma HLS array_partition variable=fifo dim=2 complete
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_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,... |
The wrong part of the code is:
#pragma HLS array_partition variable=fifo dim=2 complete
The high-level-synthesis bug type of the code is: DID
The right code snippet is:
#pragma HLS array_partition variable=fifo complete | 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_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady... |
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_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady_out,... |
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_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> ... |
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_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,... |
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_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=outputData_out
The right code snippet is:
#pragma HLS interface axis port=outputData_out | IDAP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady_out,... |
The right code snippet is:
#pragma HLS interface axis port=outputData_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 <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> ... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=outputData_out
The high-level-synthesis bug type of the code is: IDAP | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=outputData_out
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
#pragma HLS interface axis port=outputData_out | 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_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady... |
The wrong part of the code is:
#pragma HLS interface m_axi port=outputData_out offset=slave bundle=gmem
The right code snippet is:
#pragma HLS interface m_axi port=outputData_out | RAMB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady_out,... |
The right code snippet is:
#pragma HLS interface m_axi port=outputData_out | 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_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> ... |
The wrong part of the code is:
#pragma HLS interface m_axi port=outputData_out offset=slave bundle=gmem
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_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,... |
The wrong part of the code is:
#pragma HLS interface m_axi port=outputData_out offset=slave bundle=gmem
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
#pragma HLS interface m_axi port=outputData_out | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady... |
The wrong part of the code is:
#pragma HLS interface bram port=outputData_out
The right code snippet is:
#pragma HLS interface ap_fifo port=outputData_out | SMA |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady_out,... |
The right code snippet is:
#pragma HLS interface ap_fifo port=outputData_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 <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> ... |
The wrong part of the code is:
#pragma HLS interface bram port=outputData_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 <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,... |
The wrong part of the code is:
#pragma HLS interface bram port=outputData_out
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
#pragma HLS interface ap_fifo port=outputData_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 <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=outputData_out
The right code snippet is:
#pragma HLS interface axis port=outputData_out | AMS |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady_out,... |
The right code snippet is:
#pragma HLS interface axis port=outputData_out | AMS |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> ... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=outputData_out
The high-level-synthesis bug type of the code is: AMS | AMS |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=outputData_out
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
#pragma HLS interface axis port=outputData_out | 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 <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
#pragma HLS pipeline II=1 | MLP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady_out,... |
The right code snippet is:
#pragma HLS pipeline II=1 | 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 <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> ... |
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 <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,... |
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 II=1 | 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 <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady... |
The wrong part of the code is:
for (int i = 0; i < depth_out; i+=2) {
#pragma HLS UNROLL
}
The right code snippet is:
for (int i = 0; i < depth_out; i++) { | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> &inputReady_out,... |
The right code snippet is:
for (int i = 0; i < depth_out; i++) { | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,
hls::stream<bool> ... |
The wrong part of the code is:
for (int i = 0; i < depth_out; i+=2) {
#pragma HLS UNROLL
}
The high-level-synthesis bug type of the code is: ILNU | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_stream.h>
void fifo_wrapper(hls::stream<unsigned char> &inputData_in,
hls::stream<bool> &inputValid_in,... |
The wrong part of the code is:
for (int i = 0; i < depth_out; i+=2) {
#pragma HLS UNROLL
}
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
for (int i = 0; i < depth_out; i++) { | 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 SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
Q = D[10];
The right code snippet is:
Q = D; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK
... |
The right code snippet is:
Q = D; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
Q = D[10];
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
Q = D[10];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
Q = D; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
static bool Q, D = true;
The right code snippet is:
static bool Q, D; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK
... |
The right code snippet is:
static bool Q, D; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
static bool Q, D = true;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
static bool Q, D = true;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static bool Q, D; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
Q = D << 32;
The right code snippet is:
Q = D << 4; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK
... |
The right code snippet is:
Q = D << 4; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
Q = D << 32;
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
Q = D << 32;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
Q = D << 4; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
while (EN & TE) {
Q = D;
}
The right code snippet is:
if (EN & TE) {
Q = D;
} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK
... |
The right code snippet is:
if (EN & TE) {
Q = D;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
while (EN & TE) {
Q = D;
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
while (EN & TE) {
Q = D;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (EN & TE) {
Q = D;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
static int Q, D;
The right code snippet is:
static bool Q, D; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK
... |
The right code snippet is:
static bool Q, D; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
static int Q, D;
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
static int Q, D;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
static bool Q, D; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
Q = D;
for (int i = 0; i < 10; i++) {
Q = D;
}
The right code snippet is:
for (int i = 0; i < 10; i++) {
Q = D;
} | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK
... |
The right code snippet is:
for (int i = 0; i < 10; i++) {
Q = D;
} | '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:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
Q = D;
for (int i = 0; i < 10; i++) {
Q = D;
}
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:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
Q = D;
for (int i = 0; i < 10; i++) {
Q = D;
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < 10; i++) {
Q = D;
} | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
static bool Q = false, D;
The right code snippet is:
static bool Q, D; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK
... |
The right code snippet is:
static bool Q, D; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
static bool Q = false, D;
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
static bool Q = false, D;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static bool Q, D; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
memcpy(buffer1, buffer2 + size, size);
The right code snippet is:
memcpy(buffer1, buffer2, size); | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK
... |
The right code snippet is:
memcpy(buffer1, buffer2, size); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
memcpy(buffer1, buffer2 + size, size);
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:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
memcpy(buffer1, buffer2 + size, size);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
memcpy(buffer1, buffer2, size); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
#pragma HLS array_partition variable=D cyclic
The right code snippet is:
#pragma HLS array_partition variable=D complete | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK
... |
The right code snippet is:
#pragma HLS array_partition variable=D 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:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS array_partition variable=D 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:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS array_partition variable=D cyclic
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=D 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:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
#pragma HLS array_partition variable=D complete factor=3
The right code snippet is:
#pragma HLS array_partition variable=D complete factor=2 | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK
... |
The right code snippet is:
#pragma HLS array_partition variable=D complete factor=2 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS array_partition variable=D complete 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:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS array_partition variable=D complete factor=3
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=D complete factor=2 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
#pragma HLS array_partition variable=D complete dim=2
The right code snippet is:
#pragma HLS array_partition variable=D complete dim=1 | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK
... |
The right code snippet is:
#pragma HLS array_partition variable=D complete 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:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS array_partition variable=D complete 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:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS array_partition variable=D complete dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=D complete 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:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
#pragma HLS dataflow region
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:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=CLK
... |
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:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS dataflow region
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:
```
void SNPS_CLOCK_GATE_HIGH_Up_counter_COUNTER_WIDTH4 (bool CLK, bool EN, bool TE, bool& ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS dataflow region
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.