instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_none port=DECR
#pragma HLS INTERFACE ap_none port=INCR
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
for (int i = 0; i < 7; i++) {
Q += stack[i];
}
The right code snippet is:
for (int i = 0; i < 8; i++) {
Q += stack[i];
} | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_none port=DECR
#pragma HLS INTERFACE ap_none port=INCR
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
for (int i = 0; i < 8; i++) {
Q += stack[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:
#pragma HLS INTERFACE ap_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_none port=DECR
#pragma HLS INTERFACE ap_none port=INCR
#pragma HLS INTER... |
The wrong part of the code is:
for (int i = 0; i < 7; i++) {
Q += stack[i];
}
The high-level-synthesis bug type of the code is: ILNU | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=CLK
#pragma HLS INTERFACE ap_rst port=RST
#pragma HLS INTERFACE ap_none port=DECR
#pragma HLS INTERFAC... |
The wrong part of the code is:
for (int i = 0; i < 7; i++) {
Q += stack[i];
}
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
for (int i = 0; i < 8; i++) {
Q += stack[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:
#include <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
if (threshold >= counter) {
pwm_out = max_pulse_width;
} else {
pwm_out = min_pulse_width;
}
The right code snippet is:
if (threshold > counter) {
pwm_out = max_pulse_width;
} else {
pwm_out = min_pulse_width;
} | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
if (threshold > counter) {
pwm_out = max_pulse_width;
} else {
pwm_out = min_pulse_width;
} | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
if (threshold >= counter) {
pwm_out = max_pulse_width;
} else {
pwm_out = min_pulse_width;
}
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
if (threshold >= counter) {
pwm_out = max_pulse_width;
} else {
pwm_out = min_pulse_width;
}
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
if (threshold > counter) {
pwm_out = max_pulse_width;
} else {
pwm_out = min_pulse_w... | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
static ap_uint<16> counter;
static ap_uint<16> threshold;
The right code snippet is:
static ap_uint<16> counter = 0;
static ap_uint<16> threshold = 0; | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
static ap_uint<16> counter = 0;
static ap_uint<16> threshold = 0; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
static ap_uint<16> counter;
static ap_uint<16> threshold;
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
static ap_uint<16> counter;
static ap_uint<16> threshold;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static ap_uint<16> counter = 0;
static ap_uint<16> threshold = 0; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
threshold = pwm_in << 17;
The right code snippet is:
threshold = pwm_in; | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
threshold = pwm_in; | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
threshold = pwm_in << 17;
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
threshold = pwm_in << 17;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
threshold = pwm_in; | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
if (counter >= resolution) {
counter = 0;
threshold = pwm_in;
}
The right code snippet is:
if (counter == resolution) {
counter = 0;
threshold = pwm_in;
} | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
if (counter == resolution) {
counter = 0;
threshold = pwm_in;
} | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
if (counter >= resolution) {
counter = 0;
threshold = pwm_in;
}
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
if (counter >= resolution) {
counter = 0;
threshold = pwm_in;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (counter == resolution) {
counter = 0;
threshold = pwm_in;
} | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
ap_int<16> threshold = 0;
The right code snippet is:
ap_uint<16> threshold = 0; | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
ap_uint<16> threshold = 0; | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
ap_int<16> threshold = 0;
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
ap_int<16> threshold = 0;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_uint<16> threshold = 0; | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
// some code
}
The right code snippet is:
for (int i = 0; i < 4; i++) {
// some code
} | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
for (int i = 0; i < 4; i++) {
// some code
} | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
// some code
}
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
// some code
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < 4; i++) {
// some code
} | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
ap_uint<16> threshold;
The right code snippet is:
ap_uint<16> threshold = 0; | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
ap_uint<16> threshold = 0; | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
ap_uint<16> threshold;
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
ap_uint<16> threshold;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<16> threshold = 0; | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
memcpy(buffer1, buffer2 + sizeof(buffer1), 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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
memcpy(buffer1, buffer2 + sizeof(buffer1), 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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
memcpy(buffer1, buffer2 + sizeof(buffer1), 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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer1 cyclic dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=buffer1 complete 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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=buffer1 complete 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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer1 cyclic 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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer1 cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=buffer1 complete 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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer1 complete dim=2
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=buffer1 complete 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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=buffer1 complete 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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer1 complete dim=2
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer1 complete dim=2
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=buffer1 complete 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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer1 complete dim=3
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=buffer1 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:
#include <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=buffer1 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:
#include <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer1 complete dim=3
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer1 complete dim=3
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=buffer1 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:
#include <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
#pragma HLS DATAFLOW wait=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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
#pragma HLS DATAFLOW wait=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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
#pragma HLS DATAFLOW wait=2
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 <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=pwm_in
The right code snippet is:
#pragma HLS INTERFACE ap_none port=pwm_in | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=pwm_in | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=pwm_in
The high-level-synthesis bug type of the code is: 'IDAP' | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=pwm_in
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=pwm_in | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=buffer1 offset=none
The right code snippet is:
#pragma HLS INTERFACE m_axi port=buffer1 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 <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
#pragma HLS INTERFACE m_axi port=buffer1 offset=slave | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=buffer1 offset=none
The high-level-synthesis bug type of the code is: 'RAMB' | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=buffer1 offset=none
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS INTERFACE m_axi port=buffer1 offset=slave | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=pwm_in
The right code snippet is:
#pragma HLS INTERFACE ap_none port=pwm_in | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=pwm_in | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=pwm_in
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=pwm_in
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=pwm_in | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=buffer1
The right code snippet is:
#pragma HLS INTERFACE ap_vld port=buffer1 | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
#pragma HLS INTERFACE ap_vld port=buffer1 | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=buffer1
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=buffer1
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE ap_vld port=buffer1 | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
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 <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
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 <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
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 <ap_int.h>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in H... |
The wrong part of the code is:
#pragma HLS UNROLL factor=3
The right code snippet is:
#pragma HLS UNROLL factor=4 | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = 50; // in Hz
con... |
The right code snippet is:
#pragma HLS UNROLL factor=4 | '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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in microseconds
const ap_uint<16> frequency = ... |
The wrong part of the code is:
#pragma HLS UNROLL factor=3
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>
const ap_uint<16> min_pulse_width = 1000; // in microseconds
const ap_uint<16> max_pulse_width = 2000; // in micros... |
The wrong part of the code is:
#pragma HLS UNROLL factor=3
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
#pragma HLS UNROLL factor=4 | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> PARAM1 = 32... |
The wrong part of the code is:
temp_reg = i_reg_example + 1;
The right code snippet is:
temp_reg = i_reg_example; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> PARAM1 = 32'h000... |
The right code snippet is:
temp_reg = i_reg_example; | '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:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> ... |
The wrong part of the code is:
temp_reg = i_reg_example + 1;
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//... |
The wrong part of the code is:
temp_reg = i_reg_example + 1;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
temp_reg = i_reg_example; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> PARAM1 = 32... |
The wrong part of the code is:
ap_uint<8> temp_reg = 0;
The right code snippet is:
ap_uint<8> temp_reg; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> PARAM1 = 32'h000... |
The right code snippet is:
ap_uint<8> temp_reg; | '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:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> ... |
The wrong part of the code is:
ap_uint<8> temp_reg = 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:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//... |
The wrong part of the code is:
ap_uint<8> temp_reg = 0;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<8> temp_reg; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> PARAM1 = 32... |
The wrong part of the code is:
temp_reg = i_reg_example << 10;
The right code snippet is:
temp_reg = i_reg_example; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> PARAM1 = 32'h000... |
The right code snippet is:
temp_reg = i_reg_example; | '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:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> ... |
The wrong part of the code is:
temp_reg = i_reg_example << 10;
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:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//... |
The wrong part of the code is:
temp_reg = i_reg_example << 10;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
temp_reg = i_reg_example; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> PARAM1 = 32... |
The wrong part of the code is:
while(true) {
temp_reg = i_reg_example;
o_reg_example = temp_reg;
}
The right code snippet is:
if (clk) {
temp_reg = i_reg_example;
o_reg_example = temp_reg;
} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> PARAM1 = 32'h000... |
The right code snippet is:
if (clk) {
temp_reg = i_reg_example;
o_reg_example = temp_reg;
} | '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:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> ... |
The wrong part of the code is:
while(true) {
temp_reg = i_reg_example;
o_reg_example = temp_reg;
}
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:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//... |
The wrong part of the code is:
while(true) {
temp_reg = i_reg_example;
o_reg_example = temp_reg;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (clk) {
temp_reg = i_reg_example;
o_reg_example = temp_reg;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> PARAM1 = 32... |
The wrong part of the code is:
ap_int<8> temp_reg;
The right code snippet is:
ap_uint<8> temp_reg; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> PARAM1 = 32'h000... |
The right code snippet is:
ap_uint<8> temp_reg; | '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:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> ... |
The wrong part of the code is:
ap_int<8> temp_reg;
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:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//... |
The wrong part of the code is:
ap_int<8> temp_reg;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_uint<8> temp_reg; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> PARAM1 = 32... |
The wrong part of the code is:
for (int i = 0; i < 10; i+=2) {
temp_reg = i_reg_example;
o_reg_example = temp_reg;
}
The right code snippet is:
for (int i = 0; i < 10; i++) {
temp_reg = i_reg_example;
o_reg_example = temp_reg;
} | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> PARAM1 = 32'h000... |
The right code snippet is:
for (int i = 0; i < 10; i++) {
temp_reg = i_reg_example;
o_reg_example = temp_reg;
} | '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:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//local parameters
const ap_uint<32> ... |
The wrong part of the code is:
for (int i = 0; i < 10; i+=2) {
temp_reg = i_reg_example;
o_reg_example = temp_reg;
}
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:
```c++
#include <ap_int.h>
void sdio_function_template (bool clk, bool rst, ap_uint<8> i_reg_example, ap_uint<8> &o_reg_example) {
//... |
The wrong part of the code is:
for (int i = 0; i < 10; i+=2) {
temp_reg = i_reg_example;
o_reg_example = temp_reg;
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < 10; i++) {
temp_reg = i_reg_example;
o_reg_example = temp_reg;
... | 'MLU' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.