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 compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(7,4) == 4'b... |
The wrong part of the code is:
N/A (no code snippet to replace)
The right code snippet is:
N/A (the code does not contain any array partition pragmas) | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(7,4) == 4'b0000)... |
The right code snippet is:
N/A (the code does not contain any array partition pragmas) | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(... |
The wrong part of the code is:
N/A (no code snippet to replace)
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap... |
The wrong part of the code is:
N/A (no code snippet to replace)
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
N/A (the code does not contain any array partition pragmas) | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(7,4) == 4'b... |
The wrong part of the code is:
N/A (no code snippet to replace)
The right code snippet is:
N/A (the code does not contain any array partition pragmas) | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(7,4) == 4'b0000)... |
The right code snippet is:
N/A (the code does not contain any array partition pragmas) | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(... |
The wrong part of the code is:
N/A (no code snippet to replace)
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap... |
The wrong part of the code is:
N/A (no code snippet to replace)
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
N/A (the code does not contain any array partition pragmas) | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(7,4) == 4'b... |
The wrong part of the code is:
N/A (no code snippet to replace)
The right code snippet is:
N/A (the code does not contain any array partition pragmas) | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(7,4) == 4'b0000)... |
The right code snippet is:
N/A (the code does not contain any array partition pragmas) | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(... |
The wrong part of the code is:
N/A (no code snippet to replace)
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap... |
The wrong part of the code is:
N/A (no code snippet to replace)
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
N/A (the code does not contain any array partition pragmas) | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(7,4) == 4'b... |
The wrong part of the code is:
N/A (no code snippet to replace)
The right code snippet is:
N/A (the code does not contain any dataflow pragmas) | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(7,4) == 4'b0000)... |
The right code snippet is:
N/A (the code does not contain any dataflow pragmas) | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(... |
The wrong part of the code is:
N/A (no code snippet to replace)
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap... |
The wrong part of the code is:
N/A (no code snippet to replace)
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
N/A (the code does not contain any dataflow pragmas) | '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>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(7,4) == 4'b... |
The wrong part of the code is:
N/A (no code snippet to replace)
The right code snippet is:
N/A (the code does not contain any interface pragmas) | '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>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(7,4) == 4'b0000)... |
The right code snippet is:
N/A (the code does not contain any interface pragmas) | '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>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap_uint<2> code;
if (data_in.range(... |
The wrong part of the code is:
N/A (no code snippet to replace)
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>
void compression_decompression(ap_uint<8> data_in, ap_uint<4>& data_out) {
// Compression algorithm
ap... |
The wrong part of the code is:
N/A (no code snippet to replace)
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
N/A (the code does not contain any interface pragmas) | '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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
ap_uint<32> data_in, data_out;
The right code snippet is:
ap_uint<32> data_in = 0, data_out = 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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
ap_uint<32> data_in = 0, data_out = 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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
ap_uint<32> data_in, data_out;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
ap_uint<32> data_in, data_out;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<32> data_in = 0, data_out = 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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
data_out = ap_uint<32>(mem_file[addr+1]);
The right code snippet is:
data_out = ap_uint<32>(mem_file[addr]); | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
data_out = ap_uint<32>(mem_file[addr]); | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
data_out = ap_uint<32>(mem_file[addr+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:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
data_out = ap_uint<32>(mem_file[addr+1]);
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
data_out = ap_uint<32>(mem_file[addr]); | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
pattern_count = 1 << (addr_width+1);
The right code snippet is:
pattern_count = 1 << addr_width; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
pattern_count = 1 << addr_width; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
pattern_count = 1 << (addr_width+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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
pattern_count = 1 << (addr_width+1);
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
pattern_count = 1 << addr_width; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
if (pattern_count != 0) {
The right code snippet is:
if (pattern_count == 0) { | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
if (pattern_count == 0) { | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
if (pattern_count != 0) {
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
if (pattern_count != 0) {
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (pattern_count == 0) { | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
ap_int<32> pattern = 0;
The right code snippet is:
ap_uint<32> pattern = 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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
ap_uint<32> pattern = 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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
ap_int<32> pattern = 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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
ap_int<32> pattern = 0;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_uint<32> pattern = 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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
for (int i = 0; i < 4; i++) {
if (pattern_count > 0) {
pattern = ap_uint<32>(rand(seed));
data_in = pattern;
expected_data = pattern;
state = READ;
} else {
state = IDLE;
done = true;
if (error_count == 0) {
pass = true;
}
}
pattern_c... | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
None | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
for (int i = 0; i < 4; i++) {
if (pattern_count > 0) {
pattern = ap_uint<32>(rand(seed));
data_in = pattern;
expected_data = pattern;
state = READ;
} else {
state = IDLE;
done = true;
if (error_count == 0) {
pass = true;
}
}
pattern_c... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
for (int i = 0; i < 4; i++) {
if (pattern_count > 0) {
pattern = ap_uint<32>(rand(seed));
data_in = pattern;
expected_data = pattern;
state = READ;
} else {
state = IDLE;
done = true;
if (error_count == 0) {
pass = true;
}
}
pattern_c... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
ap_uint<32> seed;
The right code snippet is:
ap_uint<32> seed = 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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
ap_uint<32> seed = 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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
ap_uint<32> seed;
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
ap_uint<32> seed;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<32> seed = 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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
data_out = ap_uint<32>(mem_file[addr+num_patterns]);
The right code snippet is:
data_out = ap_uint<32>(mem_file[addr]); | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
data_out = ap_uint<32>(mem_file[addr]); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
data_out = ap_uint<32>(mem_file[addr+num_patterns]);
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
data_out = ap_uint<32>(mem_file[addr+num_patterns]);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
data_out = ap_uint<32>(mem_file[addr]); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem_file cyclic factor=2 dim=1
The right code snippet is:
None | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
None | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem_file cyclic factor=2 dim=1
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem_file cyclic factor=2 dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
None | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem_file cyclic factor=3 dim=1
The right code snippet is:
None | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
None | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem_file cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem_file cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
None | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem_file cyclic factor=4 dim=2
The right code snippet is:
None | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
None | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem_file cyclic factor=4 dim=2
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem_file cyclic factor=4 dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
None | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
#pragma HLS dataflow
The right code snippet is:
None | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
None | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
None | '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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_none port=return
The right code snippet is:
None | '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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
None | '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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_none port=return
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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_none port=return
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
None | '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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
#pragma HLS interface m_axi port=mem_file offset=slave
The right code snippet is:
None | '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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
None | '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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=mem_file offset=slave
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>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
#pragma HLS interface m_axi port=mem_file offset=slave
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
None | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=mem_file
The right code snippet is:
None | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
None | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=mem_file
The high-level-synthesis bug type of the code is: 'SMA' | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=mem_file
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
None | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
#pragma HLS interface axis port=mem_file
The right code snippet is:
None | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
None | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
#pragma HLS interface axis port=mem_file
The high-level-synthesis bug type of the code is: 'AMS' | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
#pragma HLS interface axis port=mem_file
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
None | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
None | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
None | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP' | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
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:
None | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32>... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop unroll
The right code snippet is:
None | '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 mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
ap_uint<32> data... |
The right code snippet is:
None | '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 mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
bool &pass
) {
ap_uint<8> addr = 0;
... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop 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 <ap_int.h>
void mem_test(
bool rst,
bool start,
ap_uint<8> addr_width,
ap_uint<32> data_width,
bool &done,
boo... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop unroll
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
None | '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++
void bitwise_and_or(int a[32], int b[32], bool ctrl, int and_out[32], int or_out[32]) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pra... |
The wrong part of the code is:
and_result |= (a[i+1] & b[i-1]);
The right code snippet is:
and_result |= (a[i] & b[i]); | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void bitwise_and_or(int a[32], int b[32], bool ctrl, int and_out[32], int or_out[32]) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma H... |
The right code snippet is:
and_result |= (a[i] & b[i]); | 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++
void bitwise_and_or(int a[32], int b[32], bool ctrl, int and_out[32], int or_out[32]) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
and_result |= (a[i+1] & b[i-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++
void bitwise_and_or(int a[32], int b[32], bool ctrl, int and_out[32], int or_out[32]) {
#pragma HLS INTERFACE ap_none port=a
... |
The wrong part of the code is:
and_result |= (a[i+1] & b[i-1]);
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
and_result |= (a[i] & b[i]); | 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++
void bitwise_and_or(int a[32], int b[32], bool ctrl, int and_out[32], int or_out[32]) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pra... |
The wrong part of the code is:
int and_result;
int or_result;
The right code snippet is:
int and_result = 0;
int or_result = 0; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void bitwise_and_or(int a[32], int b[32], bool ctrl, int and_out[32], int or_out[32]) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma H... |
The right code snippet is:
int and_result = 0;
int or_result = 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:
```c++
void bitwise_and_or(int a[32], int b[32], bool ctrl, int and_out[32], int or_out[32]) {
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
int and_result;
int or_result;
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++
void bitwise_and_or(int a[32], int b[32], bool ctrl, int and_out[32], int or_out[32]) {
#pragma HLS INTERFACE ap_none port=a
... |
The wrong part of the code is:
int and_result;
int or_result;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
int and_result = 0;
int or_result = 0; | INIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.