instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma... |
The wrong part of the code is:
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS PIPELINE II=1
#pragma HLS ARRAY_PARTITION variable=gray_out cyclic dim=1
gray_out[0] = binar... | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS ... |
The right code snippet is:
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS PIPELINE II=1
#pragma HLS ARRAY_PARTITION variable=gray_out complete dim=1
gray_out[0] = binary_... | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_... |
The wrong part of the code is:
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS PIPELINE II=1
#pragma HLS ARRAY_PARTITION variable=gray_out cyclic dim=1
gray_out[0] = binar... | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pr... |
The wrong part of the code is:
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS PIPELINE II=1
#pragma HLS ARRAY_PARTITION variable=gray_out cyclic dim=1
gray_out[0] = binar... | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma... |
The wrong part of the code is:
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4>
The right code snippet is:
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragm... | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS ... |
The right code snippet is:
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS PIPELINE II=1
#pragma HLS ARRAY_PARTITION variable=gray_out complete factor=2 dim=1
gray_out[0] ... | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_... |
The wrong part of the code is:
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4>
The high-level-synthesis bug type of the code is: 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pr... |
The wrong part of the code is:
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4>
The high-level-synthesis bug type of the code is: 'FND': Factor not divisible for the pragma '#pragma HLS array_partition'
The right code snippet is:
void binary_to_gray(
const ap_uint<4> binary_i... | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
The wrong part of the code is:
static ap_uint<4> counter_reg;
The right code snippet is:
static ap_uint<4> counter_reg = 0; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The right code snippet is:
static ap_uint<4> counter_reg = 0; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
static ap_uint<4> counter_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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
The wrong part of the code is:
static ap_uint<4> counter_reg;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static ap_uint<4> counter_reg = 0; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
The wrong part of the code is:
counter_reg[5]++;
The right code snippet is:
counter_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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The right code snippet is:
counter_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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
counter_reg[5]++;
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
The wrong part of the code is:
counter_reg[5]++;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
counter_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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
The wrong part of the code is:
while (!rst_n) {
The right code snippet is:
if (!rst_n) { | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The right code snippet is:
if (!rst_n) { | '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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
while (!rst_n) {
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
The wrong part of the code is:
while (!rst_n) {
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (!rst_n) { | '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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
The wrong part of the code is:
ap_int<4> counter_out;
The right code snippet is:
ap_uint<4> counter_out; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The right code snippet is:
ap_uint<4> counter_out; | '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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
ap_int<4> counter_out;
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
The wrong part of the code is:
ap_int<4> counter_out;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_uint<4> counter_out; | '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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
The wrong part of the code is:
counter_out = counter_reg.range(7, 4);
The right code snippet is:
counter_out = counter_reg; | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The right code snippet is:
counter_out = counter_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:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
counter_out = counter_reg.range(7, 4);
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
The wrong part of the code is:
counter_out = counter_reg.range(7, 4);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
counter_out = counter_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:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=counter_out cyclic
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=counter_out complete | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=counter_out complete | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=counter_out cyclic
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=counter_out cyclic
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=counter_out complete | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=counter_out factor=3
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=counter_out complete | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=counter_out complete | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=counter_out factor=3
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=counter_out factor=3
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=counter_out complete | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=counter_out complete dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=counter_out complete dim=0 | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=counter_out complete dim=0 | '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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=counter_out complete dim=1
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=counter_out complete dim=1
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=counter_out complete dim=0 | '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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
The wrong part of the code is:
#pragma HLS DATAFLOW loop_flatten
The right code snippet is:
#pragma HLS DATAFLOW | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
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:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS DATAFLOW loop_flatten
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
The wrong part of the code is:
#pragma HLS DATAFLOW loop_flatten
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
#pragma HLS DATAFLOW | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=counter_out
The right code snippet is:
#pragma HLS INTERFACE ap_none port=counter_out | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=counter_out | '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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=counter_out
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=counter_out
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=counter_out | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=counter_out random
The right code snippet is:
#pragma HLS INTERFACE m_axi port=counter_out | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The right code snippet is:
#pragma HLS INTERFACE m_axi port=counter_out | '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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=counter_out 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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=counter_out random
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS INTERFACE m_axi port=counter_out | '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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=counter_out
The right code snippet is:
#pragma HLS INTERFACE ap_none port=counter_out | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=counter_out | '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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=counter_out
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=counter_out
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=counter_out | '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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_array port=counter_out
The right code snippet is:
#pragma HLS INTERFACE ap_none port=counter_out | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=counter_out | '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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_array port=counter_out
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_array port=counter_out
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=counter_out | '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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=r... |
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
) {
#pragma HLS INTERFACE ap_ctrl_... |
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_fixed.h>
void counter(
bool rst_n,
ap_uint<4> &counter_out,
ap_uint<1> &counter_out_ap_vld,
bool clk
)... |
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:
#include <ap_int.h>
void booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both ... |
The wrong part of the code is:
P = ap_uint<8>(0, A)[10] * ap_uint<8>(0, B)[10];
The right code snippet is:
P = ap_uint<8>(0, A) * ap_uint<8>(0, B); | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both port=... |
The right code snippet is:
P = ap_uint<8>(0, A) * ap_uint<8>(0, B); | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis reg... |
The wrong part of the code is:
P = ap_uint<8>(0, A)[10] * ap_uint<8>(0, B)[10];
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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
P = ap_uint<8>(0, A)[10] * ap_uint<8>(0, B)[10];
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
P = ap_uint<8>(0, A) * ap_uint<8>(0, B); | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both ... |
The wrong part of the code is:
ap_uint<8> P = ap_uint<8>(0);
The right code snippet is:
ap_uint<8> P; | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both port=... |
The right code snippet is:
ap_uint<8> P; | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis reg... |
The wrong part of the code is:
ap_uint<8> P = ap_uint<8>(0);
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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
ap_uint<8> P = ap_uint<8>(0);
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
ap_uint<8> P; | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both ... |
The wrong part of the code is:
S = ap_uint<5>(P.range(7, 7), P.range(6, 4)) + (ap_uint<5>(0, P.range(3, 1)) << ap_uint<5>(10) ^ ap_uint<5>(0, P.range(2, 0)));
The right code snippet is:
S = ap_uint<5>(P.range(7, 7), P.range(6, 4)) + (ap_uint<5>(0, P.range(3, 1)) ^ ap_uint<5>(0, P.range(2, 0))); | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both port=... |
The right code snippet is:
S = ap_uint<5>(P.range(7, 7), P.range(6, 4)) + (ap_uint<5>(0, P.range(3, 1)) ^ ap_uint<5>(0, P.range(2, 0))); | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis reg... |
The wrong part of the code is:
S = ap_uint<5>(P.range(7, 7), P.range(6, 4)) + (ap_uint<5>(0, P.range(3, 1)) << ap_uint<5>(10) ^ ap_uint<5>(0, P.range(2, 0)));
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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
S = ap_uint<5>(P.range(7, 7), P.range(6, 4)) + (ap_uint<5>(0, P.range(3, 1)) << ap_uint<5>(10) ^ ap_uint<5>(0, P.range(2, 0)));
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
S = ap_uint<5>(P.range(7, 7), P.range(6, 4)) + (ap_uint<5>... | SHFT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both ... |
The wrong part of the code is:
while(true){}
The right code snippet is:
None | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both port=... |
The right code snippet is:
None | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis reg... |
The wrong part of the code is:
while(true){}
The high-level-synthesis bug type of the code is: INF | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
while(true){}
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
None | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both ... |
The wrong part of the code is:
ap_int<8> P = ap_uint<8>(0, A) * ap_uint<8>(0, B);
The right code snippet is:
None | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both port=... |
The right code snippet is:
None | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis reg... |
The wrong part of the code is:
ap_int<8> P = ap_uint<8>(0, A) * ap_uint<8>(0, B);
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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
ap_int<8> P = ap_uint<8>(0, A) * ap_uint<8>(0, B);
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
None | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both ... |
The wrong part of the code is:
for (int i = 0; i < 4; i+=2) {
P = ap_uint<8>(0, A) * ap_uint<8>(0, B);
}
The right code snippet is:
None | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both port=... |
The right code snippet is:
None | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis reg... |
The wrong part of the code is:
for (int i = 0; i < 4; i+=2) {
P = ap_uint<8>(0, A) * ap_uint<8>(0, B);
}
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:
#include <ap_int.h>
void booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
for (int i = 0; i < 4; i+=2) {
P = ap_uint<8>(0, A) * ap_uint<8>(0, B);
}
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
None | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both ... |
The wrong part of the code is:
ap_uint<8> P = ap_uint<8>(0);
The right code snippet is:
ap_uint<8> P; | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both port=... |
The right code snippet is:
ap_uint<8> P; | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis reg... |
The wrong part of the code is:
ap_uint<8> P = ap_uint<8>(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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
ap_uint<8> P = ap_uint<8>(0);
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
ap_uint<8> P; | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both ... |
The wrong part of the code is:
memcpy(Y, P, sizeof(ap_uint<8>));
The right code snippet is:
None | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis register both port=... |
The right code snippet is:
None | 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 booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis reg... |
The wrong part of the code is:
memcpy(Y, P, sizeof(ap_uint<8>));
The high-level-synthesis bug type of the code is: BUF | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void booth_multiplier(ap_uint<4> A, ap_uint<4> B, ap_uint<8> &Y) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
memcpy(Y, P, sizeof(ap_uint<8>));
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
None | BUF |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.