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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &s... |
The wrong part of the code is:
// No suitable code snippet found
The right code snippet is:
// No suitable code snippet found | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &shifte... |
The right code snippet is:
// No suitable code snippet found | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> ... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'FND': Factor not divisible for the pragma '#pragma HLS array_partition'
The right code snippet is:
// No suitable code snippet found | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &s... |
The wrong part of the code is:
// No suitable code snippet found
The right code snippet is:
// No suitable code snippet found | 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &shifte... |
The right code snippet is:
// No suitable code snippet found | 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition' | 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> ... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition'
The right code snippet is:
// No suitable code snippet found | 'DID': Dim incorrect dimension for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &s... |
The wrong part of the code is:
// No suitable code snippet found
The right code snippet is:
// No suitable code snippet found | 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &shifte... |
The right code snippet is:
// No suitable code snippet found | 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow' | 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> ... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow'
The right code snippet is:
// No suitable code snippet found | 'DFP': Dataflow position error for the pragma '#pragma HLS dataflow' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &s... |
The wrong part of the code is:
// No suitable code snippet found
The right code snippet is:
// No suitable code snippet found | 'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &shifte... |
The right code snippet is:
// No suitable code snippet found | 'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface' | 'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> ... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface'
The right code snippet is:
// No suitable code snippet found | 'IDAP': Incorrect data access pattern for the pragma '#pragma HLS interface' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &s... |
The wrong part of the code is:
// No suitable code snippet found
The right code snippet is:
// No suitable code snippet found | 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &shifte... |
The right code snippet is:
// No suitable code snippet found | 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface' | 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> ... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface'
The right code snippet is:
// No suitable code sn... | 'RAMB': m_axi interface is accessed randomly in the code, resulting in non-burst AXI read/write for the pragma '#pragma HLS interface' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &s... |
The wrong part of the code is:
// No suitable code snippet found
The right code snippet is:
// No suitable code snippet found | 'SMA': Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &shifte... |
The right code snippet is:
// No suitable code snippet found | 'SMA': Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'SMA': Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface' | 'SMA': Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> ... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'SMA': Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface'
The right code snippet is:
// No suitable code snippet fou... | 'SMA': Scalar values mapped to array interfaces like bram/ap_memory/m_axi/ap_fifo/axis for the pragma '#pragma HLS interface' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &s... |
The wrong part of the code is:
// No suitable code snippet found
The right code snippet is:
// No suitable code snippet found | 'AMS': Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &shifte... |
The right code snippet is:
// No suitable code snippet found | 'AMS': Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'AMS': Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface' | 'AMS': Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> ... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'AMS': Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface'
The right code snippet is:
// No suitable code snippet found | 'AMS': Array value mapped to scalar interfaces like ap_none/ap_vld/s_axilite for the pragma '#pragma HLS interface' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &s... |
The wrong part of the code is:
// No suitable code snippet found
The right code snippet is:
// No suitable code snippet found | '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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &shifte... |
The right code snippet is:
// No suitable code snippet found | '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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_... |
The wrong part of the code is:
// No suitable code snippet found
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> ... |
The wrong part of the code is:
// No suitable code snippet found
The high-level-synthesis bug type of the code is: 'MLP': Multi-level pipelining for the pragma '#pragma HLS pipeline'
The right code snippet is:
// No suitable code snippet found | '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 right code snippet
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &s... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 0; i < 10; i++) {
// loop body
}
The right code snippet is:
for (int i = 0; i < 10; i++) {
// loop body
} | 'ILNU': Inner loops not fully-Unrolled for the pragma '#pragma HLS unroll' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_uint<4>> &shifte... |
The right code snippet is:
for (int i = 0; i < 10; i++) {
// loop body
} | 'ILNU': Inner loops not fully-Unrolled for the pragma '#pragma HLS unroll' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> &shift_direction,
hls::stream<ap_... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 0; i < 10; i++) {
// loop body
}
The high-level-synthesis bug type of the code is: 'ILNU': Inner loops not fully-Unrolled for the pragma '#pragma HLS unroll' | 'ILNU': Inner loops not fully-Unrolled for the pragma '#pragma HLS unroll' |
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:
// Top-level module
void top_module (
hls::stream<ap_uint<8>> &in,
hls::stream<ap_uint<2>> &shift_amount,
hls::stream<bool> ... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 0; i < 10; i++) {
// loop body
}
The high-level-synthesis bug type of the code is: 'ILNU': Inner loops not fully-Unrolled for the pragma '#pragma HLS unroll'
The right code snippet is:
for (int i = 0; i < 10; i++) {
// loop body... | 'ILNU': Inner loops not fully-Unrolled for the pragma '#pragma HLS unroll' |
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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
out = a[0] - b[0];
The right code snippet is:
out = a - b; | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
out = a - b; | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
out = a[0] - b[0];
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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
out = a[0] - b[0];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
out = a - b; | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
ap_uint<4> mux4_out = 0;
ap_uint<4> mux2_out = 0;
The right code snippet is:
ap_uint<4> mux4_out;
ap_uint<4> mux2_out; | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
ap_uint<4> mux4_out;
ap_uint<4> mux2_out; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
ap_uint<4> mux4_out = 0;
ap_uint<4> mux2_out = 0;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
ap_uint<4> mux4_out = 0;
ap_uint<4> mux2_out = 0;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<4> mux4_out;
ap_uint<4> mux2_out; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
ap_uint<4> nor3_out = ~(sel[2] & nor0_out | sel[1] & nor1_out | sel[0] & nor2_out);
The right code snippet is:
ap_uint<4> nor3_out = ~(sel[1] & nor0_out | sel[1] & nor1_out | sel[0] & nor2_out); | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
ap_uint<4> nor3_out = ~(sel[1] & nor0_out | sel[1] & nor1_out | sel[0] & nor2_out); | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
ap_uint<4> nor3_out = ~(sel[2] & nor0_out | sel[1] & nor1_out | sel[0] & nor2_out);
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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
ap_uint<4> nor3_out = ~(sel[2] & nor0_out | sel[1] & nor1_out | sel[0] & nor2_out);
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
ap_uint<4> nor3_out = ~(sel[1] & nor0_out | sel[1] & nor1_out | sel[0] & nor2_out); | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
while(true) {
out = 0;
}
The right code snippet is:
switch(sel) {
case 0: out = 0; break;
case 1: out = nor0_out; break;
case 2: out = nor1_out; break;
case 3: out = nor3_out; break;
} | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
switch(sel) {
case 0: out = 0; break;
case 1: out = nor0_out; break;
case 2: out = nor1_out; break;
case 3: out = nor3_out; break;
} | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
while(true) {
out = 0;
}
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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
while(true) {
out = 0;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
switch(sel) {
case 0: out = 0; break;
case 1: out = nor0_out; break;
case 2: out = nor1_out; break;
case 3: out = nor3_out; break;
} | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
ap_int<4> nor3_out = ~(sel[1] & nor0_out | sel[1] & nor1_out | sel[0] & nor2_out);
The right code snippet is:
ap_uint<4> nor3_out = ~(sel[1] & nor0_out | sel[1] & nor1_out | sel[0] & nor2_out); | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
ap_uint<4> nor3_out = ~(sel[1] & nor0_out | sel[1] & nor1_out | sel[0] & nor2_out); | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
ap_int<4> nor3_out = ~(sel[1] & nor0_out | sel[1] & nor1_out | sel[0] & nor2_out);
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
ap_int<4> nor3_out = ~(sel[1] & nor0_out | sel[1] & nor1_out | sel[0] & nor2_out);
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_uint<4> nor3_out = ~(sel[1] & nor0_out | sel[1] & nor1_out | sel[0] & nor2_out); | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
nor_2to1_mux(data4, data4, sel2, mux2_out);
The right code snippet is:
nor_2to1_mux(data4, data5, sel2, mux2_out); | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
nor_2to1_mux(data4, data5, sel2, mux2_out); | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
nor_2to1_mux(data4, data4, sel2, mux2_out);
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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
nor_2to1_mux(data4, data4, sel2, mux2_out);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
nor_2to1_mux(data4, data5, sel2, mux2_out); | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data0 cyclic dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data0 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:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data0 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:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data0 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:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data0 cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data0 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:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data0 complete factor=2 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data0 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:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data0 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:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data0 complete factor=2 dim=1
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data0 complete factor=2 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data0 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:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data0 complete dim=2
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data0 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:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data0 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:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data0 complete dim=2
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=data0 complete dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=data0 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:
```
#include <ap_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS DATAFLOW off
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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS DATAFLOW off
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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
#pragma HLS DATAFLOW off
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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=data0
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data0 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data0 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=data0
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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=data0
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data0 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=50 port=data0 offset=1024
The right code snippet is:
#pragma HLS INTERFACE m_axi depth=50 port=data0 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
#pragma HLS INTERFACE m_axi depth=50 port=data0 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=50 port=data0 offset=1024
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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi depth=50 port=data0 offset=1024
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS INTERFACE m_axi depth=50 port=data0 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=data0
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data0 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data0 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=data0
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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=data0
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data0 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=data0
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data0 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data0 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=data0
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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_fifo port=data0
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=data0 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
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_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
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_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
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_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
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_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_... |
The wrong part of the code is:
#pragma HLS UNROLL inner_loop full_factor=2
The right code snippet is:
#pragma HLS UNROLL factor=2 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFACE ap_ctrl_none ... |
The right code snippet is:
#pragma HLS UNROLL factor=2 | '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 nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_uint<4>& out) {
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS UNROLL inner_loop full_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_int.h>
void nor_4to1_mux(ap_uint<4> data0, ap_uint<4> data1, ap_uint<4> data2, ap_uint<4> data3, ap_uint<2> sel, ap_ui... |
The wrong part of the code is:
#pragma HLS UNROLL inner_loop full_factor=2
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
#pragma HLS UNROLL factor=2 | 'ILNU' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.