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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
int expected_output = 0;
The right code snippet is:
int expected_output; | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
int expected_output; | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
The wrong part of the code is:
int expected_output = 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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
int expected_output = 0;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
int expected_output; | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
actual_output = math_ops_inst.mul2(500);
The right code snippet is:
actual_output = math_ops_inst.mul2(5); | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
actual_output = math_ops_inst.mul2(5); | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
The wrong part of the code is:
actual_output = math_ops_inst.mul2(500);
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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
actual_output = math_ops_inst.mul2(500);
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
actual_output = math_ops_inst.mul2(5); | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
for(int i=0; i>=0; i++) {
// infinite loop
}
The right code snippet is:
while(1) {
// infinite loop
} | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
while(1) {
// infinite loop
} | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
The wrong part of the code is:
for(int i=0; i>=0; i++) {
// infinite loop
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
for(int i=0; i>=0; i++) {
// infinite loop
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
while(1) {
// infinite loop
} | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
signed int a = 1000;
int b = a;
The right code snippet is:
unsigned int a = 1000;
int b = a; | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
unsigned int a = 1000;
int b = a; | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
The wrong part of the code is:
signed int a = 1000;
int b = a;
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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
signed int a = 1000;
int b = a;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
unsigned int a = 1000;
int b = a; | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
memcpy(buffer1, buffer2+size, size);
The right code snippet is:
memcpy(buffer1, buffer2, size); | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
memcpy(buffer1, buffer2, 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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
The wrong part of the code is:
memcpy(buffer1, buffer2+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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
memcpy(buffer1, buffer2+size, size);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
memcpy(buffer1, buffer2, 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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
#pragma HLS array_partition variable=arr cyclic
The right code snippet is:
#pragma HLS array_partition variable=arr complete | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
#pragma HLS array_partition variable=arr complete | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
The wrong part of the code is:
#pragma HLS array_partition variable=arr cyclic
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
#pragma HLS array_partition variable=arr cyclic
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=arr complete | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
#pragma HLS array_partition variable=arr cyclic factor=3
The right code snippet is:
#pragma HLS array_partition variable=arr cyclic factor=2 | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
#pragma HLS array_partition variable=arr cyclic factor=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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
The wrong part of the code is:
#pragma HLS array_partition variable=arr cyclic factor=3
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
#pragma HLS array_partition variable=arr cyclic factor=3
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=arr cyclic factor=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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
#pragma HLS array_partition variable=arr cyclic factor=2 dim=3
The right code snippet is:
#pragma HLS array_partition variable=arr cyclic factor=2 dim=2 | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
#pragma HLS array_partition variable=arr cyclic factor=2 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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
The wrong part of the code is:
#pragma HLS array_partition variable=arr cyclic factor=2 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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
#pragma HLS array_partition variable=arr cyclic factor=2 dim=3
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=arr cyclic factor=2 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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=arr
The right code snippet is:
#pragma HLS interface ap_fifo port=arr | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
#pragma HLS interface ap_fifo port=arr | '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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=arr
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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=arr
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface ap_fifo port=arr | 'IDAP' |
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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=1024 port=arr
The right code snippet is:
#pragma HLS interface m_axi depth=512 port=arr | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
#pragma HLS interface m_axi depth=512 port=arr | '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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=1024 port=arr
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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=1024 port=arr
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi depth=512 port=arr | 'RAMB' |
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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
#pragma HLS interface bram port=arr
The right code snippet is:
#pragma HLS interface axis port=arr | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
#pragma HLS interface axis port=arr | '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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
The wrong part of the code is:
#pragma HLS interface bram port=arr
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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
#pragma HLS interface bram port=arr
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface axis port=arr | 'SMA' |
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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=arr
The right code snippet is:
#pragma HLS interface ap_none port=arr | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
#pragma HLS interface ap_none port=arr | '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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=arr
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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=arr
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface ap_none port=arr | 'AMS' |
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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
#pragma HLS pipeline | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
#pragma HLS pipeline | '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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
#pragma HLS pipeline | 'MLP' |
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 testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold ... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The right code snippet is:
#pragma HLS unroll | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variables to hold the e... |
The right code snippet is:
#pragma HLS unroll | '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:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops math_ops_inst;
// Declare variabl... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The high-level-synthesis bug type of the code is: 'ILNU' | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
// HLS code for testbench module
#include <stdio.h>
#include "math_ops.h"
int main() {
// Instantiate the math_ops module
math_ops... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
#pragma HLS unroll | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The right code snippet is:
N/A - No arrays are used in the given code. | 'OOB': Out-of-bounds array access |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=C
... |
The right code snippet is:
N/A - No arrays are used in the given code. | 'OOB': Out-of-bounds array access |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE a... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access | 'OOB': Out-of-bounds array access |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access
The right code snippet is:
N/A - No arrays are used in the given code. | 'OOB': Out-of-bounds array access |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
bool Y;
Y = Y && !(A | B | C | D);
The right code snippet is:
N/A - All variables are initialized before being used. | 'INIT': Read of uninitialized variable |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=C
... |
The right code snippet is:
N/A - All variables are initialized before being used. | 'INIT': Read of uninitialized variable |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE a... |
The wrong part of the code is:
bool Y;
Y = Y && !(A | B | C | D);
The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable | 'INIT': Read of uninitialized variable |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
bool Y;
Y = Y && !(A | B | C | D);
The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable
The right code snippet is:
N/A - All variables are initialized before being used. | 'INIT': Read of uninitialized variable |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
bool Y;
Y = !(A | B | C | D) >> 5;
The right code snippet is:
N/A - No bit shifting is used in the given code. | 'SHFT': Bit shift by an out-of-bounds amount |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=C
... |
The right code snippet is:
N/A - No bit shifting is used in the given code. | 'SHFT': Bit shift by an out-of-bounds amount |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE a... |
The wrong part of the code is:
bool Y;
Y = !(A | B | C | D) >> 5;
The high-level-synthesis bug type of the code is: 'SHFT': Bit shift by an out-of-bounds amount | 'SHFT': Bit shift by an out-of-bounds amount |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
bool Y;
Y = !(A | B | C | D) >> 5;
The high-level-synthesis bug type of the code is: 'SHFT': Bit shift by an out-of-bounds amount
The right code snippet is:
N/A - No bit shifting is used in the given code. | 'SHFT': Bit shift by an out-of-bounds amount |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The right code snippet is:
N/A - No loops are used in the given code. | 'INF': An infinite loop arising from an incorrect loop termination |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=C
... |
The right code snippet is:
N/A - No loops are used in the given code. | 'INF': An infinite loop arising from an incorrect loop termination |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE a... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination | 'INF': An infinite loop arising from an incorrect loop termination |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination
The right code snippet is:
N/A - No loops are used in the given code. | 'INF': An infinite loop arising from an incorrect loop termination |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
signed bool Y;
Y = !(A | B | C | D);
The right code snippet is:
Y = !(A | B | C | D); | 'USE': Unintended sign extension |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=C
... |
The right code snippet is:
Y = !(A | B | C | D); | 'USE': Unintended sign extension |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE a... |
The wrong part of the code is:
signed bool Y;
Y = !(A | B | C | D);
The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension | 'USE': Unintended sign extension |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
signed bool Y;
Y = !(A | B | C | D);
The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension
The right code snippet is:
Y = !(A | B | C | D); | 'USE': Unintended sign extension |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The right code snippet is:
N/A - No manual loop unrolling is used in the given code. | 'MLU': Errors in manual loop unrolling |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=C
... |
The right code snippet is:
N/A - No manual loop unrolling is used in the given code. | 'MLU': Errors in manual loop unrolling |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE a... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The high-level-synthesis bug type of the code is: 'MLU': Errors in manual loop unrolling | 'MLU': Errors in manual loop unrolling |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The high-level-synthesis bug type of the code is: 'MLU': Errors in manual loop unrolling
The right code snippet is:
N/A - No manual loop unrolling is used in the given code. | 'MLU': Errors in manual loop unrolling |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
bool Y = 0;
Y = !(A | B | C | D);
The right code snippet is:
N/A - All variables are initialized correctly. | 'ZERO': Variable initialized to zero instead of nonzero initializer |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=C
... |
The right code snippet is:
N/A - All variables are initialized correctly. | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE a... |
The wrong part of the code is:
bool Y = 0;
Y = !(A | B | C | D);
The high-level-synthesis bug type of the code is: 'ZERO': Variable initialized to zero instead of nonzero initializer | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
bool Y = 0;
Y = !(A | B | C | D);
The high-level-synthesis bug type of the code is: 'ZERO': Variable initialized to zero instead of nonzero initializer
The right code snippet is:
N/A - All variables are initialized correctly. | 'ZERO': Variable initialized to zero instead of nonzero initializer |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The right code snippet is:
N/A - No split buffers are used in the given code. | 'BUF': Copying from the wrong half of a split buffer |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=C
... |
The right code snippet is:
N/A - No split buffers are used in the given code. | 'BUF': Copying from the wrong half of a split buffer |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE a... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The high-level-synthesis bug type of the code is: 'BUF': Copying from the wrong half of a split buffer | 'BUF': Copying from the wrong half of a split buffer |
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:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The high-level-synthesis bug type of the code is: 'BUF': Copying from the wrong half of a split buffer
The right code snippet is:
N/A - No split buffers are used in the given code. | 'BUF': Copying from the wrong half of a split buffer |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The right code snippet is:
N/A - No arrays are used in the given code. | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=C
... |
The right code snippet is:
N/A - No arrays are used in the given code. | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE a... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The high-level-synthesis bug type of the code is: 'APT': Array partition type error for the pragma '#pragma HLS array_partition' | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The high-level-synthesis bug type of the code is: 'APT': Array partition type error for the pragma '#pragma HLS array_partition'
The right code snippet is:
N/A - No arrays are used in the given code. | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The right code snippet is:
N/A - No arrays are used in the given code. | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE ap_none port=C
... |
The right code snippet is:
N/A - No arrays are used in the given code. | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=B
#pragma HLS INTERFACE a... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The high-level-synthesis bug type of the code is: 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void nor4_module(bool A, bool B, bool C, bool D, bool& Y) {
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_no... |
The wrong part of the code is:
N/A - This bug type is not applicable to the given code.
The high-level-synthesis bug type of the code is: 'FND': Factor not divisible for the pragma '#pragma HLS array_partition'
The right code snippet is:
N/A - No arrays are used in the given code. | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.