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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) {
const ap_uint<8> pwm_width = 8;
const ap_uint<8> pwm_frequency =... |
The wrong part of the code is:
for (int i = 0; i < 10; i+=2) {}
The right code snippet is:
for (int i = 0; i < 10; i++) {} | '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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) {
const ap_uint<8> pwm_width = 8;
const ap_uint<8> pwm_frequency = 100;... |
The right code snippet is:
for (int i = 0; i < 10; 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 <ap_int.h>
void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) {
const ap_uint<8> pwm_width = 8;
const ap_uint<8> pwm_... |
The wrong part of the code is:
for (int i = 0; i < 10; i+=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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) {
const ap_uint<8> p... |
The wrong part of the code is:
for (int i = 0; i < 10; i+=2) {}
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
for (int i = 0; i < 10; 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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
mem[addr+1] = din;
The right code snippet is:
mem[addr] = din; | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
mem[addr] = din; | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
mem[addr+1] = din;
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
mem[addr+1] = din;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
mem[addr] = din; | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
ap_uint<m> mem[k];
The right code snippet is:
static ap_uint<m> mem[k]; | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
static ap_uint<m> mem[k]; | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
ap_uint<m> mem[k];
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
ap_uint<m> mem[k];
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static ap_uint<m> mem[k]; | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
dout = din << (n+1);
The right code snippet is:
dout = din << n; | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
dout = din << n; | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
dout = din << (n+1);
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
dout = din << (n+1);
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
dout = din << n; | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// some code here
}
The right code snippet is:
for (int i = 0; i < k; i++) {
// some code here
} | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
for (int i = 0; i < k; i++) {
// some code here
} | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// some code here
}
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// some code here
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
for (int i = 0; i < k; i++) {
// some code here
} | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
ap_uint<m> x = 5;
The right code snippet is:
ap_int<m> x = 5; | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
ap_int<m> x = 5; | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
ap_uint<m> x = 5;
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
ap_uint<m> x = 5;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_int<m> x = 5; | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
for (int i = 0; i < k-1; i++) {
// some code here
}
The right code snippet is:
for (int i = 0; i < k; i++) {
// some code here
} | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
for (int i = 0; i < k; i++) {
// some code here
} | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
for (int i = 0; i < k-1; i++) {
// some code here
}
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
for (int i = 0; i < k-1; i++) {
// some code here
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < k; i++) {
// some code here
} | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
ap_uint<m> x;
The right code snippet is:
ap_uint<m> x = 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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
ap_uint<m> x = 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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
ap_uint<m> x;
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
ap_uint<m> x;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<m> x = 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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
memcpy(mem1, mem2+(k/2), k/2);
The right code snippet is:
memcpy(mem1, mem2, k/2); | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
memcpy(mem1, mem2, k/2); | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
memcpy(mem1, mem2+(k/2), k/2);
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
memcpy(mem1, mem2+(k/2), k/2);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
memcpy(mem1, mem2, k/2); | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem cyclic dim=0
The right code snippet is:
#pragma HLS array_partition variable=mem complete dim=0 | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
#pragma HLS array_partition variable=mem complete dim=0 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem cyclic dim=0
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem cyclic dim=0
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=mem complete dim=0 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem complete dim=1
The right code snippet is:
#pragma HLS array_partition variable=mem complete dim=0 | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
#pragma HLS array_partition variable=mem complete dim=0 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem complete dim=1
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem complete dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=mem complete dim=0 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem complete dim=2
The right code snippet is:
#pragma HLS array_partition variable=mem complete dim=0 | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
#pragma HLS array_partition variable=mem complete dim=0 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem 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:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem complete dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=mem complete dim=0 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
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:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> 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:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
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:
#include <ap_int.h>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
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' |
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=mem
The right code snippet is:
#pragma HLS interface ap_none port=mem | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
#pragma HLS interface ap_none port=mem | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=mem
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=mem
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface ap_none port=mem | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=mem
The right code snippet is:
#pragma HLS interface m_axi port=mem | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
#pragma HLS interface m_axi port=mem | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=mem
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=mem
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi port=mem | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
#pragma HLS interface bram port=x
The right code snippet is:
#pragma HLS interface ap_none port=x | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
#pragma HLS interface ap_none port=x | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
#pragma HLS interface bram port=x
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
#pragma HLS interface bram port=x
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface ap_none port=x | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
#pragma HLS interface ap_none port=mem
The right code snippet is:
#pragma HLS interface ap_fifo port=mem | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
#pragma HLS interface ap_fifo port=mem | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
#pragma HLS interface ap_none port=mem
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
#pragma HLS interface ap_none port=mem
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface ap_fifo port=mem | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
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>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
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>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
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>
const int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1>... |
The wrong part of the code is:
for (int i = 0; i < k; i+=2) {
// some code here
}
The right code snippet is:
for (int i = 0; i < k; i++) {
// some code here
} | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM(ap_uint<1> clk,... |
The right code snippet is:
for (int i = 0; i < k; i++) {
// some code here
} | '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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of memory locations
void single_port_RAM... |
The wrong part of the code is:
for (int i = 0; i < k; i+=2) {
// some code here
}
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 int n = 4; // number of address bits
const int m = 8; // number of data bits
const int k = 16; // number of m... |
The wrong part of the code is:
for (int i = 0; i < k; i+=2) {
// some code here
}
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
for (int i = 0; i < k; i++) {
// some code here
} | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HLS INTERFACE... |
The wrong part of the code is:
stage1 <= input_data[8:1];
stage2 <= stage1;
The right code snippet is:
stage1 <= input_data;
stage2 <= stage1; | 'OOB' |
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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
stage1 <= input_data;
stage2 <= stage1; | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HL... |
The wrong part of the code is:
stage1 <= input_data[8:1];
stage2 <= stage1;
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
stage1 <= input_data[8:1];
stage2 <= stage1;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
stage1 <= input_data;
stage2 <= stage1; | 'OOB' |
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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HLS INTERFACE... |
The wrong part of the code is:
reg [7:0] stage1 = 8'bX;
reg [7:0] stage2 = 8'bX;
The right code snippet is:
reg [7:0] stage1;
reg [7:0] stage2; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
reg [7:0] stage1;
reg [7:0] stage2; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HL... |
The wrong part of the code is:
reg [7:0] stage1 = 8'bX;
reg [7:0] stage2 = 8'bX;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
reg [7:0] stage1 = 8'bX;
reg [7:0] stage2 = 8'bX;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
reg [7:0] stage1;
reg [7:0] stage2; | 'INIT' |
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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HLS INTERFACE... |
The wrong part of the code is:
stage1 <= stage2 << 8;
stage2 <= stage1;
The right code snippet is:
stage1 <= stage2 << 1;
stage2 <= stage1; | 'SHFT' |
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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
stage1 <= stage2 << 1;
stage2 <= stage1; | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HL... |
The wrong part of the code is:
stage1 <= stage2 << 8;
stage2 <= stage1;
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
stage1 <= stage2 << 8;
stage2 <= stage1;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
stage1 <= stage2 << 1;
stage2 <= stage1; | 'SHFT' |
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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HLS INTERFACE... |
The wrong part of the code is:
if (shift) begin
stage1 <= stage2 << 1;
stage2 <= stage1;
end
else begin
while (1) begin
// Infinite loop
end
end
The right code snippet is:
if (shift) begin
stage1 <= stage2 << 1;
stage2 <= stage1;
end | 'INF' |
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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
if (shift) begin
stage1 <= stage2 << 1;
stage2 <= stage1;
end | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HL... |
The wrong part of the code is:
if (shift) begin
stage1 <= stage2 << 1;
stage2 <= stage1;
end
else begin
while (1) begin
// Infinite loop
end
end
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
if (shift) begin
stage1 <= stage2 << 1;
stage2 <= stage1;
end
else begin
while (1) begin
// Infinite loop
end
end
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (shift) begin
stage1 <= stage2 << 1;
... | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HLS INTERFACE... |
The wrong part of the code is:
stage1 <= $signed(input_data);
stage2 <= stage1;
The right code snippet is:
stage1 <= input_data;
stage2 <= stage1; | 'USE' |
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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
stage1 <= input_data;
stage2 <= stage1; | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HL... |
The wrong part of the code is:
stage1 <= $signed(input_data);
stage2 <= stage1;
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
stage1 <= $signed(input_data);
stage2 <= stage1;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
stage1 <= input_data;
stage2 <= stage1; | 'USE' |
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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HLS INTERFACE... |
The wrong part of the code is:
if (shift) begin
stage1 <= stage2;
stage2 <= stage1;
end
The right code snippet is:
if (shift) begin
stage1 <= stage2 << 1;
stage2 <= stage1;
end | 'MLU' |
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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
if (shift) begin
stage1 <= stage2 << 1;
stage2 <= stage1;
end | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=load
#pragma HL... |
The wrong part of the code is:
if (shift) begin
stage1 <= stage2;
stage2 <= stage1;
end
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
if (shift) begin
stage1 <= stage2;
stage2 <= stage1;
end
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
if (shift) begin
stage1 <= stage2 << 1;
stage2 <= stage1;
end | 'MLU' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.