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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch =... |
The wrong part of the code is:
static ap_uint<10> DeltaAdder;
The right code snippet is:
static ap_uint<10> DeltaAdder = 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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = 0;
... |
The right code snippet is:
static ap_uint<10> DeltaAdder = 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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> S... |
The wrong part of the code is:
static ap_uint<10> DeltaAdder;
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder;
static ap_uint<10> S... |
The wrong part of the code is:
static ap_uint<10> DeltaAdder;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static ap_uint<10> DeltaAdder = 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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
DeltaB = (SigmaLatch[9], SigmaLatch[9]) << 11;
The right code snippet is:
DeltaB = (SigmaLatch[9], SigmaLatch[9]) << 8; | 'SHFT' |
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
The right code snippet is:
DeltaB = (SigmaLatch[9], SigmaLatch[9]) << 8; | '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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
DeltaB = (SigmaLatch[9], SigmaLatch[9]) << 11;
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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
DeltaB = (SigmaLatch[9], SigmaLatch[9]) << 11;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
DeltaB = (SigmaLatch[9], SigmaLatch[9]) << 8; | '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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
while(true) {
SigmaLatch = SigmaAdder;
DACout = SigmaLatch[9];
}
The right code snippet is:
if (clk) {
SigmaLatch = SigmaAdder;
DACout = SigmaLatch[9];
} | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
The right code snippet is:
if (clk) {
SigmaLatch = SigmaAdder;
DACout = SigmaLatch[9];
} | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
while(true) {
SigmaLatch = SigmaAdder;
DACout = SigmaLatch[9];
}
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
while(true) {
SigmaLatch = SigmaAdder;
DACout = SigmaLatch[9];
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (clk) {
SigmaLatch = SigmaAdder;
DACout = SigmaLatch[9];
} | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_int<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatc... |
The wrong part of the code is:
static ap_int<10> DeltaAdder = 0;
The right code snippet is:
static ap_uint<10> DeltaAdder = 0; | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_int<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = 0... |
The right code snippet is:
static ap_uint<10> DeltaAdder = 0; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_int<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10... |
The wrong part of the code is:
static ap_int<10> DeltaAdder = 0;
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_int<10> DeltaAdder = 0;
static ap_uint<10... |
The wrong part of the code is:
static ap_int<10> DeltaAdder = 0;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
static ap_uint<10> DeltaAdder = 0; | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
for (int i = 0; i < 5; i++) {
// some code
}
The right code snippet is:
for (int i = 0; i < 10; i++) {
// some code
} | 'MLU' |
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
The right code snippet is:
for (int i = 0; i < 10; i++) {
// some code
} | '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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
for (int i = 0; i < 5; i++) {
// some code
}
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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
for (int i = 0; i < 5; i++) {
// some code
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < 10; i++) {
// some code
} | '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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 1;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
static ap_uint<10> DeltaAdder = 1;
The right code snippet is:
static ap_uint<10> DeltaAdder = 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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 1;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
The right code snippet is:
static ap_uint<10> DeltaAdder = 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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 1;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
static ap_uint<10> DeltaAdder = 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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 1;
static ap_uint<1... |
The wrong part of the code is:
static ap_uint<10> DeltaAdder = 1;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static ap_uint<10> DeltaAdder = 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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
// some code that copies from the other buffer (assuming there are two split buffers)
The right code snippet is:
// some code that copies from one buffer | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
The right code snippet is:
// some code that copies from one buffer | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
// some code that copies from the other buffer (assuming there are two split buffers)
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
// some code that copies from the other buffer (assuming there are two split buffers)
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
// some code that copies from one buffer | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
#pragma HLS array_partition variable=SigmaLatch block factor=2 dim=1
The right code snippet is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=2 dim=1 | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
The right code snippet is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=2 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:
#include <ap_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS array_partition variable=SigmaLatch block factor=2 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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS array_partition variable=SigmaLatch block factor=2 dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=2 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:
#include <ap_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=2 dim=1 | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
The right code snippet is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=2 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:
#include <ap_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS array_partition variable=SigmaLatch 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:
#include <ap_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=2 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:
#include <ap_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=2 dim=2
The right code snippet is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=2 dim=1 | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
The right code snippet is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=2 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:
#include <ap_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=2 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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=SigmaLatch cyclic factor=2 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:
#include <ap_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
#pragma HLS dataflow region
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS dataflow region
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS dataflow region
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_hs port=DACin
#pragma HLS interface ap_ctrl_hs port=clk
#pragma HLS interface ap_ctrl_hs port=DACout
The right code snippet is:
#pragma HLS interface ap_ctrl_none port=DACin
#pragma HLS interface ap_ctrl_none port=clk
#pragma HLS interface ap... | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
The right code snippet is:
#pragma HLS interface ap_ctrl_none port=DACin
#pragma HLS interface ap_ctrl_none port=clk
#pragma HLS interface ap_ctrl_none port=DACout | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_hs port=DACin
#pragma HLS interface ap_ctrl_hs port=clk
#pragma HLS interface ap_ctrl_hs port=DACout
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_hs port=DACin
#pragma HLS interface ap_ctrl_hs port=clk
#pragma HLS interface ap_ctrl_hs port=DACout
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface ap_ctrl_none port=DACin
#pragma... | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
#pragma HLS interface m_axi port=SigmaLatch offset=slave bundle=wrong_bundle
The right code snippet is:
#pragma HLS interface m_axi port=SigmaLatch offset=slave | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
The right code snippet is:
#pragma HLS interface m_axi port=SigmaLatch offset=slave | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS interface m_axi port=SigmaLatch offset=slave bundle=wrong_bundle
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS interface m_axi port=SigmaLatch offset=slave bundle=wrong_bundle
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi port=SigmaLatch offset=slave | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
#pragma HLS interface bram port=DACin
The right code snippet is:
#pragma HLS interface ap_fifo port=DACin | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
The right code snippet is:
#pragma HLS interface ap_fifo port=DACin | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS interface bram port=DACin
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS interface bram port=DACin
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface ap_fifo port=DACin | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=DACin
The right code snippet is:
#pragma HLS interface ap_fifo port=DACin | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
The right code snippet is:
#pragma HLS interface ap_fifo port=DACin | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=DACin
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=DACin
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface ap_fifo port=DACin | '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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
#pragma HLS unroll factor=3
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS unroll factor=3
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 ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
#pragma HLS unroll factor=3
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
#pragma HLS unroll factor=4 | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
ap_int<5> temp_sum = 0;
sum = te... |
The wrong part of the code is:
ap_int<5> temp_sum = 0;
sum = temp_sum.range(3, 0);
cout = temp_sum[4];
The right code snippet is:
temp_sum = a + b + cin; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
ap_int<5> temp_sum = 0;
sum = temp_su... |
The right code snippet is:
temp_sum = a + b + cin; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
ap_int<5> temp_sum = ... |
The wrong part of the code is:
ap_int<5> temp_sum = 0;
sum = temp_sum.range(3, 0);
cout = temp_sum[4];
The high-level-synthesis bug type of the code is: INIT | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5... |
The wrong part of the code is:
ap_int<5> temp_sum = 0;
sum = temp_sum.range(3, 0);
cout = temp_sum[4];
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
temp_sum = a + b + cin; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
while(1){
temp_sum = a + b +... |
The wrong part of the code is:
while(1){
temp_sum = a + b + cin;
}
The right code snippet is:
temp_sum = a + b + cin; | INF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
while(1){
temp_sum = a + b + cin;... |
The right code snippet is:
temp_sum = a + b + cin; | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
while(1){
temp_su... |
The wrong part of the code is:
while(1){
temp_sum = a + b + cin;
}
The high-level-synthesis bug type of the code is: INF | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5... |
The wrong part of the code is:
while(1){
temp_sum = a + b + cin;
}
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
temp_sum = a + b + cin; | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + b + cin;
sum ... |
The wrong part of the code is:
#pragma HLS unroll factor(2)
temp_sum = a + b + cin;
sum = temp_sum.range(3, 0);
cout = temp_sum[4];
The right code snippet is:
temp_sum = a + b + cin;
sum = temp_sum.range(3, 0);
cout = temp_sum[4]; | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + b + cin;
sum = tem... |
The right code snippet is:
temp_sum = a + b + cin;
sum = temp_sum.range(3, 0);
cout = temp_sum[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:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + b + ci... |
The wrong part of the code is:
#pragma HLS unroll factor(2)
temp_sum = a + b + cin;
sum = temp_sum.range(3, 0);
cout = temp_sum[4];
The high-level-synthesis bug type of the code is: ILNU | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5... |
The wrong part of the code is:
#pragma HLS unroll factor(2)
temp_sum = a + b + cin;
sum = temp_sum.range(3, 0);
cout = temp_sum[4];
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
temp_sum = a + b + cin;
sum = temp_sum.range(3, 0);
cout = temp_sum[4]; | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin[2], ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + b + cin;... |
The wrong part of the code is:
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin[2], ap_int<4>& sum, ap_int<1>& cout) {
The right code snippet is:
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) { | SMA |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin[2], ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + b + cin;
... |
The right code snippet is:
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) { | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin[2], ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a... |
The wrong part of the code is:
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin[2], ap_int<4>& sum, ap_int<1>& cout) {
The high-level-synthesis bug type of the code is: SMA | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin[2], ap_int<4>& sum, ap_int<1>& cout) {
... |
The wrong part of the code is:
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin[2], ap_int<4>& sum, ap_int<1>& cout) {
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_in... | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + b + cin;
... |
The wrong part of the code is:
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
The right code snippet is:
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) { | IDAP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + b + cin;
sum... |
The right code snippet is:
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) { | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + ... |
The wrong part of the code is:
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
The high-level-synthesis bug type of the code is: IDAP | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap... |
The wrong part of the code is:
void four_bit_adder(ap_int<4> a[2], ap_int<4> b[2], ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<... | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
#pragma HLS array_partition variable=a cyclic factor=3
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
a... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=3
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
The right code snippet is:
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) ... | FND |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
#pragma HLS array_partition variable=a cyclic factor=3
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int... |
The right code snippet is:
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) { | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
#pragma HLS array_partition variable=a cyclic factor=3
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& co... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=3
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
The high-level-synthesis bug type of the code is: FND | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
#pragma HLS array_partition variable=a cyclic factor=3
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=3
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
void four_bit_adder(ap_int<4> a, ap_... | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + b + cin;
sum ... |
The wrong part of the code is:
sum = temp_sum.range(4, 1);
cout = temp_sum[5];
The right code snippet is:
sum = temp_sum.range(3, 0);
cout = temp_sum[4]; | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + b + cin;
sum = tem... |
The right code snippet is:
sum = temp_sum.range(3, 0);
cout = temp_sum[4]; | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + b + ci... |
The wrong part of the code is:
sum = temp_sum.range(4, 1);
cout = temp_sum[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:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5... |
The wrong part of the code is:
sum = temp_sum.range(4, 1);
cout = temp_sum[5];
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
sum = temp_sum.range(3, 0);
cout = temp_sum[4]; | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + b + cin;
sum ... |
The wrong part of the code is:
ap_int<5> temp_sum[2];
temp_sum[0] = a + b + cin;
temp_sum[1] = a + b + cin;
sum = temp_sum[0].range(3, 0);
cout = temp_sum[0][4];
The right code snippet is:
ap_int<5> temp_sum;
temp_sum = a + b + cin;
sum = temp_sum.range(3, 0);
cout = temp_sum[4]; | MLU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + b + cin;
sum = tem... |
The right code snippet is:
ap_int<5> temp_sum;
temp_sum = a + b + cin;
sum = temp_sum.range(3, 0);
cout = temp_sum[4]; | 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:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5> temp_sum;
temp_sum = a + b + ci... |
The wrong part of the code is:
ap_int<5> temp_sum[2];
temp_sum[0] = a + b + cin;
temp_sum[1] = a + b + cin;
sum = temp_sum[0].range(3, 0);
cout = temp_sum[0][4];
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:
```c++
#include <ap_int.h>
void four_bit_adder(ap_int<4> a, ap_int<4> b, ap_int<1> cin, ap_int<4>& sum, ap_int<1>& cout) {
ap_int<5... |
The wrong part of the code is:
ap_int<5> temp_sum[2];
temp_sum[0] = a + b + cin;
temp_sum[1] = a + b + cin;
sum = temp_sum[0].range(3, 0);
cout = temp_sum[0][4];
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
ap_int<5> temp_sum;
temp_sum = a + b + cin;
sum = temp_s... | MLU |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.