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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis po... |
The wrong part of the code is:
#pragma HLS interface m_axi port=q random
The right code snippet is:
#pragma HLS interface m_axi port=q | '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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=d1... |
The right code snippet is:
#pragma HLS interface m_axi port=q | '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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS interface m_axi port=q random
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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
#pragma HLS interface m_axi port=q random
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi port=q | '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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis po... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=q
The right code snippet is:
#pragma HLS interface ap_none port=q | '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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=d1... |
The right code snippet is:
#pragma HLS interface ap_none port=q | '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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=q
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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=q
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface ap_none port=q | '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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis po... |
The wrong part of the code is:
#pragma HLS interface ap_none port=reg1
The right code snippet is:
#pragma HLS interface ap_memory port=reg1 | '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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=d1... |
The right code snippet is:
#pragma HLS interface ap_memory port=reg1 | '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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS interface ap_none port=reg1
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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
#pragma HLS interface ap_none port=reg1
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface ap_memory port=reg1 | '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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis po... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=d1... |
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
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 register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis po... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The right code snippet is:
#pragma HLS unroll factor=4 | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=d1... |
The right code snippet is:
#pragma HLS unroll factor=4 | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERF... |
The wrong part of the code is:
#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:
#include <ap_int.h>
void register_adder(ap_uint<8> d1, ap_uint<8> d2, bool reset, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
#pragma HLS unroll factor=4 | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VA... |
The wrong part of the code is:
.RAM64X1D #(
.INIT(64'h0000_0000_0000_0000) // uninitialized variable
) ram0 (
The right code snippet is:
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 ( | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VAL>& i... |
The right code snippet is:
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 ( | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::st... |
The wrong part of the code is:
.RAM64X1D #(
.INIT(64'h0000_0000_0000_0000) // uninitialized variable
) ram0 (
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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, ... |
The wrong part of the code is:
.RAM64X1D #(
.INIT(64'h0000_0000_0000_0000) // uninitialized variable
) ram0 (
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 ( | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VA... |
The wrong part of the code is:
for(int i = 0; i < 10; i++) { // inner loops not fully-unrolled
in_stream.read(in_data);
}
The right code snippet is:
while (in_stream.read(in_data)) { | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VAL>& i... |
The right code snippet is:
while (in_stream.read(in_data)) { | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::st... |
The wrong part of the code is:
for(int i = 0; i < 10; i++) { // inner loops not fully-unrolled
in_stream.read(in_data);
}
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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, ... |
The wrong part of the code is:
for(int i = 0; i < 10; i++) { // inner loops not fully-unrolled
in_stream.read(in_data);
}
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
while (in_stream.read(in_data)) { | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VA... |
The wrong part of the code is:
addr = in_data.data.range(ADDR_WIDTH + DATA_WIDTH + 1, DATA_WIDTH); // bit shift by an out-of-bounds amount
The right code snippet is:
addr = in_data.data.range(ADDR_WIDTH + DATA_WIDTH - 1, DATA_WIDTH); | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VAL>& i... |
The right code snippet is:
addr = in_data.data.range(ADDR_WIDTH + DATA_WIDTH - 1, DATA_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:
```c++
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::st... |
The wrong part of the code is:
addr = in_data.data.range(ADDR_WIDTH + DATA_WIDTH + 1, DATA_WIDTH); // bit shift by an out-of-bounds amount
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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, ... |
The wrong part of the code is:
addr = in_data.data.range(ADDR_WIDTH + DATA_WIDTH + 1, DATA_WIDTH); // bit shift by an out-of-bounds amount
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
addr = in_data.data.range(ADDR_WIDTH + DATA_WIDTH - 1, DATA_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:
```c++
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VA... |
The wrong part of the code is:
while (true) { // infinite loop arising from an incorrect loop termination
in_stream.read(in_data);
}
The right code snippet is:
while (in_stream.read(in_data)) { | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VAL>& i... |
The right code snippet is:
while (in_stream.read(in_data)) { | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::st... |
The wrong part of the code is:
while (true) { // infinite loop arising from an incorrect loop termination
in_stream.read(in_data);
}
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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, ... |
The wrong part of the code is:
while (true) { // infinite loop arising from an incorrect loop termination
in_stream.read(in_data);
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
while (in_stream.read(in_data)) { | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VA... |
The wrong part of the code is:
out_data.data.range(DATA_WIDTH + 1, 0) = ram_out ? ram_in : in_data.data.range(DATA_WIDTH - 1, 0); // unintended sign extension
The right code snippet is:
out_data.data.range(DATA_WIDTH - 1, 0) = ram_out ? ram_in : in_data.data.range(DATA_WIDTH - 1, 0); | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VAL>& i... |
The right code snippet is:
out_data.data.range(DATA_WIDTH - 1, 0) = ram_out ? ram_in : in_data.data.range(DATA_WIDTH - 1, 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:
```c++
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::st... |
The wrong part of the code is:
out_data.data.range(DATA_WIDTH + 1, 0) = ram_out ? ram_in : in_data.data.range(DATA_WIDTH - 1, 0); // unintended sign extension
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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, ... |
The wrong part of the code is:
out_data.data.range(DATA_WIDTH + 1, 0) = ram_out ? ram_in : in_data.data.range(DATA_WIDTH - 1, 0); // unintended sign extension
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
out_data.data.range(DATA_WIDTH - 1, 0) = ram_out ? ram_in... | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VA... |
The wrong part of the code is:
#pragma HLS pipeline II=2
while (in_stream.read(in_data)) { // multi-level pipelining
The right code snippet is:
while (in_stream.read(in_data)) { | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VAL>& i... |
The right code snippet is:
while (in_stream.read(in_data)) { | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::st... |
The wrong part of the code is:
#pragma HLS pipeline II=2
while (in_stream.read(in_data)) { // multi-level pipelining
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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, ... |
The wrong part of the code is:
#pragma HLS pipeline II=2
while (in_stream.read(in_data)) { // multi-level pipelining
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
while (in_stream.read(in_data)) { | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VA... |
The wrong part of the code is:
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 [2]; // array partition type error for the pragma '#pragma HLS array_partition'
The right code snippet is:
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 ( | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VAL>& i... |
The right code snippet is:
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 ( | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::st... |
The wrong part of the code is:
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 [2]; // array partition type error for the pragma '#pragma HLS array_partition'
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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, ... |
The wrong part of the code is:
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 [2]; // array partition type error for the pragma '#pragma HLS array_partition'
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ... | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VA... |
The wrong part of the code is:
while (in_stream.read(in_data)) {
out_stream.write(out_data);
out_stream.write(out_data); // copying from the wrong half of a split buffer
}
The right code snippet is:
while (in_stream.read(in_data)) {
out_stream.write(out_data);
} | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VAL>& i... |
The right code snippet is:
while (in_stream.read(in_data)) {
out_stream.write(out_data);
} | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::st... |
The wrong part of the code is:
while (in_stream.read(in_data)) {
out_stream.write(out_data);
out_stream.write(out_data); // copying from the wrong half of a split buffer
}
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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, ... |
The wrong part of the code is:
while (in_stream.read(in_data)) {
out_stream.write(out_data);
out_stream.write(out_data); // copying from the wrong half of a split buffer
}
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
while (in_stream.read(in_data)) {
... | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VA... |
The wrong part of the code is:
#pragma HLS array_partition variable=ram0 complete dim=2 // factor not divisible for the pragma '#pragma HLS array_partition'
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 [3][3];
The right code snippet is:
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 ( | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VAL>& i... |
The right code snippet is:
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 ( | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::st... |
The wrong part of the code is:
#pragma HLS array_partition variable=ram0 complete dim=2 // factor not divisible for the pragma '#pragma HLS array_partition'
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 [3][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++
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, ... |
The wrong part of the code is:
#pragma HLS array_partition variable=ram0 complete dim=2 // factor not divisible for the pragma '#pragma HLS array_partition'
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 [3][3];
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
... | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VA... |
The wrong part of the code is:
#pragma HLS array_partition variable=ram0 complete dim=3 // dim incorrect dimension for the pragma '#pragma HLS array_partition'
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 [3];
The right code snippet is:
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 ( | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VAL>& i... |
The right code snippet is:
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 ( | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::st... |
The wrong part of the code is:
#pragma HLS array_partition variable=ram0 complete dim=3 // dim incorrect dimension for the pragma '#pragma HLS array_partition'
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 [3];
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, ... |
The wrong part of the code is:
#pragma HLS array_partition variable=ram0 complete dim=3 // dim incorrect dimension for the pragma '#pragma HLS array_partition'
.RAM64X1D #(
.INIT(64'h96A5_96A5_96A5_96A5)
) ram0 [3];
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
... | '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>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VA... |
The wrong part of the code is:
#pragma HLS dataflow // dataflow position error for the pragma '#pragma HLS dataflow'
while (in_stream.read(in_data)) {
The right code snippet is:
while (in_stream.read(in_data)) { | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VAL>& i... |
The right code snippet is:
while (in_stream.read(in_data)) { | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::st... |
The wrong part of the code is:
#pragma HLS dataflow // dataflow position error for the pragma '#pragma HLS dataflow'
while (in_stream.read(in_data)) {
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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, ... |
The wrong part of the code is:
#pragma HLS dataflow // dataflow position error for the pragma '#pragma HLS dataflow'
while (in_stream.read(in_data)) {
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
while (in_stream.read(in_data)) { | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VA... |
The wrong part of the code is:
#pragma HLS interface ap_none register port=in_data // incorrect data access pattern for the pragma '#pragma HLS interface'
while (in_data.read(in_data)) {
The right code snippet is:
while (in_stream.read(in_data)) { | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VAL>& i... |
The right code snippet is:
while (in_stream.read(in_data)) { | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::st... |
The wrong part of the code is:
#pragma HLS interface ap_none register port=in_data // incorrect data access pattern for the pragma '#pragma HLS interface'
while (in_data.read(in_data)) {
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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, ... |
The wrong part of the code is:
#pragma HLS interface ap_none register port=in_data // incorrect data access pattern for the pragma '#pragma HLS interface'
while (in_data.read(in_data)) {
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
while (in_stream.read(in_dat... | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VA... |
The wrong part of the code is:
#pragma HLS interface m_axi port=in_stream offset=slave // m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface'
while (
The right code snippet is:
while (in_stream.read(in_data)) { | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::stream<AXI_VAL>& i... |
The right code snippet is:
while (in_stream.read(in_data)) { | '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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, 1> AXI_VAL;
void ram_shifter(hls::st... |
The wrong part of the code is:
#pragma HLS interface m_axi port=in_stream offset=slave // m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface'
while (
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_stream.h>
#include <ap_axi_sdata.h>
#define DATA_WIDTH 16
#define ADDR_WIDTH 5
typedef ap_axiu<DATA_WIDTH, 1, 1, ... |
The wrong part of the code is:
#pragma HLS interface m_axi port=in_stream offset=slave // m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface'
while (
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippe... | 'RAMB' |
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=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE a... |
The wrong part of the code is:
temp[N] = in;
The right code snippet is:
temp[0] = in; | 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=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
temp[0] = in; | 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=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS ... |
The wrong part of the code is:
temp[N] = in;
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=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERF... |
The wrong part of the code is:
temp[N] = in;
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
temp[0] = in; | 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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE a... |
The wrong part of the code is:
int integral;
The right code snippet is:
int integral = 0; | 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=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
int integral = 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:
#pragma HLS INTERFACE ap_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS ... |
The wrong part of the code is:
int integral;
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=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERF... |
The wrong part of the code is:
int integral;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
int integral = 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:
#pragma HLS INTERFACE ap_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE a... |
The wrong part of the code is:
voltage = integral << (R * C);
The right code snippet is:
voltage = integral / (R * C); | 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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
voltage = integral / (R * C); | 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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS ... |
The wrong part of the code is:
voltage = integral << (R * C);
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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERF... |
The wrong part of the code is:
voltage = integral << (R * C);
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
voltage = integral / (R * C); | 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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE a... |
The wrong part of the code is:
for (int i=0; i>=0; i++) {
The right code snippet is:
for (int i=0; i<N; i++) { | 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=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
for (int i=0; i<N; i++) { | 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=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS ... |
The wrong part of the code is:
for (int i=0; i>=0; i++) {
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=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERF... |
The wrong part of the code is:
for (int i=0; i>=0; i++) {
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
for (int i=0; i<N; i++) { | 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=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE a... |
The wrong part of the code is:
unsigned int k;
The right code snippet is:
int k; | 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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
int k; | 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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS ... |
The wrong part of the code is:
unsigned int k;
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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERF... |
The wrong part of the code is:
unsigned int k;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
int k; | 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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE a... |
The wrong part of the code is:
for (int i=0; i<N/2; i++) {
The right code snippet is:
for (int i=0; i<N-1; i++) { | 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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
for (int i=0; i<N-1; i++) { | 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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS ... |
The wrong part of the code is:
for (int i=0; i<N/2; i++) {
The high-level-synthesis bug type of the code is: MLU | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERF... |
The wrong part of the code is:
for (int i=0; i<N/2; i++) {
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
for (int i=0; i<N-1; i++) { | 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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE a... |
The wrong part of the code is:
bool ref = 0;
The right code snippet is:
bool ref = false; | 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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
bool ref = false; | 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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERFACE ap_none port=current
#pragma HLS ... |
The wrong part of the code is:
bool ref = 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_none port=ref
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_none port=error
#pragma HLS INTERF... |
The wrong part of the code is:
bool ref = 0;
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
bool ref = false; | ZERO |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.