instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
for(int i=0;i<3;i++){
// code snippet to be loop unrolled
}
The right code snippet is:
// nothing to replace | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
// nothing to replace | '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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INT... |
The wrong part of the code is:
for(int i=0;i<3;i++){
// code snippet to be loop unrolled
}
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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFAC... |
The wrong part of the code is:
for(int i=0;i<3;i++){
// code snippet to be loop unrolled
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
// nothing to replace | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
bool mux_out = 0;
The right code snippet is:
bool mux_out; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
bool mux_out; | '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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INT... |
The wrong part of the code is:
bool mux_out = 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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFAC... |
The wrong part of the code is:
bool mux_out = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
bool mux_out; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
// assuming buffer is split in half
mux_out = sel_b1 ? b[0] : (sel_b2 ? a[1] : b[2]);
The right code snippet is:
// nothing to replace | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
// nothing to replace | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INT... |
The wrong part of the code is:
// assuming buffer is split in half
mux_out = sel_b1 ? b[0] : (sel_b2 ? a[1] : b[2]);
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFAC... |
The wrong part of the code is:
// assuming buffer is split in half
mux_out = sel_b1 ? b[0] : (sel_b2 ? a[1] : b[2]);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
// nothing to replace | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS array_partition variable=mux_out block factor=2 dim=1
The right code snippet is:
// nothing to replace | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
// nothing to replace | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS array_partition variable=mux_out 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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS array_partition variable=mux_out block factor=2 dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
// nothing to replace | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS array_partition variable=mux_out cyclic factor=3 dim=1
The right code snippet is:
// nothing to replace | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
// nothing to replace | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS array_partition variable=mux_out cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS array_partition variable=mux_out cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
// nothing to replace | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS array_partition variable=mux_out block factor=2 dim=2
The right code snippet is:
// nothing to replace | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
// nothing to replace | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS array_partition variable=mux_out block 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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS array_partition variable=mux_out block factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
// nothing to replace | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS dataflow
The right code snippet is:
// nothing to replace | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
// nothing to replace | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
// nothing to replace | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=mux_out
The right code snippet is:
// nothing to replace | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
// nothing to replace | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=mux_out
The high-level-synthesis bug type of the code is: 'IDAP' | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=mux_out
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
// nothing to replace | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS interface m_axi port=mux_out offset=slave
The right code snippet is:
// nothing to replace | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
// nothing to replace | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS interface m_axi port=mux_out offset=slave
The high-level-synthesis bug type of the code is: 'RAMB' | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS interface m_axi port=mux_out offset=slave
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
// nothing to replace | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS interface bram port=mux_out
The right code snippet is:
// nothing to replace | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
// nothing to replace | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS interface bram port=mux_out
The high-level-synthesis bug type of the code is: 'SMA' | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS interface bram port=mux_out
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
// nothing to replace | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS interface ap_none port=mux_out
The right code snippet is:
// nothing to replace | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
// nothing to replace | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS interface ap_none port=mux_out
The high-level-synthesis bug type of the code is: 'AMS' | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS interface ap_none port=mux_out
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
// nothing to replace | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
// nothing to replace | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
// nothing to replace | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INT... |
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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFAC... |
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:
// nothing to replace | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop=True
The right code snippet is:
// nothing to replace | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
// nothing to replace | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFACE ap_none port=sel_b2
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop=True
The high-level-synthesis bug type of the code is: 'ILNU' | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=sel_b1
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop=True
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
// nothing to replace | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
... |
The wrong part of the code is:
result = num1 / (num2 - 1);
The right code snippet is:
result = num1 / num2; | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
b... |
The right code snippet is:
result = num1 / num2; | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num... |
The wrong part of the code is:
result = num1 / (num2 - 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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
ca... |
The wrong part of the code is:
result = num1 / (num2 - 1);
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
result = num1 / num2; | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
... |
The wrong part of the code is:
ap_uint<8> result = 0;
The right code snippet is:
ap_uint<8> result; | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
b... |
The right code snippet is:
ap_uint<8> result; | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num... |
The wrong part of the code is:
ap_uint<8> result = 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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
ca... |
The wrong part of the code is:
ap_uint<8> result = 0;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<8> result; | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
... |
The wrong part of the code is:
result = num1 << 10;
The right code snippet is:
result = num1 << 2; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
b... |
The right code snippet is:
result = num1 << 2; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num... |
The wrong part of the code is:
result = num1 << 10;
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
ca... |
The wrong part of the code is:
result = num1 << 10;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
result = num1 << 2; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// some code
}
The right code snippet is:
for (int i = 0; i < 10; i++) {
// some code
} | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
b... |
The right code snippet is:
for (int i = 0; i < 10; i++) {
// some code
} | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// some code
}
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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
ca... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// some code
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
for (int i = 0; i < 10; i++) {
// some code
} | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
... |
The wrong part of the code is:
ap_uint<8> num = -1;
The right code snippet is:
ap_int<8> num = -1; | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
b... |
The right code snippet is:
ap_int<8> num = -1; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num... |
The wrong part of the code is:
ap_uint<8> num = -1;
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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
ca... |
The wrong part of the code is:
ap_uint<8> num = -1;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_int<8> num = -1; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
... |
The wrong part of the code is:
for (int i = 0; i < 5; i++) {
// some code
i++;
}
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_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
b... |
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_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num... |
The wrong part of the code is:
for (int i = 0; i < 5; i++) {
// some code
i++;
}
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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
ca... |
The wrong part of the code is:
for (int i = 0; i < 5; i++) {
// some code
i++;
}
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_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
... |
The wrong part of the code is:
ap_uint<8> num = 0;
The right code snippet is:
ap_uint<8> num = 5; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
b... |
The right code snippet is:
ap_uint<8> num = 5; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num... |
The wrong part of the code is:
ap_uint<8> num = 0;
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
ca... |
The wrong part of the code is:
ap_uint<8> num = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<8> num = 5; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
... |
The wrong part of the code is:
memcpy(dest, src + size, size);
The right code snippet is:
memcpy(dest, src, size); | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
b... |
The right code snippet is:
memcpy(dest, src, size); | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num... |
The wrong part of the code is:
memcpy(dest, src + size, size);
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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
ca... |
The wrong part of the code is:
memcpy(dest, src + size, size);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
memcpy(dest, src, size); | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=num1 cyclic factor=3 dim=2
The right code snippet is:
#pragma HLS array_partition variable=num1 complete dim=1 | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
b... |
The right code snippet is:
#pragma HLS array_partition variable=num1 complete dim=1 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num... |
The wrong part of the code is:
#pragma HLS array_partition variable=num1 cyclic factor=3 dim=2
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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
ca... |
The wrong part of the code is:
#pragma HLS array_partition variable=num1 cyclic factor=3 dim=2
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=num1 complete dim=1 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=num1 cyclic factor=4 dim=2
The right code snippet is:
#pragma HLS array_partition variable=num1 cyclic factor=3 dim=2 | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
b... |
The right code snippet is:
#pragma HLS array_partition variable=num1 cyclic factor=3 dim=2 | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num... |
The wrong part of the code is:
#pragma HLS array_partition variable=num1 cyclic factor=4 dim=2
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
ca... |
The wrong part of the code is:
#pragma HLS array_partition variable=num1 cyclic factor=4 dim=2
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=num1 cyclic factor=3 dim=2 | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=num1 cyclic factor=3 dim=3
The right code snippet is:
#pragma HLS array_partition variable=num1 cyclic factor=3 dim=2 | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
b... |
The right code snippet is:
#pragma HLS array_partition variable=num1 cyclic factor=3 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:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num... |
The wrong part of the code is:
#pragma HLS array_partition variable=num1 cyclic factor=3 dim=3
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
ca... |
The wrong part of the code is:
#pragma HLS array_partition variable=num1 cyclic factor=3 dim=3
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=num1 cyclic factor=3 dim=2 | '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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num2;
b... |
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
case 0:
result = num1 + num... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) {
switch (op) {
ca... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.