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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
xor_out = (ap_uint<16>(0), crc_reg_shifted.range(15, 8)) ^ (crc_poly_reg << 1); // unintended sign extension
The right code snippet is:
xor_out = (ap_uint<8>(0), crc_reg_shifted.range(15, 8)) ^ (crc_poly_reg << 1); | USE |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
xor_out = (ap_uint<8>(0), crc_reg_shifted.range(15, 8)) ^ (crc_poly_reg << 1); | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INT... |
The wrong part of the code is:
xor_out = (ap_uint<16>(0), crc_reg_shifted.range(15, 8)) ^ (crc_poly_reg << 1); // 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE... |
The wrong part of the code is:
xor_out = (ap_uint<16>(0), crc_reg_shifted.range(15, 8)) ^ (crc_poly_reg << 1); // unintended sign extension
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
xor_out = (ap_uint<8>(0), crc_reg_shifted.range(15, 8)) ^ (crc_poly_reg << 1)... | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
data_out_reg = data_in_reg.range(511, 256); // copying from the wrong half of the split buffer
The right code snippet is:
data_out_reg = data_in_reg; | BUF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
data_out_reg = data_in_reg; | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INT... |
The wrong part of the code is:
data_out_reg = data_in_reg.range(511, 256); // copying from the wrong half of the 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE... |
The wrong part of the code is:
data_out_reg = data_in_reg.range(511, 256); // copying from the wrong half of the split buffer
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
data_out_reg = data_in_reg; | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data_in_reg cyclic factor=3 dim=1; // incorrect array partition type
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data_in_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data_in_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data_in_reg cyclic factor=3 dim=1; // incorrect array partition type
The high-level-synthesis bug type of the code is: APT | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data_in_reg cyclic factor=3 dim=1; // incorrect array partition type
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data_in_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data_in_reg complete factor=3 dim=1; // factor not divisible
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data_in_reg 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data_in_reg 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data_in_reg complete factor=3 dim=1; // factor not divisible
The high-level-synthesis bug type of the code is: FND | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data_in_reg complete factor=3 dim=1; // factor not divisible
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data_in_reg 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data_in_reg complete dim=2; // incorrect dimension
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data_in_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data_in_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data_in_reg complete dim=2; // incorrect dimension
The high-level-synthesis bug type of the code is: DID | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data_in_reg complete dim=2; // incorrect dimension
The high-level-synthesis bug type of the code is: DID
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data_in_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS DATAFLOW off; // dataflow position error
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none p... |
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS DATAFLOW off; // dataflow position error
The high-level-synthesis bug type of the code is: DFP | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS DATAFLOW off; // dataflow position error
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_vld port=data_in; // incorrect data access ... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=data_in; // incorrect data access pattern
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | IDAP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_vld port=data_in; // incorrect data access patte... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_vld port=data_in; // incorrect d... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=data_in; // incorrect data access pattern
The high-level-synthesis bug type of the code is: IDAP | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=data_in; // incorrect data access pattern
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=data_in offset=slave bundle=MAXI1; // accessing m_axi interface randomly
The right code snippet is:
#pragma HLS INTERFACE m_axi port=data_in offset=slave bundle=MAXI | RAMB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
#pragma HLS INTERFACE m_axi port=data_in offset=slave bundle=MAXI | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=data_in offset=slave bundle=MAXI1; // accessing m_axi interface randomly
The high-level-synthesis bug type of the code is: RAMB | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=data_in offset=slave bundle=MAXI1; // accessing m_axi interface randomly
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
#pragma HLS INTERFACE m_axi port=data_in offset=slave bundle=MAXI | 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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE bram port=data_in; // scalar value mapped to a... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=data_in; // scalar value mapped to array interface
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_in | SMA |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE bram port=data_in; // scalar value mapped to array ... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE bram port=data_in; // scalar value ... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=data_in; // scalar value mapped to array interface
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=data_in; // scalar value mapped to array interface
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=data_in; // array value mapped to scalar interface
The right code snippet is:
#pragma HLS INTERFACE ap_vld port=data_in | AMS |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
#pragma HLS INTERFACE ap_vld port=data_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=data_in; // array value mapped to scalar interface
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=data_in; // array value mapped to scalar interface
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
#pragma HLS INTERFACE ap_vld port=data_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS PIPELINE II=3; // multi-level pipelining
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none p... |
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS PIPELINE II=3; // 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS PIPELINE II=3; // multi-level pipelining
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
for (ap_uint<2> i = 0; i < WIDTH; i++) { // inner loops not fully unrolled
The right code snippet is:
for (ap_uint<4> i = 0; i < WIDTH; i++) { | 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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
for (ap_uint<4> i = 0; i < WIDTH; i++) { | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE ap_none port=data_in
#pragma HLS INT... |
The wrong part of the code is:
for (ap_uint<2> i = 0; i < WIDTH; i++) { // inner loops not fully unrolled
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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=cmd
#pragma HLS INTERFACE... |
The wrong part of the code is:
for (ap_uint<2> i = 0; i < WIDTH; i++) { // inner loops not fully unrolled
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
for (ap_uint<4> i = 0; i < WIDTH; i++) { | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pra... |
The wrong part of the code is:
ap_uint<2> add_out = add_in + cin_reg + 1;
The right code snippet is:
ap_uint<2> add_out = add_in + cin_reg; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pragma H... |
The right code snippet is:
ap_uint<2> add_out = add_in + cin_reg; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=... |
The wrong part of the code is:
ap_uint<2> add_out = add_in + cin_reg + 1;
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
... |
The wrong part of the code is:
ap_uint<2> add_out = add_in + cin_reg + 1;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
ap_uint<2> add_out = add_in + cin_reg; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pra... |
The wrong part of the code is:
// Pipeline registers
static ap_uint<2> in_reg = 0;
static bool ena_reg;
static bool cin_reg;
static ap_uint<4> out_reg;
static bool cout_reg;
The right code snippet is:
// Pipeline registers
static ap_uint<2> in_reg;
static bool ena_reg;
static bool cin_reg;
static ap_ui... | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pragma H... |
The right code snippet is:
// Pipeline registers
static ap_uint<2> in_reg;
static bool ena_reg;
static bool cin_reg;
static ap_uint<4> out_reg;
static bool cout_reg; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=... |
The wrong part of the code is:
// Pipeline registers
static ap_uint<2> in_reg = 0;
static bool ena_reg;
static bool cin_reg;
static ap_uint<4> out_reg;
static bool cout_reg;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
... |
The wrong part of the code is:
// Pipeline registers
static ap_uint<2> in_reg = 0;
static bool ena_reg;
static bool cin_reg;
static ap_uint<4> out_reg;
static bool cout_reg;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
// Pipeline registers
static ap_uint<2> i... | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pra... |
The wrong part of the code is:
ap_uint<4> dec_out = ~(ap_uint<2>(3) << (in + 3));
The right code snippet is:
ap_uint<4> dec_out = ~(ap_uint<2>(3) << in); | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pragma H... |
The right code snippet is:
ap_uint<4> dec_out = ~(ap_uint<2>(3) << in); | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=... |
The wrong part of the code is:
ap_uint<4> dec_out = ~(ap_uint<2>(3) << (in + 3));
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
... |
The wrong part of the code is:
ap_uint<4> dec_out = ~(ap_uint<2>(3) << (in + 3));
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
ap_uint<4> dec_out = ~(ap_uint<2>(3) << in); | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pra... |
The wrong part of the code is:
// Output multiplexer
while (true) {
out_reg = (ap_uint<4>(0), add_out);
}
The right code snippet is:
// Output multiplexer
switch (dec_out) {
case 1:
out_reg = (ap_uint<4>(0), add_out);
break;
case 2:
out_reg = (ap_uint<4>(1), add_out)... | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pragma H... |
The right code snippet is:
// Output multiplexer
switch (dec_out) {
case 1:
out_reg = (ap_uint<4>(0), add_out);
break;
case 2:
out_reg = (ap_uint<4>(1), add_out);
break;
case 4:
out_reg = (ap_uint<4>(2), add_out);
break;
case 8:
out_reg = ... | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=... |
The wrong part of the code is:
// Output multiplexer
while (true) {
out_reg = (ap_uint<4>(0), add_out);
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
... |
The wrong part of the code is:
// Output multiplexer
while (true) {
out_reg = (ap_uint<4>(0), add_out);
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
// Output multiplexer
switch (dec_out) {
case 1:
out_reg = (ap_uint<4>(0), add_out);
b... | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pra... |
The wrong part of the code is:
static int cin_reg;
The right code snippet is:
static bool cin_reg; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pragma H... |
The right code snippet is:
static bool cin_reg; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=... |
The wrong part of the code is:
static int cin_reg;
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
... |
The wrong part of the code is:
static int cin_reg;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
static bool cin_reg; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pra... |
The wrong part of the code is:
// Output multiplexer
switch (dec_out) {
case 1:
out_reg = (ap_uint<4>(0), add_out);
break;
case 2:
out_reg = (ap_uint<4>(1), add_out);
break;
case 4:
out_reg = (ap_uint<4>(2), add_out);
break;
case 8:
out_re... | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pragma H... |
The right code snippet is:
// Output multiplexer
switch (dec_out) {
case 1:
out_reg = (ap_uint<4>(0), add_out);
break;
case 2:
out_reg = (ap_uint<4>(1), add_out);
break;
case 4:
out_reg = (ap_uint<4>(2), add_out);
break;
case 8:
out_reg = ... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=... |
The wrong part of the code is:
// Output multiplexer
switch (dec_out) {
case 1:
out_reg = (ap_uint<4>(0), add_out);
break;
case 2:
out_reg = (ap_uint<4>(1), add_out);
break;
case 4:
out_reg = (ap_uint<4>(2), add_out);
break;
case 8:
out_re... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
... |
The wrong part of the code is:
// Output multiplexer
switch (dec_out) {
case 1:
out_reg = (ap_uint<4>(0), add_out);
break;
case 2:
out_reg = (ap_uint<4>(1), add_out);
break;
case 4:
out_reg = (ap_uint<4>(2), add_out);
break;
case 8:
out_re... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pra... |
The wrong part of the code is:
static bool cin_reg = 0;
The right code snippet is:
static bool cin_reg; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pragma H... |
The right code snippet is:
static bool cin_reg; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=... |
The wrong part of the code is:
static bool cin_reg = 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:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
... |
The wrong part of the code is:
static bool cin_reg = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static bool cin_reg; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pra... |
The wrong part of the code is:
ap_uint<4> dec_out = ~(ap_uint<2>(3) >> in);
The right code snippet is:
ap_uint<4> dec_out = ~(ap_uint<2>(3) << in); | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=in
#pragma H... |
The right code snippet is:
ap_uint<4> dec_out = ~(ap_uint<2>(3) << in); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_none port=... |
The wrong part of the code is:
ap_uint<4> dec_out = ~(ap_uint<2>(3) >> 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:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
... |
The wrong part of the code is:
ap_uint<4> dec_out = ~(ap_uint<2>(3) >> in);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
ap_uint<4> dec_out = ~(ap_uint<2>(3) << in); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS ARRAY_PARTITION variable=in comple... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=in complete dim=1
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS ARRAY_PARTITION variable=in complete di... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS ARRAY_PARTITION variabl... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=in complete dim=1
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=in complete dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS ARRAY_PARTITION variable=in comple... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=in complete dim=2
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS ARRAY_PARTITION variable=in complete di... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS ARRAY_PARTITION variabl... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=in complete dim=2
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=in complete dim=2
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS ARRAY_PARTITION variable=in comple... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=in complete dim=3
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS ARRAY_PARTITION variable=in complete di... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS ARRAY_PARTITION variabl... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=in complete dim=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:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=in complete dim=3
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS DATAFLOW
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS DATAFLOW
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS DATAFLOW
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS DATAFLOW
#pragma HL... |
The wrong part of the code is:
#pragma HLS DATAFLOW
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
... |
The wrong part of the code is:
#pragma HLS DATAFLOW
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_vld port=in
#prag... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=in
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_vld port=in
#pragma HL... |
The right code snippet is:
#pragma HLS INTERFACE ap_none 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:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
#pragma HLS INTERFACE ap_vld port=i... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld 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:
#include "ap_int.h"
void decoder_2to4_adder (
ap_uint<2> in,
bool ena,
bool cin,
ap_uint<4>& out,
bool& cout
) {
... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=in
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=in | 'IDAP' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.