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:
```c++
#include <ap_int.h>
#pragma HLS interface m_axi port=A1
#pragma HLS interface m_axi port=A2
#pragma HLS interface m_axi port=A3
#pragma HLS interface m_axi port=B1
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS interface m_axi port=A1
#pragma HLS interface m_axi port=A2
#pragma HLS interface m_axi port=A3
#pragma HLS interface m_axi port=B1
#pragma HLS interface m_axi port=C1
#pragma HLS interface m_axi port=Y
void signal_selector(bool A1, bool A2, bool A3, bool B1, bool C1,... | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
#pragma HLS interface m_axi port=A1
#pragma HLS interface m_axi port=A2
#pragma HLS interface m_axi port=A3
#pragma HLS interface m_axi port=B1
#pragma HLS inter... |
The right code snippet is:
void signal_selector(bool A1, bool A2, bool A3, bool B1, bool C1, bool &Y) { | '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++
#include <ap_int.h>
#pragma HLS interface m_axi port=A1
#pragma HLS interface m_axi port=A2
#pragma HLS interface m_axi port=A3
#pragma HLS interface m_axi port=B1
#... |
The wrong part of the code is:
#pragma HLS interface m_axi port=A1
#pragma HLS interface m_axi port=A2
#pragma HLS interface m_axi port=A3
#pragma HLS interface m_axi port=B1
#pragma HLS interface m_axi port=C1
#pragma HLS interface m_axi port=Y
void signal_selector(bool A1, bool A2, bool A3, bool B1, bool C1,... | '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++
#include <ap_int.h>
#pragma HLS interface m_axi port=A1
#pragma HLS interface m_axi port=A2
#pragma HLS interface m_axi port=A3
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=A1
#pragma HLS interface m_axi port=A2
#pragma HLS interface m_axi port=A3
#pragma HLS interface m_axi port=B1
#pragma HLS interface m_axi port=C1
#pragma HLS interface m_axi port=Y
void signal_selector(bool A1, bool A2, bool A3, bool B1, bool C1,... | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```c++
#include <ap_int.h>
#pragma HLS interface bram port=A1
#pragma HLS interface bram port=A
bool sel1, sel2;
sel1 = (A1 >= A2) && (A1 >= A3);
sel2 = (A2 >= A1) && (A2... |
The wrong part of the code is:
#pragma HLS interface bram port=A1
#pragma HLS interface bram port=A
The right code snippet is:
void signal_selector(bool A1, bool A2, bool A3, bool B1, bool C1, bool &Y) { | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
#include <ap_int.h>
#pragma HLS interface bram port=A1
#pragma HLS interface bram port=A
bool sel1, sel2;
sel1 = (A1 >= A2) && (A1 >= A3);
sel2 = (A2 >= A1) && (A2 >= A... |
The right code snippet is:
void signal_selector(bool A1, bool A2, bool A3, bool B1, bool C1, bool &Y) { | '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:
```c++
#include <ap_int.h>
#pragma HLS interface bram port=A1
#pragma HLS interface bram port=A
bool sel1, sel2;
sel1 = (A1 >= A2) && (A1 >= A3);
sel2 = (A2 >=... |
The wrong part of the code is:
#pragma HLS interface bram port=A1
#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:
```c++
#include <ap_int.h>
#pragma HLS interface bram port=A1
#pragma HLS interface bram port=A
bool sel1, sel2;
sel1 = (A1 >=... |
The wrong part of the code is:
#pragma HLS interface bram port=A1
#pragma HLS interface bram port=A
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
void signal_selector(bool A1, bool A2, bool A3, bool B1, bool C1, bool &Y) { | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
out.write(0b0100);
The right code snippet is:
out.write(0b1000); | '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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
out.write(0b1000); | '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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
out.write(0b0100);
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
out.write(0b0100);
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
out.write(0b1000); | '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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
ap_uint<n> state;
The right code snippet is:
ap_uint<n> state = 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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
ap_uint<n> state = 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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
ap_uint<n> state;
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
ap_uint<n> state;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<n> state = 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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
out.write(0b0001 << n);
The right code snippet is:
out.write(0b0001); | '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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
out.write(0b0001); | '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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
out.write(0b0001 << n);
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
out.write(0b0001 << n);
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
out.write(0b0001); | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
while (state < 4) {
The right code snippet is:
while (true) { | 'INF' |
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
while (true) { | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
while (state < 4) {
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
while (state < 4) {
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
while (true) { | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
out.write((signed char)0b0010);
The right code snippet is:
out.write(0b0010); | 'USE' |
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
out.write(0b0010); | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
out.write((signed char)0b0010);
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
out.write((signed char)0b0010);
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
out.write(0b0010); | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
case 2:
state = 3;
out.write(0b0100);
case 3:
state = 0;
out.write(0b1000);
break;
The right code snippet is:
case 2:
state = 3;
out.write(0b0100);
break; | 'MLU' |
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
case 2:
state = 3;
out.write(0b0100);
break; | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
case 2:
state = 3;
out.write(0b0100);
case 3:
state = 0;
out.write(0b1000);
break;
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
case 2:
state = 3;
out.write(0b0100);
case 3:
state = 0;
out.write(0b1000);
break;
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
case 2:
state = 3;
out.write(0b0100);
break; | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
ap_uint<n> state = ap_uint<n>(0);
The right code snippet is:
ap_uint<n> state = 0; | 'ZERO' |
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
ap_uint<n> state = 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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
ap_uint<n> state = ap_uint<n>(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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
ap_uint<n> state = ap_uint<n>(0);
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
ap_uint<n> state = 0; | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
out.write(0b1000);
The right code snippet is:
out.write(0b0100); | 'BUF' |
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
out.write(0b0100); | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
out.write(0b1000);
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
out.write(0b1000);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
out.write(0b0100); | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
#pragma HLS array_partition variable=state cyclic
The right code snippet is:
#pragma HLS array_partition variable=state complete | 'APT' |
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
#pragma HLS array_partition variable=state 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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS array_partition variable=state 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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
#pragma HLS array_partition variable=state cyclic
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=state 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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
#pragma HLS array_partition variable=state complete factor=2
The right code snippet is:
#pragma HLS array_partition variable=state complete | 'FND' |
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
#pragma HLS array_partition variable=state 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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS array_partition variable=state complete factor=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:
#include <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
#pragma HLS array_partition variable=state complete factor=2
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=state 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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
#pragma HLS array_partition variable=state dim=2 complete
The right code snippet is:
#pragma HLS array_partition variable=state complete | 'DID' |
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
#pragma HLS array_partition variable=state 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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS array_partition variable=state dim=2 complete
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
#pragma HLS array_partition variable=state dim=2 complete
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=state 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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=clk
#pragma HLS interface ap_fifo port=out
The right code snippet is:
#pragma HLS interface axis port=clk
#pragma HLS interface axis port=out | 'IDAP' |
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
#pragma HLS interface axis port=clk
#pragma HLS interface axis port=out | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=clk
#pragma HLS interface ap_fifo port=out
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=clk
#pragma HLS interface ap_fifo port=out
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface axis port=clk
#pragma HLS interface axis port=out | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
#pragma HLS interface m_axi port=clk
#pragma HLS interface m_axi port=out
The right code snippet is:
#pragma HLS interface axis port=clk
#pragma HLS interface axis port=out | 'RAMB' |
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
#pragma HLS interface axis port=clk
#pragma HLS interface axis port=out | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS interface m_axi port=clk
#pragma HLS interface m_axi port=out
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
#pragma HLS interface m_axi port=clk
#pragma HLS interface m_axi port=out
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface axis port=clk
#pragma HLS interface axis port=out | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
#pragma HLS interface bram port=clk
#pragma HLS interface bram port=out
The right code snippet is:
#pragma HLS interface axis port=clk
#pragma HLS interface axis port=out | 'SMA' |
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
#pragma HLS interface axis port=clk
#pragma HLS interface axis port=out | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS interface bram port=clk
#pragma HLS interface bram port=out
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
#pragma HLS interface bram port=clk
#pragma HLS interface bram port=out
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface axis port=clk
#pragma HLS interface axis port=out | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=clk
#pragma HLS interface ap_vld port=out
The right code snippet is:
#pragma HLS interface axis port=clk
#pragma HLS interface axis port=out | 'AMS' |
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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
The right code snippet is:
#pragma HLS interface axis port=clk
#pragma HLS interface axis port=out | '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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=clk
#pragma HLS interface ap_vld port=out
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=clk
#pragma HLS interface ap_vld port=out
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface axis port=clk
#pragma HLS interface axis port=out | '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>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
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:
#include <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
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:
#include <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
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:
#include <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis... |
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port... |
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS INTERFACE axis port=clk
#pragma HLS INT... |
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 <hls_math.h>
const int n = 4;
void OneHotStateMachine(hls::stream<bool> &clk, hls::stream<ap_uint<n>> &out) {
#pragma HLS IN... |
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:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma HLS INTERF... |
The wrong part of the code is:
decoder_sel = adder_out.range(18, 15);
The right code snippet is:
decoder_sel = adder_out.range(15, 12); | 'OOB': Out-of-bounds array access |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The right code snippet is:
decoder_sel = adder_out.range(15, 12); | 'OOB': Out-of-bounds array access |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma... |
The wrong part of the code is:
decoder_sel = adder_out.range(18, 15);
The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access | 'OOB': Out-of-bounds array access |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_ax... |
The wrong part of the code is:
decoder_sel = adder_out.range(18, 15);
The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access
The right code snippet is:
decoder_sel = adder_out.range(15, 12); | 'OOB': Out-of-bounds array access |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma HLS INTERF... |
The wrong part of the code is:
ap_uint<16> adder_out = 0;
The right code snippet is:
ap_uint<16> adder_out; | 'INIT': Read of uninitialized variable |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The right code snippet is:
ap_uint<16> adder_out; | 'INIT': Read of uninitialized variable |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma... |
The wrong part of the code is:
ap_uint<16> adder_out = 0;
The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable | 'INIT': Read of uninitialized variable |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_ax... |
The wrong part of the code is:
ap_uint<16> adder_out = 0;
The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable
The right code snippet is:
ap_uint<16> adder_out; | 'INIT': Read of uninitialized variable |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma HLS INTERF... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// do something
}
The right code snippet is:
for (int i = 0; i < 10; i++) {
// do something
} | 'INF': An infinite loop arising from an incorrect loop termination |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The right code snippet is:
for (int i = 0; i < 10; i++) {
// do something
} | 'INF': An infinite loop arising from an incorrect loop termination |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// do something
}
The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination | 'INF': An infinite loop arising from an incorrect loop termination |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_ax... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// do something
}
The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination
The right code snippet is:
for (int i = 0; i < 10; i++) {
// do something
} | 'INF': An infinite loop arising from an incorrect loop termination |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma HLS INTERF... |
The wrong part of the code is:
ap_int<16> Y;
The right code snippet is:
ap_uint<16> Y; | 'USE': Unintended sign extension |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The right code snippet is:
ap_uint<16> Y; | 'USE': Unintended sign extension |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma... |
The wrong part of the code is:
ap_int<16> Y;
The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension | 'USE': Unintended sign extension |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_ax... |
The wrong part of the code is:
ap_int<16> Y;
The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension
The right code snippet is:
ap_uint<16> Y; | 'USE': Unintended sign extension |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=A bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma HLS INTERF... |
The wrong part of the code is:
// multi-level pipelining
#pragma HLS pipeline II=2
void ripple_carry_adder(ap_uint<16> A, ap_uint<16> B, ap_uint<1> Cin, ap_uint<16> &Sum, ap_uint<1> &Cout) {
The right code snippet is:
// no multi-level pipelining
void ripple_carry_adder(ap_uint<16> A, ap_uint<16> B, ap... | 'MLP': Multi-level pipelining for the pragma '#pragma HLS pipeline' |
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 bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The right code snippet is:
// no multi-level pipelining
void ripple_carry_adder(ap_uint<16> A, ap_uint<16> B, ap_uint<1> Cin, ap_uint<16> &Sum, ap_uint<1> &Cout) { | 'MLP': Multi-level pipelining for the pragma '#pragma HLS pipeline' |
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 bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=EN bundle=CTRL_BUS
#pragma... |
The wrong part of the code is:
// multi-level pipelining
#pragma HLS pipeline II=2
void ripple_carry_adder(ap_uint<16> A, ap_uint<16> B, ap_uint<1> Cin, ap_uint<16> &Sum, ap_uint<1> &Cout) {
The high-level-synthesis bug type of the code is: 'MLP': Multi-level pipelining for the pragma '#pragma HLS pipeline... | 'MLP': Multi-level pipelining for the pragma '#pragma HLS pipeline' |
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 bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=B bundle=CTRL_BUS
#pragma HLS INTERFACE s_ax... |
The wrong part of the code is:
// multi-level pipelining
#pragma HLS pipeline II=2
void ripple_carry_adder(ap_uint<16> A, ap_uint<16> B, ap_uint<1> Cin, ap_uint<16> &Sum, ap_uint<1> &Cout) {
The high-level-synthesis bug type of the code is: 'MLP': Multi-level pipelining for the pragma '#pragma HLS pipeline... | 'MLP': Multi-level pipelining for the pragma '#pragma HLS pipeline' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.