instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#prag... |
The wrong part of the code is:
#pragma HLS array_partition variable=clock_state complete dim=1
The right code snippet is:
#pragma HLS array_partition variable=clock_state complete dim=0 | '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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#pragma HL... |
The right code snippet is:
#pragma HLS array_partition variable=clock_state complete dim=0 | '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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTR... |
The wrong part of the code is:
#pragma HLS array_partition variable=clock_state complete 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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS array_partition variable=clock_state complete dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=clock_state complete dim=0 | '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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#prag... |
The wrong part of the code is:
#pragma HLS array_partition variable=clock_state complete dim=2
The right code snippet is:
#pragma HLS array_partition variable=clock_state complete dim=0 | '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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#pragma HL... |
The right code snippet is:
#pragma HLS array_partition variable=clock_state complete dim=0 | '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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTR... |
The wrong part of the code is:
#pragma HLS array_partition variable=clock_state complete 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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS array_partition variable=clock_state complete dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=clock_state complete dim=0 | '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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#prag... |
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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#pragma HL... |
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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTR... |
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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFAC... |
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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#prag... |
The wrong part of the code is:
#pragma HLS interface ap_none port=return
The right code snippet is:
#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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#pragma HL... |
The right code snippet is:
#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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTR... |
The wrong part of the code is:
#pragma HLS interface ap_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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS interface ap_none port=return
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#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 right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#prag... |
The wrong part of the code is:
#pragma HLS interface m_axi port=buffer depth=512 offset=slave
The right code snippet is:
#pragma HLS interface m_axi port=buffer depth=1024 offset=slave | '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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#pragma HL... |
The right code snippet is:
#pragma HLS interface m_axi port=buffer depth=1024 offset=slave | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTR... |
The wrong part of the code is:
#pragma HLS interface m_axi port=buffer depth=512 offset=slave
The high-level-synthesis bug type of the code is: 'RAMB' | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS interface m_axi port=buffer depth=512 offset=slave
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi port=buffer depth=1024 offset=slave | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#prag... |
The wrong part of the code is:
#pragma HLS interface bram port=clock_state
The right code snippet is:
#pragma HLS interface ap_memory port=clock_state | '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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#pragma HL... |
The right code snippet is:
#pragma HLS interface ap_memory port=clock_state | '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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTR... |
The wrong part of the code is:
#pragma HLS interface bram port=clock_state
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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS interface bram port=clock_state
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface ap_memory port=clock_state | '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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#prag... |
The wrong part of the code is:
#pragma HLS interface ap_none port=clock_state
The right code snippet is:
#pragma HLS interface ap_memory port=clock_state | '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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#pragma HL... |
The right code snippet is:
#pragma HLS interface ap_memory port=clock_state | '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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTR... |
The wrong part of the code is:
#pragma HLS interface ap_none port=clock_state
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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS interface ap_none port=clock_state
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface ap_memory port=clock_state | '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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#prag... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#pragma HL... |
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTR... |
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 s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
#pragma HLS pipeline II=1 | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#prag... |
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:
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTRL_BUS
#pragma HL... |
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:
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=set_hours bundle=CTR... |
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:
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=reset bundle=CTRL_BUS
#pragma HLS INTERFAC... |
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:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
ap_uint<1> uninitialized_var;
if (TE) {
ENCLK = uninitialized_var;
} else if (EN) {
ENCLK = uninitialized_var;
} else {
ENCLK = 0;
}
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The wrong part of the code is:
ap_uint<1> uninitialized_var;
if (TE) {
ENCLK = uninitialized_var;
} else if (EN) {
ENCLK = uninitialized_var;
} else {
ENCLK = 0;
}
The high-level-synthesis bug type of the code is: INIT | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
ap_uint<1> uninitialized_var;
if (TE) {
ENCLK = uninitialized_var;
} else if (EN) {
ENCLK = uninitialized_var;
} else {
ENCLK = 0;
}
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENC... | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
while(1) {
ENCLK = CLK;
}
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | INF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The wrong part of the code is:
while(1) {
ENCLK = CLK;
}
The high-level-synthesis bug type of the code is: INF | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
while(1) {
ENCLK = CLK;
}
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
ap_int<1> signed_var = -1;
if (TE) {
ENCLK = signed_var;
} else if (EN) {
ENCLK = signed_var;
} else {
ENCLK = 0;
}
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 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 clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 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 clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The wrong part of the code is:
ap_int<1> signed_var = -1;
if (TE) {
ENCLK = signed_var;
} else if (EN) {
ENCLK = signed_var;
} else {
ENCLK = 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 clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
ap_int<1> signed_var = -1;
if (TE) {
ENCLK = signed_var;
} else if (EN) {
ENCLK = signed_var;
} else {
ENCLK = 0;
}
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {... | 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 clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
for (int i = 0; i < 2; i++) {
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
}
}
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | 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 clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | 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 clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The wrong part of the code is:
for (int i = 0; i < 2; i++) {
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
}
}
The high-level-synthesis bug type of the code is: MLU | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
for (int i = 0; i < 2; i++) {
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
}
}
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} e... | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
ap_uint<1> zero_var = 0;
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = zero_var;
}
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | ZERO |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | ZERO |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The wrong part of the code is:
ap_uint<1> zero_var = 0;
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = zero_var;
}
The high-level-synthesis bug type of the code is: ZERO | ZERO |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
ap_uint<1> zero_var = 0;
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = zero_var;
}
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK... | ZERO |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS array_partition variable=ENCLK cyclic factor=2
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | APT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS array_partition variable=ENCLK cyclic factor=2
The high-level-synthesis bug type of the code is: APT | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS array_partition variable=ENCLK cyclic factor=2
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS array_partition variable=ENCLK cyclic factor=3
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | FND |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS array_partition variable=ENCLK 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:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS array_partition variable=ENCLK cyclic factor=3
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS array_partition variable=ENCLK complete dim=2
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | DID |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS array_partition variable=ENCLK complete dim=2
The high-level-synthesis bug type of the code is: DID | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS array_partition variable=ENCLK complete dim=2
The high-level-synthesis bug type of the code is: DID
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS dataflow
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | DFP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: DFP | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: DFP
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS interface ap_fifo depth=1
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | IDAP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS interface ap_fifo depth=1
The high-level-synthesis bug type of the code is: IDAP | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS interface ap_fifo depth=1
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS interface m_axi port=ENCLK offset=slave
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | RAMB |
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 clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS interface m_axi port=ENCLK offset=slave
The high-level-synthesis bug type of the code is: RAMB | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS interface m_axi port=ENCLK offset=slave
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS interface bram port=ENCLK
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | SMA |
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 clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS interface bram port=ENCLK
The high-level-synthesis bug type of the code is: SMA | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS interface bram port=ENCLK
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS interface ap_none port=ENCLK
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | AMS |
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 clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | AMS |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS interface ap_none port=ENCLK
The high-level-synthesis bug type of the code is: AMS | AMS |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void clock_gating(ap_uint<1> CLK, ap_uint<1> EN, ap_uint<1> TE, ap_uint<1> &ENCLK) {
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS interface ap_none port=ENCLK
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
if (TE) {
ENCLK = CLK;
} else if (EN) {
ENCLK = CLK;
} else {
ENCLK = 0;
} | AMS |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
count_reg1 = count_reg2 - 1;
The right code snippet is:
count_reg1 = count_reg2 + 1; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_math.h>
void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=clk
... |
The right code snippet is:
count_reg1 = count_reg2 + 1; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_math.h>
void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
count_reg1 = count_reg2 - 1;
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) {
#pragma HLS INTERFACE ap_ctrl_none... |
The wrong part of the code is:
count_reg1 = count_reg2 - 1;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
count_reg1 = count_reg2 + 1; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
static ap_uint<8> count_reg1;
The right code snippet is:
static ap_uint<8> count_reg1 = 0; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_math.h>
void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=clk
... |
The right code snippet is:
static ap_uint<8> count_reg1 = 0; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_math.h>
void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
static ap_uint<8> count_reg1;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) {
#pragma HLS INTERFACE ap_ctrl_none... |
The wrong part of the code is:
static ap_uint<8> count_reg1;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static ap_uint<8> count_reg1 = 0; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port... |
The wrong part of the code is:
count_reg1 = count_reg2 << 10;
The right code snippet is:
count_reg1 = count_reg2 << 1; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_math.h>
void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=clk
... |
The right code snippet is:
count_reg1 = count_reg2 << 1; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_math.h>
void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFAC... |
The wrong part of the code is:
count_reg1 = count_reg2 << 10;
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void counter_8bit (bool clk, bool reset, bool enable, ap_uint<8>& count) {
#pragma HLS INTERFACE ap_ctrl_none... |
The wrong part of the code is:
count_reg1 = count_reg2 << 10;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
count_reg1 = count_reg2 << 1; | 'SHFT' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.