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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
... |
The wrong part of the code is:
sum[i] = A[i + 8] + B[i + 8];
The right code snippet is:
sum[i] = A[i] + B[i]; | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
for... |
The right code snippet is:
sum[i] = A[i] + B[i]; | '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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=... |
The wrong part of the code is:
sum[i] = A[i + 8] + B[i + 8];
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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
... |
The wrong part of the code is:
sum[i] = A[i + 8] + B[i + 8];
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
sum[i] = A[i] + B[i]; | 'BUF' |
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 adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic
The right code snippet is:
#pragma HLS array_partition variable=A complete | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
for... |
The right code snippet is:
#pragma HLS array_partition variable=A complete | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=A complete | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=3
The right code snippet is:
#pragma HLS array_partition variable=A complete | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
for... |
The right code snippet is:
#pragma HLS array_partition variable=A complete | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=3
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=3
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=A complete | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
... |
The wrong part of the code is:
#pragma HLS array_partition variable=A complete dim=2
The right code snippet is:
#pragma HLS array_partition variable=A complete | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
for... |
The right code snippet is:
#pragma HLS array_partition variable=A complete | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=... |
The wrong part of the code is:
#pragma HLS array_partition variable=A 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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
... |
The wrong part of the code is:
#pragma HLS array_partition variable=A complete dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=A complete | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
... |
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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
for... |
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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=... |
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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
... |
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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=A
The right code snippet is:
#pragma HLS interface ap_fifo port=A | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
for... |
The right code snippet is:
#pragma HLS interface ap_fifo port=A | '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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=A
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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=A
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface ap_fifo port=A | 'IDAP' |
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 adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=A offset=slave
The right code snippet is:
#pragma HLS interface m_axi port=A | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
for... |
The right code snippet is:
#pragma HLS interface m_axi port=A | '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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=... |
The wrong part of the code is:
#pragma HLS interface m_axi port=A 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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=A offset=slave
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi port=A | 'RAMB' |
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 adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
... |
The wrong part of the code is:
#pragma HLS interface bram port=A
The right code snippet is:
#pragma HLS interface ap_fifo port=A | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
for... |
The right code snippet is:
#pragma HLS interface ap_fifo port=A | '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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=... |
The wrong part of the code is:
#pragma HLS interface bram port=A
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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
... |
The wrong part of the code is:
#pragma HLS interface bram port=A
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface ap_fifo port=A | 'SMA' |
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 adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=A
The right code snippet is:
#pragma HLS interface ap_fifo port=A | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
for... |
The right code snippet is:
#pragma HLS interface ap_fifo port=A | '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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=A
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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=A
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface ap_fifo port=A | 'AMS' |
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 adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
... |
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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
for... |
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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=... |
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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
... |
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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
... |
The wrong part of the code is:
for (int i = 0; i < 8; i+=2) {
The right code snippet is:
for (int i = 0; i < 8; i++) { | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=sum
for... |
The right code snippet is:
for (int i = 0; i < 8; 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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
#pragma HLS INTERFACE ap_fifo port=... |
The wrong part of the code is:
for (int i = 0; i < 8; 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:
```c++
void adder(int A[8], int B[8], int sum[8]) {
#pragma HLS INTERFACE ap_fifo port=A
#pragma HLS INTERFACE ap_fifo port=B
... |
The wrong part of the code is:
for (int i = 0; i < 8; i+=2) {
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
for (int i = 0; i < 8; 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
waveforms = ap_uint<8>(counter[8]);
The right code snippet is:
waveforms = ap_uint<8>(counter[6]); | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
waveforms = ap_uint<8>(counter[6]); | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
waveforms = ap_uint<8>(counter[8]);
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
waveforms = ap_uint<8>(counter[8]);
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
waveforms = ap_uint<8>(counter[6]); | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
ap_uint<4> state;
The right code snippet is:
static ap_uint<4> state; | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
static ap_uint<4> state; | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
ap_uint<4> state;
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
ap_uint<4> state;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
static ap_uint<4> state; | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
waveforms = ap_uint<8>(counter.range(2, 0) << 8);
The right code snippet is:
waveforms = ap_uint<8>(counter.range(2, 0) << 5); | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
waveforms = ap_uint<8>(counter.range(2, 0) << 5); | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
waveforms = ap_uint<8>(counter.range(2, 0) << 8);
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
waveforms = ap_uint<8>(counter.range(2, 0) << 8);
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
waveforms = ap_uint<8>(counter.range(2, 0) << 5); | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
if (counter == 127) {
interrupt_event = true;
}
The right code snippet is:
if (counter == 255) {
interrupt_event = true;
} | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
if (counter == 255) {
interrupt_event = true;
} | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
if (counter == 127) {
interrupt_event = true;
}
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
if (counter == 127) {
interrupt_event = true;
}
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
if (counter == 255) {
interrupt_event = true;
} | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
waveforms = ap_int<8>(counter[6]);
The right code snippet is:
waveforms = ap_uint<8>(counter[6]); | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
waveforms = ap_uint<8>(counter[6]); | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
waveforms = ap_int<8>(counter[6]);
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
waveforms = ap_int<8>(counter[6]);
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
waveforms = ap_uint<8>(counter[6]); | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
switch (state) {
case 0: { // count < 128
waveforms = ap_uint<8>(counter[6]);
if (counter == 127) {
state = 1;
}
break;
}
case 1: { // 128 <= count <= 191
waveforms = ap_uint<8>(counter.range(3, 0) << 5);
if ... | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
switch (state) {
case 0: { // count < 128
waveforms = ap_uint<8>(counter[6]);
if (counter == 127) {
state = 1;
}
break;
}
case 1: { // 128 <= count <= 191
waveforms = ap_uint<8>(counter.range(2, 0) << 5);
if (cou... | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
switch (state) {
case 0: { // count < 128
waveforms = ap_uint<8>(counter[6]);
if (counter == 127) {
state = 1;
}
break;
}
case 1: { // 128 <= count <= 191
waveforms = ap_uint<8>(counter.range(3, 0) << 5);
if ... | 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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
switch (state) {
case 0: { // count < 128
waveforms = ap_uint<8>(counter[6]);
if (counter == 127) {
state = 1;
}
break;
}
case 1: { // 128 <= count <= 191
waveforms = ap_uint<8>(counter.range(3, 0) << 5);
if ... | MLU |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
static ap_uint<4> state = 0;
The right code snippet is:
static ap_uint<4> state; | ZERO |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
static ap_uint<4> state; | 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
static ap_uint<4> state = 0;
The high-level-synthesis bug type of the code is: ZERO | ZERO |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
static ap_uint<4> state = 0;
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
static ap_uint<4> state; | ZERO |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The right code snippet is:
Not applicable | BUF |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
Not applicable | 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
Not applicable | BUF |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The right code snippet is:
Not applicable | APT |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
Not applicable | 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
Not applicable | APT |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The right code snippet is:
Not applicable | FND |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
Not applicable | 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
Not applicable | FND |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The right code snippet is:
Not applicable | DID |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
Not applicable | 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The high-level-synthesis bug type of the code is: DID
The right code snippet is:
Not applicable | DID |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The right code snippet is:
Not applicable | DFP |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
Not applicable | 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The high-level-synthesis bug type of the code is: DFP
The right code snippet is:
Not applicable | DFP |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The right code snippet is:
Not applicable | IDAP |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
Not applicable | 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
Not applicable | IDAP |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERF... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The right code snippet is:
Not applicable | RAMB |
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=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma HLS INTERFACE a... |
The right code snippet is:
Not applicable | 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INTERFACE ap_none port=waveforms
#pragma... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=counter
#pragma HLS INT... |
The wrong part of the code is:
Not applicable (no suitable code snippet found)
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
Not applicable | RAMB |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.