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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
static bool and_out, or_out;
The right code snippet is:
static bool and_out, or_out, nor_out; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
static bool and_out, or_out, nor_out; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
static bool and_out, or_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:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
static bool and_out, or_out;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static bool and_out, or_out, nor_out; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
shift_reg = (shift_reg << 10) | d_val;
The right code snippet is:
shift_reg = (shift_reg << 1) | d_val; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
shift_reg = (shift_reg << 1) | d_val; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
shift_reg = (shift_reg << 10) | d_val;
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
shift_reg = (shift_reg << 10) | d_val;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
shift_reg = (shift_reg << 1) | d_val; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
while(1);
The right code snippet is:
// No suitable code snippet found | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
// No suitable code snippet found | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
while(1);
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
while(1);
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
// No suitable code snippet found | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
char in_val = in.read();
The right code snippet is:
unsigned char in_val = in.read(); | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
unsigned char in_val = in.read(); | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
char in_val = in.read();
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
char in_val = in.read();
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
unsigned char in_val = in.read(); | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
memcpy(out_and, in, sizeof(in));
The right code snippet is:
// No suitable code snippet found | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
// No suitable code snippet found | '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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
memcpy(out_and, in, sizeof(in));
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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
memcpy(out_and, in, sizeof(in));
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
// No suitable code snippet found | '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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
#pragma HLS array_partition variable=shift_reg cyclic dim=1
The right code snippet is:
#pragma HLS array_partition variable=shift_reg complete dim=1 | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
#pragma HLS array_partition variable=shift_reg complete dim=1 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
#pragma HLS array_partition variable=shift_reg cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
#pragma HLS array_partition variable=shift_reg cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=shift_reg complete dim=1 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
#pragma HLS array_partition variable=in factor=3 dim=1
The right code snippet is:
#pragma HLS array_partition variable=in complete dim=1 | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
#pragma HLS array_partition variable=in complete dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
#pragma HLS array_partition variable=in 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:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
#pragma HLS array_partition variable=in factor=3 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=in complete dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
#pragma HLS array_partition variable=shift_reg complete dim=2
The right code snippet is:
#pragma HLS array_partition variable=shift_reg complete dim=1 | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
#pragma HLS array_partition variable=shift_reg complete dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
#pragma HLS array_partition variable=shift_reg 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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
#pragma HLS array_partition variable=shift_reg complete dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=shift_reg complete dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
#pragma HLS dataflow loop_flatten
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
#pragma HLS dataflow loop_flatten
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
#pragma HLS dataflow loop_flatten
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=in
The right code snippet is:
#pragma HLS interface axis port=in | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
#pragma HLS interface axis port=in | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=in
The high-level-synthesis bug type of the code is: 'IDAP' | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=in
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface axis port=in | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
#pragma HLS interface m_axi port=in max_read_burst_length=1 max_write_burst_length=1
The right code snippet is:
#pragma HLS interface m_axi port=in | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
#pragma HLS interface m_axi port=in | '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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
#pragma HLS interface m_axi port=in max_read_burst_length=1 max_write_burst_length=1
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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
#pragma HLS interface m_axi port=in max_read_burst_length=1 max_write_burst_length=1
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi port=in | '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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
#pragma HLS interface bram port=in
The right code snippet is:
#pragma HLS interface axis port=in | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
#pragma HLS interface axis port=in | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
#pragma HLS interface bram port=in
The high-level-synthesis bug type of the code is: 'SMA' | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
#pragma HLS interface bram port=in
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface axis port=in | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
#pragma HLS interface ap_none port=in
The right code snippet is:
#pragma HLS interface axis port=in | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
#pragma HLS interface axis port=in | '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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
#pragma HLS interface ap_none port=in
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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
#pragma HLS interface ap_none port=in
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface axis port=in | '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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<b... |
The wrong part of the code is:
#pragma HLS unroll inner loop full
The right code snippet is:
// No suitable code snippet found | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hls::stream<bool>&... |
The right code snippet is:
// No suitable code snippet found | '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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, // Synchronous active-high reset
hl... |
The wrong part of the code is:
#pragma HLS unroll inner loop full
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++
#include <hls_math.h>
void shift_combination(
hls::stream<bool>& clk, // Clock input
hls::stream<bool>& reset, //... |
The wrong part of the code is:
#pragma HLS unroll inner loop full
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
// No suitable code snippet found | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::stream<ap_ui... |
The wrong part of the code is:
bool infirst_multiple;
ap_uint<16> inIR = 0;
if (flush.read()) {
infirst_multiple = false;
} else {
infirst_multiple = tofirst_multiple.read();
inIR = toIR.read();
}
The right code snippet is:
bool infirst_multiple;
ap_uint... | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::stream<ap_uint<16... |
The right code snippet is:
bool infirst_multiple;
ap_uint<16> inIR;
if (flush.read()) {
infirst_multiple = false;
inIR = 0xF000;
} else {
infirst_multiple = tofirst_multiple.read();
inIR = toIR.read();
} | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::s... |
The wrong part of the code is:
bool infirst_multiple;
ap_uint<16> inIR = 0;
if (flush.read()) {
infirst_multiple = false;
} else {
infirst_multiple = tofirst_multiple.read();
inIR = toIR.read();
}
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, h... |
The wrong part of the code is:
bool infirst_multiple;
ap_uint<16> inIR = 0;
if (flush.read()) {
infirst_multiple = false;
} else {
infirst_multiple = tofirst_multiple.read();
inIR = toIR.read();
}
The high-level-synthesis bug type of the code is: 'INIT'
The ... | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::stream<ap_ui... |
The wrong part of the code is:
ap_uint<16> tmp_PCInc = toPCInc.read();
ap_uint<16> tmp_PC = toPC.read() + 1;
The right code snippet is:
ap_uint<16> tmp_PCInc = toPCInc.read();
ap_uint<16> tmp_PC = toPC.read(); | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::stream<ap_uint<16... |
The right code snippet is:
ap_uint<16> tmp_PCInc = toPCInc.read();
ap_uint<16> tmp_PC = toPC.read(); | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::s... |
The wrong part of the code is:
ap_uint<16> tmp_PCInc = toPCInc.read();
ap_uint<16> tmp_PC = toPC.read() + 1;
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, h... |
The wrong part of the code is:
ap_uint<16> tmp_PCInc = toPCInc.read();
ap_uint<16> tmp_PC = toPC.read() + 1;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
ap_uint<16> tmp_PCInc = toPCInc.read();
ap_uint<16> tmp_PC = toPC.read(); | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::stream<ap_ui... |
The wrong part of the code is:
bool tmp_flush = true;
while (tmp_flush) {
// Do something
}
The right code snippet is:
bool tmp_flush;
tmp_flush = flush.read(); | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::stream<ap_uint<16... |
The right code snippet is:
bool tmp_flush;
tmp_flush = flush.read(); | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::s... |
The wrong part of the code is:
bool tmp_flush = true;
while (tmp_flush) {
// Do something
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, h... |
The wrong part of the code is:
bool tmp_flush = true;
while (tmp_flush) {
// Do something
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
bool tmp_flush;
tmp_flush = flush.read(); | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>, 2>& toPCInc, hls::stream<ap_uint<16>, 2>& toPC, hls::stream... |
The wrong part of the code is:
hls::stream<ap_uint<16>, 2>& toPCInc, hls::stream<ap_uint<16>, 2>& toPC, hls::stream<ap_uint<16>, 2>& toIR,
The right code snippet is:
hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::stream<ap_uint<16>>& toIR, | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>, 2>& toPCInc, hls::stream<ap_uint<16>, 2>& toPC, hls::stream<ap_u... |
The right code snippet is:
hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::stream<ap_uint<16>>& toIR, | '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++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>, 2>& toPCInc, hls::stream<ap_uint<16>, 2>& toPC, ... |
The wrong part of the code is:
hls::stream<ap_uint<16>, 2>& toPCInc, hls::stream<ap_uint<16>, 2>& toPC, hls::stream<ap_uint<16>, 2>& toIR,
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++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>, 2>& toPCInc... |
The wrong part of the code is:
hls::stream<ap_uint<16>, 2>& toPCInc, hls::stream<ap_uint<16>, 2>& toPC, hls::stream<ap_uint<16>, 2>& toIR,
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::strea... | '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++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<32>>& toPCInc, hls::stream<ap_uint<32>>& toPC, hls::stream<ap_ui... |
The wrong part of the code is:
hls::stream<ap_uint<32>>& toPCInc, hls::stream<ap_uint<32>>& toPC, hls::stream<ap_uint<32>>& toIR,
The right code snippet is:
hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::stream<ap_uint<16>>& toIR, | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<32>>& toPCInc, hls::stream<ap_uint<32>>& toPC, hls::stream<ap_uint<32... |
The right code snippet is:
hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::stream<ap_uint<16>>& toIR, | '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++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<32>>& toPCInc, hls::stream<ap_uint<32>>& toPC, hls::s... |
The wrong part of the code is:
hls::stream<ap_uint<32>>& toPCInc, hls::stream<ap_uint<32>>& toPC, hls::stream<ap_uint<32>>& toIR,
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++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<32>>& toPCInc, h... |
The wrong part of the code is:
hls::stream<ap_uint<32>>& toPCInc, hls::stream<ap_uint<32>>& toPC, hls::stream<ap_uint<32>>& toIR,
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::stream<ap_uint... | '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++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::stream<ap_ui... |
The wrong part of the code is:
ap_uint<16> tmp_PCInc = toPCInc.read();
ap_uint<16> tmp_PC = toPC.read();
#pragma HLS UNROLL factor=2
The right code snippet is:
ap_uint<16> tmp_PCInc = toPCInc.read();
ap_uint<16> tmp_PC = toPC.read(); | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::stream<ap_uint<16... |
The right code snippet is:
ap_uint<16> tmp_PCInc = toPCInc.read();
ap_uint<16> tmp_PC = toPC.read(); | '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++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, hls::stream<ap_uint<16>>& toPC, hls::s... |
The wrong part of the code is:
ap_uint<16> tmp_PCInc = toPCInc.read();
ap_uint<16> tmp_PC = toPC.read();
#pragma HLS UNROLL factor=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++
#include <hls_stream.h>
void pipeline_reg1(hls::stream<bool>& clk, hls::stream<bool>& reset, hls::stream<ap_uint<16>>& toPCInc, h... |
The wrong part of the code is:
ap_uint<16> tmp_PCInc = toPCInc.read();
ap_uint<16> tmp_PC = toPC.read();
#pragma HLS UNROLL factor=2
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
ap_uint<16> tmp_PCInc = toPCInc.read();
ap_uint<16> tmp_PC = toPC... | '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_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
int temp;
sum = temp + A + B;
The right code snippet is:
sum = A + B; | 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_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=ca... |
The right code snippet is:
sum = A + B; | 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_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE... |
The wrong part of the code is:
int temp;
sum = temp + A + B;
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_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE a... |
The wrong part of the code is:
int temp;
sum = temp + A + B;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
sum = A + B; | 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_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
if (1) {
The right code snippet is:
if (sub) { | 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_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=ca... |
The right code snippet is:
if (sub) { | 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_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE... |
The wrong part of the code is:
if (1) {
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_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE a... |
The wrong part of the code is:
if (1) {
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
if (sub) { | 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_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
#pragma HLS unroll
for(int i = 0; i < 4; i++) {
sum = A - B;
}
The right code snippet is:
sum = A - B; | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=ca... |
The right code snippet is:
sum = A - B; | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS unroll
for(int i = 0; i < 4; i++) {
sum = A - B;
}
The high-level-synthesis bug type of the code is: ILNU | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS unroll
for(int i = 0; i < 4; i++) {
sum = A - B;
}
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
sum = A - B; | 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_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
sum = A + B + 1;
The right code snippet is:
sum = A + B; | 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_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=ca... |
The right code snippet is:
sum = A + B; | 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_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE... |
The wrong part of the code is:
sum = A + B + 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:
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=sub
#pragma HLS INTERFACE a... |
The wrong part of the code is:
sum = A + B + 1;
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
sum = A + B; | OOB |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.