instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS DATAFLOW II=2
The right code snippet is:
#pragma HLS DATAFLOW | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFACE axi... |
The right code snippet is:
#pragma HLS DATAFLOW | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma H... |
The wrong part of the code is:
#pragma HLS DATAFLOW II=2
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_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<... |
The wrong part of the code is:
#pragma HLS DATAFLOW II=2
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:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=inStream
The right code snippet is:
#pragma HLS INTERFACE axis port=inStream | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFACE s_a... |
The right code snippet is:
#pragma HLS INTERFACE axis port=inStream | '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_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma H... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=inStream
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_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=inStream
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS INTERFACE axis port=inStream | '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_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=mem randomize_on_start
The right code snippet is:
#pragma HLS INTERFACE m_axi port=mem | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFACE axi... |
The right code snippet is:
#pragma HLS INTERFACE m_axi port=mem | '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_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma H... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=mem randomize_on_start
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_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=mem randomize_on_start
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS INTERFACE m_axi port=mem | '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_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=inStream
The right code snippet is:
#pragma HLS INTERFACE axis port=inStream | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFACE bra... |
The right code snippet is:
#pragma HLS INTERFACE axis port=inStream | '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_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma H... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=inStream
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_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=inStream
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS INTERFACE axis port=inStream | '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_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFAC... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=inStream
The right code snippet is:
#pragma HLS INTERFACE bram port=inStream | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFACE axi... |
The right code snippet is:
#pragma HLS INTERFACE bram port=inStream | '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_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma H... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=inStream
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_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=inStream
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE bram port=inStream | '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 <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFAC... |
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:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFACE axi... |
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:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma H... |
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:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<... |
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:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFAC... |
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:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma HLS INTERFACE axi... |
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:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<intSdCh> &outStream
) {
#pragma H... |
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:
```
#include <ap_axi_sdata.h>
typedef ap_axis<32,2,5,6> intSdCh;
void top_module(
hls::stream<intSdCh> &inStream,
hls::stream<... |
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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
static ap_uint<8> ff1_q;
The right code snippet is:
static ap_uint<8> ff1_q = 0x34; | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
static ap_uint<8> ff1_q = 0x34; | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
static ap_uint<8> ff1_q;
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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
static ap_uint<8> ff1_q;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static ap_uint<8> ff1_q = 0x34; | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
while(1) {
The right code snippet is:
if (reset) { | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
if (reset) { | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
while(1) {
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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
while(1) {
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (reset) { | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
#pragma HLS pipeline II=2
if (select) {
The right code snippet is:
if (select) { | 'MLP' |
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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
if (select) { | '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:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS pipeline II=2
if (select) {
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:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
#pragma HLS pipeline II=2
if (select) {
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
if (select) { | 'MLP' |
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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
#pragma HLS unroll factor=2
if (select) {
The right code snippet is:
if (select) { | 'ILNU' |
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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
if (select) { | '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:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS unroll factor=2
if (select) {
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:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
#pragma HLS unroll factor=2
if (select) {
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
if (select) { | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=q bundle=CTRL_BUS
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=q bundle=CTRL_BUS | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=q bundle=CTRL_BUS | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=q bundle=CTRL_BUS
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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_none port=q bundle=CTRL_BUS
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=q bundle=CTRL_BUS | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
ff1_q = d1 << 10;
The right code snippet is:
ff1_q = d1; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
ff1_q = d1; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
ff1_q = d1 << 10;
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
ff1_q = d1 << 10;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
ff1_q = d1; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
#pragma HLS array_partition variable=ff1_q cyclic
The right code snippet is:
#pragma HLS array_partition variable=ff1_q complete | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
#pragma HLS array_partition variable=ff1_q complete | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS array_partition variable=ff1_q cyclic
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
#pragma HLS array_partition variable=ff1_q cyclic
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=ff1_q complete | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
ff1_q = d2;
The right code snippet is:
ff1_q = d1; | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
ff1_q = d1; | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
ff1_q = d2;
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
ff1_q = d2;
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
ff1_q = d1; | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
ff1_q = d1[10];
The right code snippet is:
ff1_q = d1; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
ff1_q = d1; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
ff1_q = d1[10];
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
ff1_q = d1[10];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
ff1_q = d1; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
static ap_uint<8> ff1_q = 0;
The right code snippet is:
static ap_uint<8> ff1_q = 0x34; | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
static ap_uint<8> ff1_q = 0x34; | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
static ap_uint<8> ff1_q = 0;
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
static ap_uint<8> ff1_q = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static ap_uint<8> ff1_q = 0x34; | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=q bundle=CTRL_BUS
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=q bundle=CTRL_BUS | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=q bundle=CTRL_BUS | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=q bundle=CTRL_BUS
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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_memory port=q bundle=CTRL_BUS
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=q bundle=CTRL_BUS | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
#pragma HLS array_partition variable=ff1_q factor=3
The right code snippet is:
#pragma HLS array_partition variable=ff1_q complete | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
#pragma HLS array_partition variable=ff1_q complete | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS array_partition variable=ff1_q 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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
#pragma HLS array_partition variable=ff1_q factor=3
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=ff1_q complete | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
#pragma HLS dataflow wait
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS dataflow wait
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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
#pragma HLS dataflow wait
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:
#include <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
#pragma HLS array_partition variable=ff1_q dim=2
The right code snippet is:
#pragma HLS array_partition variable=ff1_q complete | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
#pragma HLS array_partition variable=ff1_q complete | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS array_partition variable=ff1_q 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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
#pragma HLS array_partition variable=ff1_q dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=ff1_q complete | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=q bundle=CTRL_BUS
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=q bundle=CTRL_BUS | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=q bundle=CTRL_BUS | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=q bundle=CTRL_BUS
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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=q bundle=CTRL_BUS
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=q bundle=CTRL_BUS | '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 <ap_int.h>
void dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=q offset=slave
The right code snippet is:
#pragma HLS INTERFACE m_axi port=q | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The right code snippet is:
#pragma HLS INTERFACE m_axi port=q | '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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=q 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 dual_ff(ap_uint<1> clk, ap_uint<8> d1, ap_uint<8> d2, ap_uint<1> reset, ap_uint<1> select, ap_uint<8> &q) {
... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=q offset=slave
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS INTERFACE m_axi port=q | '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 binary_adder(ap_uint<4> A, ap_uint<4> B, ap_uint<4>& S) {
ap_uint<5> temp_sum;
Bug_type:
OOB //sum of A and B
if(temp_sum > 15) //truncate if sum i... |
The wrong part of the code is:
ap_uint<5> temp_sum;
Bug_type:
OOB
The right code snippet is:
ap_uint<5> temp_sum = A + B; | 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 binary_adder(ap_uint<4> A, ap_uint<4> B, ap_uint<4>& S) {
ap_uint<5> temp_sum;
Bug_type:
OOB //sum of A and B
if(temp_sum > 15) //truncate if sum is gre... |
The right code snippet is:
ap_uint<5> temp_sum = A + B; | 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 binary_adder(ap_uint<4> A, ap_uint<4> B, ap_uint<4>& S) {
ap_uint<5> temp_sum;
Bug_type:
OOB //sum of A and B
if(temp_sum > 15) //trunca... |
The wrong part of the code is:
ap_uint<5> temp_sum;
Bug_type:
OOB
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 binary_adder(ap_uint<4> A, ap_uint<4> B, ap_uint<4>& S) {
ap_uint<5> temp_sum;
Bug_type:
OOB //sum of A ... |
The wrong part of the code is:
ap_uint<5> temp_sum;
Bug_type:
OOB
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
ap_uint<5> temp_sum = A + B; | 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_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLat... |
The wrong part of the code is:
DeltaB = (SigmaLatch[10], SigmaLatch[10]) << 8;
The right code snippet is:
DeltaB = (SigmaLatch[9], SigmaLatch[9]) << 8; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<10> SigmaLatch = ... |
The right code snippet is:
DeltaB = (SigmaLatch[9], SigmaLatch[9]) << 8; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<10> SigmaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
DeltaB = (SigmaLatch[10], SigmaLatch[10]) << 8;
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_fixed.h>
void ds8dac1(ap_uint<8> DACin, bool clk, bool &DACout) {
static ap_uint<10> DeltaAdder = 0;
static ap_uint<1... |
The wrong part of the code is:
DeltaB = (SigmaLatch[10], SigmaLatch[10]) << 8;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
DeltaB = (SigmaLatch[9], SigmaLatch[9]) << 8; | 'OOB' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.