instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void shift_register(
hls::stream<uint8_t> &in,
hls::stream<bool> &load,
hls::stream<bool> &shift,
hls::stream<uint8_t> &out
) {
#pragma HLS INTERFACE ap_ctrl_none port... |
The wrong part of the code is:
static uint8_t reg;
The right code snippet is:
static uint8_t reg = 0; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void shift_register(
hls::stream<uint8_t> &in,
hls::stream<bool> &load,
hls::stream<bool> &shift,
hls::stream<uint8_t> &out
) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The right code snippet is:
static uint8_t 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:
```c++
void shift_register(
hls::stream<uint8_t> &in,
hls::stream<bool> &load,
hls::stream<bool> &shift,
hls::stream<uint8_t> &out
) {
#pragma HLS INTERFACE ap_ctr... |
The wrong part of the code is:
static uint8_t reg;
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:
```c++
void shift_register(
hls::stream<uint8_t> &in,
hls::stream<bool> &load,
hls::stream<bool> &shift,
hls::stream<uint8_t> &o... |
The wrong part of the code is:
static uint8_t reg;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static uint8_t 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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounte... |
The wrong part of the code is:
SerialEn = WriteOp & InProgress & ( BitCounter>32 | ( ( BitCounter == 0 ) & NoPre ) )
| ~WriteOp & InProgress & (( BitCounter>31 & BitCounter<46 ) | ( ( BitCounter == 0 ) & NoPre ));
The right code snippet is:
SerialEn = WriteOp & InProgress & ( BitCount... | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounter, ap... |
The right code snippet is:
SerialEn = WriteOp & InProgress & ( BitCounter>31 | ( ( BitCounter == 0 ) & NoPre ) )
| ~WriteOp & InProgress & (( BitCounter>31 & BitCounter<46 ) | ( ( BitCounter == 0 ) & NoPre )); | '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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7... |
The wrong part of the code is:
SerialEn = WriteOp & InProgress & ( BitCounter>32 | ( ( BitCounter == 0 ) & NoPre ) )
| ~WriteOp & InProgress & (( BitCounter>31 & BitCounter<46 ) | ( ( BitCounter == 0 ) & NoPre ));
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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgr... |
The wrong part of the code is:
SerialEn = WriteOp & InProgress & ( BitCounter>32 | ( ( BitCounter == 0 ) & NoPre ) )
| ~WriteOp & InProgress & (( BitCounter>31 & BitCounter<46 ) | ( ( BitCounter == 0 ) & NoPre ));
The high-level-synthesis bug type of the code is: 'OOB'
The right code s... | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounte... |
The wrong part of the code is:
ap_uint<1> MdoEn_2d;
The right code snippet is:
ap_uint<1> MdoEn_2d = 0; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounter, ap... |
The right code snippet is:
ap_uint<1> MdoEn_2d = 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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7... |
The wrong part of the code is:
ap_uint<1> MdoEn_2d;
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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgr... |
The wrong part of the code is:
ap_uint<1> MdoEn_2d;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<1> MdoEn_2d = 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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounte... |
The wrong part of the code is:
Mdo_d = ShiftedBit << 2 | Mdo_2d;
The right code snippet is:
Mdo_d = ShiftedBit | Mdo_2d; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounter, ap... |
The right code snippet is:
Mdo_d = ShiftedBit | Mdo_2d; | '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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7... |
The wrong part of the code is:
Mdo_d = ShiftedBit << 2 | Mdo_2d;
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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgr... |
The wrong part of the code is:
Mdo_d = ShiftedBit << 2 | Mdo_2d;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
Mdo_d = ShiftedBit | Mdo_2d; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounte... |
The wrong part of the code is:
while(true) {}
The right code snippet is:
// No infinite loop in the original code
// Therefore, no code snippet to replace
// Instead, we can add a loop that never terminates
while(1) {} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounter, ap... |
The right code snippet is:
// No infinite loop in the original code
// Therefore, no code snippet to replace
// Instead, we can add a loop that never terminates
while(1) {} | '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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7... |
The wrong part of the code is:
while(true) {}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgr... |
The wrong part of the code is:
while(true) {}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
// No infinite loop in the original code
// Therefore, no code snippet to replace
// Instead, we can add a loop that never terminates
while(1) {} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounte... |
The wrong part of the code is:
ap_int<1> Mdo_d = 0;
The right code snippet is:
ap_uint<1> Mdo_d = 0; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounter, ap... |
The right code snippet is:
ap_uint<1> Mdo_d = 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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7... |
The wrong part of the code is:
ap_int<1> Mdo_d = 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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgr... |
The wrong part of the code is:
ap_int<1> Mdo_d = 0;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_uint<1> Mdo_d = 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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounte... |
The wrong part of the code is:
for(int i = 0; i < 10; i++)
{
// loop body
}
The right code snippet is:
// No manual loop unrolling in the original code
// Therefore, no code snippet to replace
// Instead, we can add manual loop unrolling where it is not necessary
for(int i = 0; i < 10; i+=2)
{
// ... | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounter, ap... |
The right code snippet is:
// No manual loop unrolling in the original code
// Therefore, no code snippet to replace
// Instead, we can add manual loop unrolling where it is not necessary
for(int i = 0; i < 10; i+=2)
{
// loop body
} | '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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7... |
The wrong part of the code is:
for(int i = 0; i < 10; i++)
{
// loop body
}
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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgr... |
The wrong part of the code is:
for(int i = 0; i < 10; i++)
{
// loop body
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
// No manual loop unrolling in the original code
// Therefore, no code snippet to replace
// Instead, we can add manual loop unrolling whe... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounte... |
The wrong part of the code is:
ap_uint<1> MdoEn_2d = {0};
The right code snippet is:
ap_uint<1> MdoEn_2d = 0; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounter, ap... |
The right code snippet is:
ap_uint<1> MdoEn_2d = 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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7... |
The wrong part of the code is:
ap_uint<1> MdoEn_2d = {0};
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgr... |
The wrong part of the code is:
ap_uint<1> MdoEn_2d = {0};
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<1> MdoEn_2d = 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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounte... |
The wrong part of the code is:
ap_uint<8> buffer[16];
#pragma HLS ARRAY_PARTITION variable=buffer complete dim=1
for(int i = 0; i < 8; i++)
{
buffer[i] = buffer[i];
}
The right code snippet is:
// No split buffer in the original code
// Therefore, no code snippet to replace
// Instead, we can add a ... | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounter, ap... |
The right code snippet is:
// No split buffer in the original code
// Therefore, no code snippet to replace
// Instead, we can add a split buffer and copy from the wrong half
ap_uint<8> buffer[16];
#pragma HLS ARRAY_PARTITION variable=buffer complete dim=1
for(int i = 0; i < 8; i++)
{
buffer[i] = buffer[i+... | '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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7... |
The wrong part of the code is:
ap_uint<8> buffer[16];
#pragma HLS ARRAY_PARTITION variable=buffer complete dim=1
for(int i = 0; i < 8; i++)
{
buffer[i] = buffer[i];
}
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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgr... |
The wrong part of the code is:
ap_uint<8> buffer[16];
#pragma HLS ARRAY_PARTITION variable=buffer complete dim=1
for(int i = 0; i < 8; i++)
{
buffer[i] = buffer[i];
}
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
// No split buffer in the original code
// The... | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounte... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer complete dim=1
The right code snippet is:
// No array partition pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect array partition pragma
#pragma HLS ARRAY_PARTITION variabl... | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounter, ap... |
The right code snippet is:
// No array partition pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect array partition pragma
#pragma HLS ARRAY_PARTITION variable=buffer cyclic factor=3 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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer complete dim=1
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgr... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer complete dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
// No array partition pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect... | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounte... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer complete factor=4 dim=1
The right code snippet is:
// No array partition pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect factor for the array partition pragma
#pragma HLS... | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounter, ap... |
The right code snippet is:
// No array partition pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect factor for the array partition pragma
#pragma HLS ARRAY_PARTITION variable=buffer complete factor=3 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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer complete factor=4 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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgr... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer complete factor=4 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
// No array partition pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an ... | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounte... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer complete dim=1
The right code snippet is:
// No array partition pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect dimension for the array partition pragma
#pragma HLS ARRAY... | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounter, ap... |
The right code snippet is:
// No array partition pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect dimension for the array partition pragma
#pragma HLS ARRAY_PARTITION variable=buffer complete dim=2 | '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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer complete dim=1
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgr... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=buffer complete dim=1
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
// No array partition pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect... | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounte... |
The wrong part of the code is:
#pragma HLS DATAFLOW OFF
The right code snippet is:
// No dataflow pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect dataflow pragma
#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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounter, ap... |
The right code snippet is:
// No dataflow pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect dataflow pragma
#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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7... |
The wrong part of the code is:
#pragma HLS DATAFLOW OFF
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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgr... |
The wrong part of the code is:
#pragma HLS DATAFLOW OFF
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
// No dataflow pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect dataflow pragma
#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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounte... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=Cl
The right code snippet is:
// No interface pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect interface pragma
#pragma HLS INTERFACE ap_none port=Clk | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7> BitCounter, ap... |
The right code snippet is:
// No interface pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect interface pragma
#pragma HLS INTERFACE ap_none port=Clk | '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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgress, ap_uint<1> ShiftedBit, ap_uint<7... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=Cl
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:
// HLS code for eth_outputcontrol module
#include "ap_int.h"
void eth_outputcontrol(ap_uint<1> Clk, ap_uint<1> Reset, ap_uint<1> InProgr... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=Cl
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
// No interface pragma in the original code
// Therefore, no code snippet to replace
// Instead, we can add an incorrect interface pragma
#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_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=bi... |
The wrong part of the code is:
```
excess_3_reg = binary_reg + 2;
while(1);
```
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | INF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=binary
... |
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
```
excess_3_reg = binary_reg + 2;
while(1);
```
The high-level-synthesis bug type of the code is: INF | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=... |
The wrong part of the code is:
```
excess_3_reg = binary_reg + 2;
while(1);
```
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=bi... |
The wrong part of the code is:
```
excess_3_reg = binary_reg + 3;
excess_3_reg[5] = 1;
```
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=binary
... |
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
```
excess_3_reg = binary_reg + 3;
excess_3_reg[5] = 1;
```
The high-level-synthesis bug type of the code is: OOB | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=... |
The wrong part of the code is:
```
excess_3_reg = binary_reg + 3;
excess_3_reg[5] = 1;
```
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=bi... |
The wrong part of the code is:
```
ap_uint<4> binary_reg = 0;
```
The right code snippet is:
```
ap_uint<4> binary_reg;
``` | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=binary
... |
The right code snippet is:
```
ap_uint<4> binary_reg;
``` | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
```
ap_uint<4> binary_reg = 0;
```
The high-level-synthesis bug type of the code is: INIT | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=... |
The wrong part of the code is:
```
ap_uint<4> binary_reg = 0;
```
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
```
ap_uint<4> binary_reg;
``` | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=bi... |
The wrong part of the code is:
```
excess_3_reg = (ap_int<8>) excess_3_reg;
```
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | USE |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=binary
... |
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
```
excess_3_reg = (ap_int<8>) excess_3_reg;
```
The high-level-synthesis bug type of the code is: USE | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=... |
The wrong part of the code is:
```
excess_3_reg = (ap_int<8>) excess_3_reg;
```
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=bi... |
The wrong part of the code is:
```
excess_3_reg = binary_reg + 3;
excess_3_reg = excess_3_reg + binary_reg;
```
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | MLU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=binary
... |
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
```
excess_3_reg = binary_reg + 3;
excess_3_reg = excess_3_reg + binary_reg;
```
The high-level-synthesis bug type of the code is: MLU | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=... |
The wrong part of the code is:
```
excess_3_reg = binary_reg + 3;
excess_3_reg = excess_3_reg + binary_reg;
```
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=bi... |
The wrong part of the code is:
```
excess_3_reg = binary_reg + 3;
ap_uint<4> temp = excess_3_reg.range(3, 0);
excess_3_reg.range(3, 0) = excess_3_reg.range(7, 4);
excess_3_reg.range(7, 4) = temp;
```
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | BUF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=binary
... |
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
```
excess_3_reg = binary_reg + 3;
ap_uint<4> temp = excess_3_reg.range(3, 0);
excess_3_reg.range(3, 0) = excess_3_reg.range(7, 4);
excess_3_reg.range(7, 4) = temp;
```
The high-level-synthesis bug type of the code is: BUF | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=... |
The wrong part of the code is:
```
excess_3_reg = binary_reg + 3;
ap_uint<4> temp = excess_3_reg.range(3, 0);
excess_3_reg.range(3, 0) = excess_3_reg.range(7, 4);
excess_3_reg.range(7, 4) = temp;
```
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
```
excess_3_reg =... | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=bi... |
The wrong part of the code is:
```
#pragma HLS array_partition variable=excess_3_reg cyclic factor=3
excess_3_reg = binary_reg + 3;
```
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | APT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=binary
... |
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
```
#pragma HLS array_partition variable=excess_3_reg cyclic factor=3
excess_3_reg = binary_reg + 3;
```
The high-level-synthesis bug type of the code is: APT | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=... |
The wrong part of the code is:
```
#pragma HLS array_partition variable=excess_3_reg cyclic factor=3
excess_3_reg = binary_reg + 3;
```
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=bi... |
The wrong part of the code is:
```
#pragma HLS array_partition variable=excess_3_reg complete
excess_3_reg = binary_reg + 3;
```
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | FND |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=binary
... |
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
```
#pragma HLS array_partition variable=excess_3_reg complete
excess_3_reg = binary_reg + 3;
```
The high-level-synthesis bug type of the code is: FND | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=... |
The wrong part of the code is:
```
#pragma HLS array_partition variable=excess_3_reg complete
excess_3_reg = binary_reg + 3;
```
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=bi... |
The wrong part of the code is:
```
#pragma HLS array_partition variable=excess_3_reg dim=2
excess_3_reg = binary_reg + 3;
```
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | DID |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=binary
... |
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
```
#pragma HLS array_partition variable=excess_3_reg dim=2
excess_3_reg = binary_reg + 3;
```
The high-level-synthesis bug type of the code is: DID | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=... |
The wrong part of the code is:
```
#pragma HLS array_partition variable=excess_3_reg dim=2
excess_3_reg = binary_reg + 3;
```
The high-level-synthesis bug type of the code is: DID
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=bi... |
The wrong part of the code is:
```
#pragma HLS dataflow
excess_3_reg = binary_reg + 3;
```
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | DFP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=binary
... |
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
```
#pragma HLS dataflow
excess_3_reg = binary_reg + 3;
```
The high-level-synthesis bug type of the code is: DFP | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=... |
The wrong part of the code is:
```
#pragma HLS dataflow
excess_3_reg = binary_reg + 3;
```
The high-level-synthesis bug type of the code is: DFP
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=bi... |
The wrong part of the code is:
```
#pragma HLS interface ap_fifo port=excess_3_reg
excess_3_reg = binary_reg + 3;
```
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | IDAP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=binary
... |
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
```
#pragma HLS interface ap_fifo port=excess_3_reg
excess_3_reg = binary_reg + 3;
```
The high-level-synthesis bug type of the code is: IDAP | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void excess_3_converter(ap_uint<4> binary, ap_uint<8> &excess_3) {
#pragma HLS INTERFACE ap_ctrl_none port=... |
The wrong part of the code is:
```
#pragma HLS interface ap_fifo port=excess_3_reg
excess_3_reg = binary_reg + 3;
```
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
```
excess_3_reg = binary_reg + 3;
``` | IDAP |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.