instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
full_adder(a[0], b[4], cin, sum_wire[0], c1);
The right code snippet is:
full_adder(a[0], b[0], cin, sum_wire[0], c1); | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=co... |
The right code snippet is:
full_adder(a[0], b[0], cin, sum_wire[0], c1); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE... |
The wrong part of the code is:
full_adder(a[0], b[4], cin, sum_wire[0], c1);
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE a... |
The wrong part of the code is:
full_adder(a[0], b[4], cin, sum_wire[0], c1);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
full_adder(a[0], b[0], cin, sum_wire[0], c1); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=sum cyclic dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=sum 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_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=co... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=sum 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_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=sum cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=sum cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=sum complete dim=1 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=sum complete dim=2
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=sum 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_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=co... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=sum 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_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=sum complete dim=2
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=sum complete dim=2
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=sum complete dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=sum cyclic dim=1 factor=2
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=sum 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_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=co... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=sum 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_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=sum cyclic dim=1 factor=2
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=sum cyclic dim=1 factor=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=sum complete dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
#pragma HLS dataflow
void adder(int a[4], int b[4], int& cin, int sum[4], int& cout) {
The right code snippet is:
void adder(int a[4], int b[4], int& cin, int sum[4], int& cout) { | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=co... |
The right code snippet is:
void adder(int a[4], int b[4], int& cin, int sum[4], int& cout) { | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS dataflow
void adder(int a[4], int b[4], int& cin, int sum[4], int& cout) {
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS dataflow
void adder(int a[4], int b[4], int& cin, int sum[4], int& cout) {
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
void adder(int a[4], int b[4], int& cin, int sum[4], int& cout) { | '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_fifo port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=a
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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_fifo port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=co... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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_fifo port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=a
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_fifo port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=a
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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 m_axi port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=a
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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 m_axi port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=cout... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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 m_axi port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=a
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 m_axi port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=a
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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 bram port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=a
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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 bram port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=cout
... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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 bram port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=a
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 bram port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=a
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=a
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | '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=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=a
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=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=a
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=a | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none po... |
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_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=co... |
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_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP' | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=cin
#pragma HLS INTERFACE a... |
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_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none po... |
The wrong part of the code is:
sum[i] = sum_wire[i];
The right code snippet is:
#pragma HLS UNROLL
sum[i] = sum_wire[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_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE ap_none port=co... |
The right code snippet is:
#pragma HLS UNROLL
sum[i] = sum_wire[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_none port=cin
#pragma HLS INTERFACE ap_none port=sum
#pragma HLS INTERFACE... |
The wrong part of the code is:
sum[i] = sum_wire[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_none port=cin
#pragma HLS INTERFACE a... |
The wrong part of the code is:
sum[i] = sum_wire[i];
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
#pragma HLS UNROLL
sum[i] = sum_wire[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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axi... |
The wrong part of the code is:
bool gated_clk = CLK[-1] & EN[1];
The right code snippet is:
bool gated_clk = CLK & EN; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis por... |
The right code snippet is:
bool gated_clk = CLK & EN; | '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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS IN... |
The wrong part of the code is:
bool gated_clk = CLK[-1] & EN[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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
bool gated_clk = CLK[-1] & EN[1];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
bool gated_clk = CLK & EN; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axi... |
The wrong part of the code is:
bool gated_clk;
The right code snippet is:
bool gated_clk = CLK & EN; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis por... |
The right code snippet is:
bool gated_clk = CLK & EN; | '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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS IN... |
The wrong part of the code is:
bool gated_clk;
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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
bool gated_clk;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
bool gated_clk = CLK & EN; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axi... |
The wrong part of the code is:
Q_N = D >> 2;
The right code snippet is:
Q_N = ~D; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis por... |
The right code snippet is:
Q_N = ~D; | '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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS IN... |
The wrong part of the code is:
Q_N = D >> 2;
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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
Q_N = D >> 2;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
Q_N = ~D; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axi... |
The wrong part of the code is:
while(true) {
Q = D;
Q_N = ~D;
}
The right code snippet is:
if (gated_clk) {
Q = D;
Q_N = ~D;
} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis por... |
The right code snippet is:
if (gated_clk) {
Q = D;
Q_N = ~D;
} | '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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS IN... |
The wrong part of the code is:
while(true) {
Q = D;
Q_N = ~D;
}
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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
while(true) {
Q = D;
Q_N = ~D;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (gated_clk) {
Q = D;
Q_N = ~D;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axi... |
The wrong part of the code is:
Q = (int8_t)D;
The right code snippet is:
Q = D; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis por... |
The right code snippet is:
Q = D; | '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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS IN... |
The wrong part of the code is:
Q = (int8_t)D;
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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
Q = (int8_t)D;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
Q = D; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axi... |
The wrong part of the code is:
if (gated_clk) {
Q = D;
Q_N = ~D;
Q = D;
Q_N = ~D;
}
The right code snippet is:
if (gated_clk) {
Q = D;
Q_N = ~D;
} | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis por... |
The right code snippet is:
if (gated_clk) {
Q = D;
Q_N = ~D;
} | '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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS IN... |
The wrong part of the code is:
if (gated_clk) {
Q = D;
Q_N = ~D;
Q = D;
Q_N = ~D;
}
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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
if (gated_clk) {
Q = D;
Q_N = ~D;
Q = D;
Q_N = ~D;
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
if (gated_clk) {
Q = D;
Q_N = ~D;
} | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axi... |
The wrong part of the code is:
bool gated_clk = 0;
The right code snippet is:
bool gated_clk = CLK & EN; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis por... |
The right code snippet is:
bool gated_clk = CLK & EN; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS IN... |
The wrong part of the code is:
bool gated_clk = 0;
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
bool gated_clk = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
bool gated_clk = CLK & EN; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axi... |
The wrong part of the code is:
Q = D[1];
The right code snippet is:
Q = D; | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis por... |
The right code snippet is:
Q = D; | '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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS IN... |
The wrong part of the code is:
Q = D[1];
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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
Q = D[1];
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
Q = D; | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axi... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=Q cyclic dim=0
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=Q complete dim=0 | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis por... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=Q complete dim=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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS IN... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=Q cyclic dim=0
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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=Q cyclic dim=0
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=Q complete dim=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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axi... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=Q complete factor=3 dim=0
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=Q 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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis por... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=Q 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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS IN... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=Q complete factor=3 dim=0
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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=Q complete factor=3 dim=0
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=Q 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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axi... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=Q complete dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=Q 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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis por... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=Q 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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS IN... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=Q complete dim=1
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=Q complete dim=1
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=Q 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:
```c++
#pragma HLS DATAFLOW
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pra... |
The wrong part of the code is:
#pragma HLS DATAFLOW
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
The right code snippet is:
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) { | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#pragma HLS DATAFLOW
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma H... |
The right code snippet is:
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) { | '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:
```c++
#pragma HLS DATAFLOW
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis ... |
The wrong part of the code is:
#pragma HLS DATAFLOW
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
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:
```c++
#pragma HLS DATAFLOW
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none po... |
The wrong part of the code is:
#pragma HLS DATAFLOW
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) { | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=D
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=D
#pragma HLS INTERFACE ap_vld port=CLK
#pragma HLS INTERFACE ap_vld port=EN
#pragma HLS INTERFACE ap_vld port=Q
#pragma HLS INTERFACE ap_vld port=Q_N
The right code snippet is:
#pragma HLS I... | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=D
#pragma HLS INTERFACE ap_vld... |
The right code snippet is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis port=CLK
#pragma HLS INTERFACE axis port=EN
#pragma HLS INTERFACE axis port=Q
#pragma HLS INTERFACE axis port=Q_N | '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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=D
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=D
#pragma HLS INTERFACE ap_vld port=CLK
#pragma HLS INTERFACE ap_vld port=EN
#pragma HLS INTERFACE ap_vld port=Q
#pragma HLS INTERFACE ap_vld port=Q_N
The high-level-synthesis bug type of the cod... | '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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_vld port=D
#pragma HLS INTERFACE ap_vld port=CLK
#pragma HLS INTERFACE ap_vld port=EN
#pragma HLS INTERFACE ap_vld port=Q
#pragma HLS INTERFACE ap_vld port=Q_N
The high-level-synthesis bug type of the cod... | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE m_axi port=D
#pragma HLS INTERFACE m_... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE m_axi port=D
#pragma HLS INTERFACE m_axi port=CLK
#pragma HLS INTERFACE m_axi port=EN
#pragma HLS INTERFACE m_axi port=Q
#pragma HLS INTERFACE m_axi port=Q_N
The right code snippet is:
#pragma HLS INTERF... | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE m_axi port=D
#pragma HLS INTERFACE m_axi p... |
The right code snippet is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=D
#pragma HLS INTERFACE axis port=CLK
#pragma HLS INTERFACE axis port=EN
#pragma HLS INTERFACE axis port=Q
#pragma HLS INTERFACE axis port=Q_N | '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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE m_axi port=D
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE m_axi port=D
#pragma HLS INTERFACE m_axi port=CLK
#pragma HLS INTERFACE m_axi port=EN
#pragma HLS INTERFACE m_axi port=Q
#pragma HLS INTERFACE m_axi port=Q_N
The high-level-synthesis bug type of the code is:... | '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:
```c++
void d_ff_gated_clock(bool D, bool CLK, bool EN, bool &Q, bool &Q_N) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE m_axi port=D
#pragma HLS INTERFACE m_axi port=CLK
#pragma HLS INTERFACE m_axi port=EN
#pragma HLS INTERFACE m_axi port=Q
#pragma HLS INTERFACE m_axi port=Q_N
The high-level-synthesis bug type of the code is:... | 'RAMB' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.