instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
static ap_uint<8> result_reg;
The right code snippet is:
static ap_uint<8> result_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_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
static ap_uint<8> result_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_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
static ap_uint<8> result_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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
static ap_uint<8> result_reg;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static ap_uint<8> result_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_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
result_reg = a << b;
The right code snippet is:
result_reg = a - b; | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
result_reg = a - b; | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
result_reg = a << b;
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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
result_reg = a << b;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
result_reg = a - b; | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
if (reset) {
result_reg = 0;
} else {
while (1) {
// infinite loop
}
}
The right code snippet is:
if (reset) {
result_reg = 0;
} else if (ce) {
switch (op) {
case ADD:
result_reg = a + b;
break;
case SUB:... | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
if (reset) {
result_reg = 0;
} else if (ce) {
switch (op) {
case ADD:
result_reg = a + b;
break;
case SUB:
result_reg = a - b;
break;
default:
break;
}
} | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
if (reset) {
result_reg = 0;
} else {
while (1) {
// infinite loop
}
}
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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
if (reset) {
result_reg = 0;
} else {
while (1) {
// infinite loop
}
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (reset) {
result_reg = 0;
} else if (ce) {
switch (op) {
case ADD:
... | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
result_reg = (ap_int<8>)a + (ap_int<8>)b;
The right code snippet is:
result_reg = a + b; | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
result_reg = a + b; | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
result_reg = (ap_int<8>)a + (ap_int<8>)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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
result_reg = (ap_int<8>)a + (ap_int<8>)b;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
result_reg = a + b; | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
switch (op) {
case ADD:
result_reg = a + b;
result_reg = result_reg + 1;
break;
case SUB:
result_reg = a - b;
result_reg = result_reg - 1;
break;
default:
break;
}
The right code snippet is:
switch (op) {... | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
switch (op) {
case ADD:
result_reg = a + b;
break;
case SUB:
result_reg = a - b;
break;
default:
break;
} | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
switch (op) {
case ADD:
result_reg = a + b;
result_reg = result_reg + 1;
break;
case SUB:
result_reg = a - b;
result_reg = result_reg - 1;
break;
default:
break;
}
The high-level-synthesis bug type of the cod... | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
switch (op) {
case ADD:
result_reg = a + b;
result_reg = result_reg + 1;
break;
case SUB:
result_reg = a - b;
result_reg = result_reg - 1;
break;
default:
break;
}
The high-level-synthesis bug type of the cod... | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
static ap_uint<8> result_reg = 1;
The right code snippet is:
static ap_uint<8> result_reg = 0; | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
static ap_uint<8> result_reg = 0; | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
static ap_uint<8> result_reg = 1;
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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
static ap_uint<8> result_reg = 1;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static ap_uint<8> result_reg = 0; | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
#pragma HLS INTERFACE axis register port=result
The right code snippet is:
#pragma HLS INTERFACE axis register both port=result | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
#pragma HLS INTERFACE axis register both port=result | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
#pragma HLS INTERFACE axis register port=result
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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
#pragma HLS INTERFACE axis register port=result
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
#pragma HLS INTERFACE axis register both port=result | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic dim=1
#pragma HLS array_partition variable=b cyclic dim=1
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=0
#pragma HLS array_partition variable=b complete dim=0 | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=0
#pragma HLS array_partition variable=b complete dim=0 | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic dim=1
#pragma HLS array_partition variable=b cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic dim=1
#pragma HLS array_partition variable=b cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=0
#pragma HLS array_partition... | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
#pragma HLS array_partition variable=a complete dim=1
#pragma HLS array_partition variable=b complete dim=1
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=0
#pragma HLS array_partition variable=b complete dim=0 | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=0
#pragma HLS array_partition variable=b complete dim=0 | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=a complete dim=1
#pragma HLS array_partition variable=b complete dim=1
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=a complete dim=1
#pragma HLS array_partition variable=b complete dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=0
#pragma HLS array_parti... | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic dim=1
#pragma HLS array_partition variable=b cyclic dim=2
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=0
#pragma HLS array_partition variable=b 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_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=0
#pragma HLS array_partition variable=b 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_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic dim=1
#pragma HLS array_partition variable=b cyclic dim=2
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic dim=1
#pragma HLS array_partition variable=b cyclic dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=0
#pragma HLS array_partition... | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
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_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
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_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
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_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=result
The right code snippet is:
#pragma HLS INTERFACE axis register both port=result | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
#pragma HLS INTERFACE axis register both port=result | '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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=result
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>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=result
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS INTERFACE axis register both port=result | '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_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=50 port=result bundle=result
The right code snippet is:
#pragma HLS INTERFACE m_axi depth=50 port=result offset=off bundle=result | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
#pragma HLS INTERFACE m_axi depth=50 port=result offset=off bundle=result | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=50 port=result bundle=result
The high-level-synthesis bug type of the code is: 'RAMB' | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=50 port=result bundle=result
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS INTERFACE m_axi depth=50 port=result offset=off bundle=result | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=result
The right code snippet is:
#pragma HLS INTERFACE axis register both port=result | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
#pragma HLS INTERFACE axis register both port=result | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=result
The high-level-synthesis bug type of the code is: 'SMA' | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=result
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS INTERFACE axis register both port=result | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=result
The right code snippet is:
#pragma HLS INTERFACE axis register both port=result | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
#pragma HLS INTERFACE axis register both port=result | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=result
The high-level-synthesis bug type of the code is: 'AMS' | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=result
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE axis register both port=result | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP' | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<... |
The wrong part of the code is:
#pragma HLS unroll factor=1
The right code snippet is:
#pragma HLS unroll factor=2 | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
ap_uint<8> &r... |
The right code snippet is:
#pragma HLS unroll factor=2 | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
ap_uint<8> b,
ap_uint<2> op,
... |
The wrong part of the code is:
#pragma HLS unroll factor=1
The high-level-synthesis bug type of the code is: 'ILNU' | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#define ADD 0
#define SUB 1
void simple_calculator(
bool clk,
bool reset,
bool ce,
ap_uint<8> a,
... |
The wrong part of the code is:
#pragma HLS unroll factor=1
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
#pragma HLS unroll factor=2 | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS INTERF... |
The wrong part of the code is:
sum = sum + a + b;
The right code snippet is:
sum = a + b; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The right code snippet is:
sum = a + b; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma... |
The wrong part of the code is:
sum = sum + a + b;
The high-level-synthesis bug type of the code is: INIT | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_ax... |
The wrong part of the code is:
sum = sum + a + b;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
sum = a + b; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS INTERF... |
The wrong part of the code is:
difference = a - b - 1;
The right code snippet is:
difference = a - b; | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The right code snippet is:
difference = a - b; | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma... |
The wrong part of the code is:
difference = a - b - 1;
The high-level-synthesis bug type of the code is: OOB | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_ax... |
The wrong part of the code is:
difference = a - b - 1;
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
difference = a - 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:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS INTERF... |
The wrong part of the code is:
default: // invalid operation
while(true) {
sum = sum + 1;
difference = difference - 1;
product = product * 1;
quotient = quotient / 0;
}
break;
The right code snippet is:
default: // invalid operation
sum = 0;
differenc... | INF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The right code snippet is:
default: // invalid operation
sum = 0;
difference = 0;
product = 0;
quotient = 0;
break; | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma... |
The wrong part of the code is:
default: // invalid operation
while(true) {
sum = sum + 1;
difference = difference - 1;
product = product * 1;
quotient = quotient / 0;
}
break;
The high-level-synthesis bug type of the code is: INF | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_ax... |
The wrong part of the code is:
default: // invalid operation
while(true) {
sum = sum + 1;
difference = difference - 1;
product = product * 1;
quotient = quotient / 0;
}
break;
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
... | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS INTERF... |
The wrong part of the code is:
product = (signed char)a * (signed char)b;
The right code snippet is:
product = a * b; | 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 s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The right code snippet is:
product = a * b; | 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 s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma... |
The wrong part of the code is:
product = (signed char)a * (signed char)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:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_ax... |
The wrong part of the code is:
product = (signed char)a * (signed char)b;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
product = a * b; | 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 s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS ARRAY_... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=sum cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=sum bundle=CTRL_BUS | 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 s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS ARRAY_PARTI... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=sum bundle=CTRL_BUS | 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 s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=sum cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: FND | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_ax... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=sum cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=sum bundle=CTRL_BUS | 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 s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=sum bundle=CTRL_BUS
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=sum bundle=CTRL_BUS | 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 s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS INTERFACE a... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=sum bundle=CTRL_BUS | 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 s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=sum bundle=CTRL_BUS
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 s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_ax... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=sum bundle=CTRL_BUS
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=sum bundle=CTRL_BUS | 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 s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS INTERF... |
The wrong part of the code is:
switch(op) {
case 0: // addition
sum = a + b;
break;
case 1: // subtraction
difference = a - b;
break;
case 2: // multiplication
#pragma HLS unroll factor=2
for(int i = 0; i < 2; i++) {
product = a * b;
... | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The right code snippet is:
switch(op) {
case 0: // addition
sum = a + b;
break;
case 1: // subtraction
difference = a - b;
break;
case 2: // multiplication
product = a * b;
break;
case 3: // division
quotient = a / b;
break;
de... | 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 s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=op bundle=CTRL_BUS
#pragma... |
The wrong part of the code is:
switch(op) {
case 0: // addition
sum = a + b;
break;
case 1: // subtraction
difference = a - b;
break;
case 2: // multiplication
#pragma HLS unroll factor=2
for(int i = 0; i < 2; i++) {
product = a * b;
... | 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 s_axilite port=a bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=b bundle=CTRL_BUS
#pragma HLS INTERFACE s_ax... |
The wrong part of the code is:
switch(op) {
case 0: // addition
sum = a + b;
break;
case 1: // subtraction
difference = a - b;
break;
case 2: // multiplication
#pragma HLS unroll factor=2
for(int i = 0; i < 2; i++) {
product = a * b;
... | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=Vplus
#pragma HLS INTERFACE ap_none port=Vminus
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=CmpOut
cy_psoc3_ctcomp_v... |
The wrong part of the code is:
cy_psoc3_ctcomp_v1_0 ctComp (
.vplus(Vplus),
.vminus(Vminus),
.cmpout(CmpOut),
.clk_udb(clock),
.clock(clock),
.uninitialized_variable(uninitialized)
);
The right code snippet is:
cy_psoc3_ctcomp_v1_0 ctComp (
.vplus(Vplus),
.vminus(Vminus)... | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=Vplus
#pragma HLS INTERFACE ap_none port=Vminus
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=CmpOut
cy_psoc3_ctcomp_v1_0 c... |
The right code snippet is:
cy_psoc3_ctcomp_v1_0 ctComp (
.vplus(Vplus),
.vminus(Vminus),
.cmpout(CmpOut),
.clk_udb(clock),
.clock(clock)
); | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=Vplus
#pragma HLS INTERFACE ap_none port=Vminus
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=CmpOut
cy_pso... |
The wrong part of the code is:
cy_psoc3_ctcomp_v1_0 ctComp (
.vplus(Vplus),
.vminus(Vminus),
.cmpout(CmpOut),
.clk_udb(clock),
.clock(clock),
.uninitialized_variable(uninitialized)
);
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=Vplus
#pragma HLS INTERFACE ap_none port=Vminus
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS ... |
The wrong part of the code is:
cy_psoc3_ctcomp_v1_0 ctComp (
.vplus(Vplus),
.vminus(Vminus),
.cmpout(CmpOut),
.clk_udb(clock),
.clock(clock),
.uninitialized_variable(uninitialized)
);
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
cy_psoc... | 'INIT' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.