instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void stratixii_reorder_output(ap_uint<144> datain, ap_uint<4> operation, bool addnsub, ap_uint<144>& dataout) {
#pragma HLS INTERFACE ap_ctrl_none port=ret... |
The wrong part of the code is:
dataout_tmp(143,72) = ap_int<72>(0);
The right code snippet is:
dataout_tmp(143,72) = ap_uint<72>(0); | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void stratixii_reorder_output(ap_uint<144> datain, ap_uint<4> operation, bool addnsub, ap_uint<144>& dataout) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
dataout_tmp(143,72) = ap_uint<72>(0); | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void stratixii_reorder_output(ap_uint<144> datain, ap_uint<4> operation, bool addnsub, ap_uint<144>& dataout) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
dataout_tmp(143,72) = ap_int<72>(0);
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void stratixii_reorder_output(ap_uint<144> datain, ap_uint<4> operation, bool addnsub, ap_uint<144>& dataout) {... |
The wrong part of the code is:
dataout_tmp(143,72) = ap_int<72>(0);
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
dataout_tmp(143,72) = ap_uint<72>(0); | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void stratixii_reorder_output(ap_uint<144> datain, ap_uint<4> operation, bool addnsub, ap_uint<144>& dataout) {
#pragma HLS INTERFACE ap_ctrl_none port=ret... |
The wrong part of the code is:
case 7 :
{ // 36 BIT MULTIPLY
dataout_tmp(17,0) = (addnsub) ? datain(17,0) : ap_uint<18>(0);
dataout_tmp(35,18) = (addnsub) ? datain(53,36) : ap_uint<18>(0);
dataout_tmp(53,36) = (addnsub) ? datain(35,18) : ap_uint<18>(0);
dataout_tmp(71,54) = ... | '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 stratixii_reorder_output(ap_uint<144> datain, ap_uint<4> operation, bool addnsub, ap_uint<144>& dataout) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
case 7 :
{ // 36 BIT MULTIPLY
dataout_tmp(17,0) = (addnsub) ? datain(17,0) : ap_uint<18>(0);
dataout_tmp(35,18) = (addnsub) ? datain(53,36) : ap_uint<18>(0);
dataout_tmp(53,36) = (addnsub) ? datain(35,18) : ap_uint<18>(0);
dataout_tmp(71,54) = (add... | '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 stratixii_reorder_output(ap_uint<144> datain, ap_uint<4> operation, bool addnsub, ap_uint<144>& dataout) {
#pragma HLS INTERFACE ap_ctrl_no... |
The wrong part of the code is:
case 7 :
{ // 36 BIT MULTIPLY
dataout_tmp(17,0) = (addnsub) ? datain(17,0) : ap_uint<18>(0);
dataout_tmp(35,18) = (addnsub) ? datain(53,36) : ap_uint<18>(0);
dataout_tmp(53,36) = (addnsub) ? datain(35,18) : ap_uint<18>(0);
dataout_tmp(71,54) = ... | '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 stratixii_reorder_output(ap_uint<144> datain, ap_uint<4> operation, bool addnsub, ap_uint<144>& dataout) {... |
The wrong part of the code is:
case 7 :
{ // 36 BIT MULTIPLY
dataout_tmp(17,0) = (addnsub) ? datain(17,0) : ap_uint<18>(0);
dataout_tmp(35,18) = (addnsub) ? datain(53,36) : ap_uint<18>(0);
dataout_tmp(53,36) = (addnsub) ? datain(35,18) : ap_uint<18>(0);
dataout_tmp(71,54) = ... | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
a_xor_b[i] = a[i+1] ^ b[i+1];
The right code snippet is:
a_xor_b[i] = a[i] ^ b[i]; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
a_xor_b[i] = a[i] ^ b[i]; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
a_xor_b[i] = a[i+1] ^ b[i+1];
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparato... |
The wrong part of the code is:
a_xor_b[i] = a[i+1] ^ b[i+1];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
a_xor_b[i] = a[i] ^ b[i]; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
int a_xor_b[4] = {1, 2, 3, 4};
The right code snippet is:
int a_xor_b[4]; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
int a_xor_b[4]; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
int a_xor_b[4] = {1, 2, 3, 4};
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparato... |
The wrong part of the code is:
int a_xor_b[4] = {1, 2, 3, 4};
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
int a_xor_b[4]; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
a_lt_b[i] = (~a_and_b[i]) << a_xor_b[i];
The right code snippet is:
a_lt_b[i] = (~a_and_b[i]) & a_xor_b[i]; | 'SHFT' |
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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
a_lt_b[i] = (~a_and_b[i]) & a_xor_b[i]; | '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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
a_lt_b[i] = (~a_and_b[i]) << a_xor_b[i];
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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparato... |
The wrong part of the code is:
a_lt_b[i] = (~a_and_b[i]) << a_xor_b[i];
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
a_lt_b[i] = (~a_and_b[i]) & a_xor_b[i]; | 'SHFT' |
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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
for (int i = 0; ; i++) {
The right code snippet is:
for (int i = 0; i < 4; i++) { | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
for (int i = 0; i < 4; i++) { | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
for (int i = 0; ; i++) {
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparato... |
The wrong part of the code is:
for (int i = 0; ; i++) {
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
for (int i = 0; i < 4; i++) { | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
unsigned int a_xor_b[4];
The right code snippet is:
int a_xor_b[4]; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
int a_xor_b[4]; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
unsigned int a_xor_b[4];
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparato... |
The wrong part of the code is:
unsigned int a_xor_b[4];
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
int a_xor_b[4]; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
a_xor_b[i] = a[i+4] ^ b[i+4];
The right code snippet is:
a_xor_b[i] = a[i] ^ b[i]; | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
a_xor_b[i] = a[i] ^ b[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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
a_xor_b[i] = a[i+4] ^ b[i+4];
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_ctrl_none port=return
void comparato... |
The wrong part of the code is:
a_xor_b[i] = a[i+4] ^ b[i+4];
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
a_xor_b[i] = a[i] ^ b[i]; | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=2 dim=1
#pragma HLS array_partition variable=b cyclic factor=2 dim=1
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=1
#pragma HLS array_partition variable=b 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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=1
#pragma HLS array_partition variable=b 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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=2 dim=1
#pragma HLS array_partition variable=b cyclic 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_ctrl_none port=return
void comparato... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=2 dim=1
#pragma HLS array_partition variable=b cyclic factor=2 dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=1
#pragma H... | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=3 dim=1
#pragma HLS array_partition variable=b cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=1
#pragma HLS array_partition variable=b complete dim=1 | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=1
#pragma HLS array_partition variable=b complete 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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=3 dim=1
#pragma HLS array_partition variable=b 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_ctrl_none port=return
void comparato... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=3 dim=1
#pragma HLS array_partition variable=b cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=1
#pragma H... | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=2 dim=2
#pragma HLS array_partition variable=b cyclic factor=2 dim=2
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=1
#pragma HLS array_partition variable=b complete dim=1 | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=1
#pragma HLS array_partition variable=b complete dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=2 dim=2
#pragma HLS array_partition variable=b cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparato... |
The wrong part of the code is:
#pragma HLS array_partition variable=a cyclic factor=2 dim=2
#pragma HLS array_partition variable=b cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=a complete dim=1
#pragma H... | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparato... |
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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=a
#pragma HLS interface ap_fifo port=b
#pragma HLS interface ap_ctrl_none port=return
The right code snippet is:
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_ctrl_none port=return | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_ctrl_none port=return | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=a
#pragma HLS interface ap_fifo port=b
#pragma HLS interface ap_ctrl_none port=return
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_ctrl_none port=return
void comparato... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=a
#pragma HLS interface ap_fifo port=b
#pragma HLS interface ap_ctrl_none port=return
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_n... | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
#pragma HLS interface m_axi port=a
#pragma HLS interface m_axi port=b
#pragma HLS interface ap_ctrl_none port=return
The right code snippet is:
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_ctrl_none port=return | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_ctrl_none port=return | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
#pragma HLS interface m_axi port=a
#pragma HLS interface m_axi port=b
#pragma HLS interface ap_ctrl_none port=return
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_ctrl_none port=return
void comparato... |
The wrong part of the code is:
#pragma HLS interface m_axi port=a
#pragma HLS interface m_axi port=b
#pragma HLS interface ap_ctrl_none port=return
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none ... | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
#pragma HLS interface bram port=a
#pragma HLS interface bram port=b
#pragma HLS interface ap_ctrl_none port=return
The right code snippet is:
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_ctrl_none port=return | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_ctrl_none port=return | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
#pragma HLS interface bram port=a
#pragma HLS interface bram port=b
#pragma HLS interface ap_ctrl_none port=return
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_ctrl_none port=return
void comparato... |
The wrong part of the code is:
#pragma HLS interface bram port=a
#pragma HLS interface bram port=b
#pragma HLS interface ap_ctrl_none port=return
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none por... | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=a
#pragma HLS interface ap_vld port=b
#pragma HLS interface ap_ctrl_none port=return
The right code snippet is:
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_ctrl_none port=return | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_ctrl_none port=return | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=a
#pragma HLS interface ap_vld port=b
#pragma HLS interface ap_ctrl_none port=return
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_ctrl_none port=return
void comparato... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=a
#pragma HLS interface ap_vld port=b
#pragma HLS interface ap_ctrl_none port=return
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none... | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
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_ctrl_none port=return
void comparato... |
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:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, b... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 0; i < 4; i++) {
The right code snippet is:
for (int i = 0; i < 4; i++) { | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, bool >, bool &... |
The right code snippet is:
for (int i = 0; i < 4; i++) { | '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_ctrl_none port=return
void comparator_4bit(int a[4], int b[4], bool &eq, ... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 0; i < 4; i++) {
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_ctrl_none port=return
void comparato... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 0; i < 4; i++) {
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
for (int i = 0; i < 4; i++) { | '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 two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CT... |
The wrong part of the code is:
case 0b100:
out = 0b1000;
break;
The right code snippet is:
case 0b11:
out = 0b1000;
break; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU... |
The right code snippet is:
case 0b11:
out = 0b1000;
break; | '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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enabl... |
The wrong part of the code is:
case 0b100:
out = 0b1000;
break;
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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#prag... |
The wrong part of the code is:
case 0b100:
out = 0b1000;
break;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
case 0b11:
out = 0b1000;
break; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4> out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTR... |
The wrong part of the code is:
bool enable, ap_uint<2> in, ap_uint<4> out
The right code snippet is:
bool enable, ap_uint<2> in, ap_uint<4>& out | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4> out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BUS... |
The right code snippet is:
bool enable, ap_uint<2> in, ap_uint<4>& out | '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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4> out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable... |
The wrong part of the code is:
bool enable, ap_uint<2> in, ap_uint<4> out
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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4> out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragm... |
The wrong part of the code is:
bool enable, ap_uint<2> in, ap_uint<4> out
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
bool enable, ap_uint<2> in, ap_uint<4>& out | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CT... |
The wrong part of the code is:
case 0b10:
out = 0b0100 << 5;
break;
The right code snippet is:
case 0b10:
out = 0b0100;
break; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU... |
The right code snippet is:
case 0b10:
out = 0b0100;
break; | '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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enabl... |
The wrong part of the code is:
case 0b10:
out = 0b0100 << 5;
break;
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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#prag... |
The wrong part of the code is:
case 0b10:
out = 0b0100 << 5;
break;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
case 0b10:
out = 0b0100;
break; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CT... |
The wrong part of the code is:
while(enable) {
The right code snippet is:
if(enable) { | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU... |
The right code snippet is:
if(enable) { | '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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enabl... |
The wrong part of the code is:
while(enable) {
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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#prag... |
The wrong part of the code is:
while(enable) {
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if(enable) { | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CT... |
The wrong part of the code is:
case 0b00:
out = (signed)0b0001;
break;
The right code snippet is:
case 0b00:
out = 0b0001;
break; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU... |
The right code snippet is:
case 0b00:
out = 0b0001;
break; | '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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enabl... |
The wrong part of the code is:
case 0b00:
out = (signed)0b0001;
break;
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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#prag... |
The wrong part of the code is:
case 0b00:
out = (signed)0b0001;
break;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
case 0b00:
out = 0b0001;
break; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CT... |
The wrong part of the code is:
for(int i=0; i<4; i++) {
switch(in) {
case 0b00:
out = 0b0001;
break;
case 0b01:
out = 0b0010;
break;
case 0b10:
out = 0b0100;
break;
case 0b11:
out = 0b1000;
... | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU... |
The right code snippet is:
None | '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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enabl... |
The wrong part of the code is:
for(int i=0; i<4; i++) {
switch(in) {
case 0b00:
out = 0b0001;
break;
case 0b01:
out = 0b0010;
break;
case 0b10:
out = 0b0100;
break;
case 0b11:
out = 0b1000;
... | '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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#prag... |
The wrong part of the code is:
for(int i=0; i<4; i++) {
switch(in) {
case 0b00:
out = 0b0001;
break;
case 0b01:
out = 0b0010;
break;
case 0b10:
out = 0b0100;
break;
case 0b11:
out = 0b1000;
... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CT... |
The wrong part of the code is:
case 0b00:
out = 0;
break;
The right code snippet is:
case 0b00:
out = 0b0001;
break; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enable bundle=CTRL_BU... |
The right code snippet is:
case 0b00:
out = 0b0001;
break; | '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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=enabl... |
The wrong part of the code is:
case 0b00:
out = 0;
break;
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:
```
void two_to_four_decoder(bool enable, ap_uint<2> in, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#prag... |
The wrong part of the code is:
case 0b00:
out = 0;
break;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
case 0b00:
out = 0b0001;
break; | 'ZERO' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.