instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) {
static ap_uint<8> res = 0;
static bool val = fals... |
The wrong part of the code is:
#pragma HLS array_partition variable=res complete dim=1
The right code snippet is:
#pragma HLS array_partition variable=res complete dim=0 | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) {
static ap_uint<8> res = 0;
static bool val = false;
... |
The right code snippet is:
#pragma HLS array_partition variable=res complete dim=0 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) {
static ap_uint<8> res = 0;
static bool... |
The wrong part of the code is:
#pragma HLS array_partition variable=res complete dim=1
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) {
stati... |
The wrong part of the code is:
#pragma HLS array_partition variable=res complete dim=1
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=res complete dim=0 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
#pragma HLS dataflow
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) {
static ap_uint<8> res = 0;
s... |
The wrong part of the code is:
#pragma HLS dataflow
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) {
The right code snippet is:
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { | '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>
#pragma HLS dataflow
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) {
static ap_uint<8> res = 0;
static... |
The right code snippet is:
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { | '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>
#pragma HLS dataflow
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) {
static ap_uint<8> res... |
The wrong part of the code is:
#pragma HLS dataflow
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) {
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>
#pragma HLS dataflow
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, boo... |
The wrong part of the code is:
#pragma HLS dataflow
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) {
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b,... | '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>
#pragma HLS interface ap_none port=op
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_none port=reset
#pragma HL... |
The wrong part of the code is:
#pragma HLS interface ap_none port=op
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_none port=reset
#pragma HLS interface ap_none port=result
#pragma HLS interface ap_none port=valid
void calculator(ap_uint<1> op, ap_uint<8> a,... | '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>
#pragma HLS interface ap_none port=op
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_none port=reset
#pragma HLS int... |
The right code snippet is:
void calculator(ap_uint<1> op, ap_uint<8> a, ap_uint<8> b, bool reset, ap_uint<8>& result, bool& valid) { | '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>
#pragma HLS interface ap_none port=op
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_none port=reset... |
The wrong part of the code is:
#pragma HLS interface ap_none port=op
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_none port=reset
#pragma HLS interface ap_none port=result
#pragma HLS interface ap_none port=valid
void calculator(ap_uint<1> op, ap_uint<8> a,... | '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>
#pragma HLS interface ap_none port=op
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pr... |
The wrong part of the code is:
#pragma HLS interface ap_none port=op
#pragma HLS interface ap_none port=a
#pragma HLS interface ap_none port=b
#pragma HLS interface ap_none port=reset
#pragma HLS interface ap_none port=result
#pragma HLS interface ap_none port=valid
void calculator(ap_uint<1> op, ap_uint<8> a,... | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
out1 = in & 0xFFF;
out2 = in >> 9;
The right code snippet is:
out1 = in & 0xFF;
out2 = in >> 8; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
out1 = in & 0xFF;
out2 = in >> 8; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
out1 = in & 0xFFF;
out2 = in >> 9;
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
out1 = in & 0xFFF;
out2 = in >> 9;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
out1 = in & 0xFF;
out2 = in >> 8; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
static int out1_reg1, out2_reg1, pos1_reg1, pos2_reg1;
static int out1_reg2, out2_reg2, pos1_reg2, pos2_reg2 = 0;
The right code snippet is:
static int out1_reg1, out2_reg1, pos1_reg1, pos2_reg1;
static int out1_reg2, out2_reg2, pos1_reg2, pos2_reg2; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
static int out1_reg1, out2_reg1, pos1_reg1, pos2_reg1;
static int out1_reg2, out2_reg2, pos1_reg2, pos2_reg2; | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
static int out1_reg1, out2_reg1, pos1_reg1, pos2_reg1;
static int out1_reg2, out2_reg2, pos1_reg2, pos2_reg2 = 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
static int out1_reg1, out2_reg1, pos1_reg1, pos2_reg1;
static int out1_reg2, out2_reg2, pos1_reg2, pos2_reg2 = 0;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static int out1_reg1, out2_reg1, pos1_reg1, pos2_reg1;
static int out1... | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
out1 = in & 0xFF;
out2 = in >> 16;
The right code snippet is:
out1 = in & 0xFF;
out2 = in >> 8; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
out1 = in & 0xFF;
out2 = in >> 8; | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
out1 = in & 0xFF;
out2 = in >> 16;
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
out1 = in & 0xFF;
out2 = in >> 16;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
out1 = in & 0xFF;
out2 = in >> 8; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
for(int i = 0; i >= 0; i++) {
// some code here
}
The right code snippet is:
for(int i = 0; i < 10; i++) {
// some code here
} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
for(int i = 0; i < 10; i++) {
// some code here
} | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
for(int i = 0; i >= 0; i++) {
// some code here
}
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
for(int i = 0; i >= 0; i++) {
// some code here
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
for(int i = 0; i < 10; i++) {
// some code here
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
int8_t a = 0xFF;
int16_t b = (int16_t)a;
The right code snippet is:
int8_t a = 0xFF;
int16_t b = a; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
int8_t a = 0xFF;
int16_t b = a; | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
int8_t a = 0xFF;
int16_t b = (int16_t)a;
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
int8_t a = 0xFF;
int16_t b = (int16_t)a;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
int8_t a = 0xFF;
int16_t b = a; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
for(int i = 0; i < 7; i++) {
// some code here
}
The right code snippet is:
for(int i = 0; i < 8; i++) {
// some code here
} | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
for(int i = 0; i < 8; i++) {
// some code here
} | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
for(int i = 0; i < 7; i++) {
// some code here
}
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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
for(int i = 0; i < 7; i++) {
// some code here
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for(int i = 0; i < 8; i++) {
// some code here
} | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
int a = 0;
The right code snippet is:
int a = 1; | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
int a = 1; | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
int a = 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
int a = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
int a = 1; | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
memcpy(buffer1, buffer2 + sizeof(buffer1), sizeof(buffer1));
The right code snippet is:
memcpy(buffer1, buffer2, sizeof(buffer1)); | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
memcpy(buffer1, buffer2, sizeof(buffer1)); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
memcpy(buffer1, buffer2 + sizeof(buffer1), sizeof(buffer1));
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
memcpy(buffer1, buffer2 + sizeof(buffer1), sizeof(buffer1));
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
memcpy(buffer1, buffer2, sizeof(buffer1)); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer1 cyclic dim=1
The right code snippet is:
#pragma HLS array_partition variable=buffer1 complete dim=1 | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
#pragma HLS array_partition variable=buffer1 complete dim=1 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer1 cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer1 cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=buffer1 complete dim=1 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer1 cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS array_partition variable=buffer1 cyclic factor=2 dim=1 | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
#pragma HLS array_partition variable=buffer1 cyclic factor=2 dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer1 cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer1 cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=buffer1 cyclic factor=2 dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer1 cyclic factor=2 dim=2
The right code snippet is:
#pragma HLS array_partition variable=buffer1 cyclic factor=2 dim=1 | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
#pragma HLS array_partition variable=buffer1 cyclic factor=2 dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer1 cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer1 cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=buffer1 cyclic factor=2 dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
#pragma HLS dataflow wait=2
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
#pragma HLS dataflow wait=2
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
#pragma HLS dataflow wait=2
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
#pragma HLS interface ap_memory depth=1 port=in
The right code snippet is:
#pragma HLS interface ap_fifo depth=1 port=in | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
#pragma HLS interface ap_fifo depth=1 port=in | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
#pragma HLS interface ap_memory depth=1 port=in
The high-level-synthesis bug type of the code is: 'IDAP' | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
#pragma HLS interface ap_memory depth=1 port=in
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface ap_fifo depth=1 port=in | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=1024 port=mem bundle=random_access
The right code snippet is:
#pragma HLS interface m_axi depth=1024 port=mem | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
#pragma HLS interface m_axi depth=1024 port=mem | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=1024 port=mem bundle=random_access
The high-level-synthesis bug type of the code is: 'RAMB' | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
#pragma HLS interface m_axi depth=1024 port=mem bundle=random_access
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi depth=1024 port=mem | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
#pragma HLS interface axis port=scalar_in
#pragma HLS interface ap_fifo port=array_out
The right code snippet is:
#pragma HLS interface ap_fifo port=scalar_in
#pragma HLS interface axis port=array_out | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
#pragma HLS interface ap_fifo port=scalar_in
#pragma HLS interface axis port=array_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
#pragma HLS interface axis port=scalar_in
#pragma HLS interface ap_fifo port=array_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
#pragma HLS interface axis port=scalar_in
#pragma HLS interface ap_fifo port=array_out
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface ap_fifo port=scalar_in
#pragma HLS interface axis port=array_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=array_in
#pragma HLS interface axis port=scalar_out
The right code snippet is:
#pragma HLS interface axis port=array_in
#pragma HLS interface ap_fifo port=scalar_out | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
#pragma HLS interface axis port=array_in
#pragma HLS interface ap_fifo port=scalar_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=array_in
#pragma HLS interface axis port=scalar_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=array_in
#pragma HLS interface axis port=scalar_out
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface axis port=array_in
#pragma HLS interface ap_fifo port=scalar_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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
#pragma HLS pipeline | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
#pragma HLS pipeline | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP' | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
#pragma HLS pipeline | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop=1
The right code snippet is:
#pragma HLS unroll | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, int& out2) {
... |
The right code snippet is:
#pragma HLS unroll | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void splitter_module(int in, int& out1, i... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop=1
The high-level-synthesis bug type of the code is: 'ILNU' | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_fifo depth=1 port=in
#pragma HLS INTERFACE ap_fifo depth=1 port=out
void... |
The wrong part of the code is:
#pragma HLS unroll factor=2 inner_loop=1
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
#pragma HLS unroll | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragm... |
The wrong part of the code is:
ap_uint<32> D[2];
ap_uint<32> Q[2];
ap_uint<32> M[2];
The right code snippet is:
ap_uint<32> D;
ap_uint<32> Q;
ap_uint<32> M; | '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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The right code snippet is:
ap_uint<32> D;
ap_uint<32> Q;
ap_uint<32> M; | '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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
ap_uint<32> D[2];
ap_uint<32> Q[2];
ap_uint<32> M[2];
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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma... |
The wrong part of the code is:
ap_uint<32> D[2];
ap_uint<32> Q[2];
ap_uint<32> M[2];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
ap_uint<32> D;
ap_uint<32> Q;
ap_uint<32> M; | '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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragm... |
The wrong part of the code is:
ap_uint<32> D = 0;
ap_uint<32> Q = 0;
ap_uint<32> M = 0;
The right code snippet is:
ap_uint<32> D;
ap_uint<32> Q;
ap_uint<32> M; | '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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The right code snippet is:
ap_uint<32> D;
ap_uint<32> Q;
ap_uint<32> M; | '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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
ap_uint<32> D = 0;
ap_uint<32> Q = 0;
ap_uint<32> M = 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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma... |
The wrong part of the code is:
ap_uint<32> D = 0;
ap_uint<32> Q = 0;
ap_uint<32> M = 0;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<32> D;
ap_uint<32> Q;
ap_uint<32> M; | '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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragm... |
The wrong part of the code is:
SNPS_BUF32( M, W32 << 35 );
The right code snippet is:
SNPS_BUF32( M, W32 ); | '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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The right code snippet is:
SNPS_BUF32( M, W32 ); | '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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
SNPS_BUF32( M, W32 << 35 );
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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma... |
The wrong part of the code is:
SNPS_BUF32( M, W32 << 35 );
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
SNPS_BUF32( M, W32 ); | '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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragm... |
The wrong part of the code is:
while(true){
SNPS_AND2_32( CLK, EN, ENCLK );
}
The right code snippet is:
SNPS_AND2_32( CLK, EN, ENCLK ); | '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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS... |
The right code snippet is:
SNPS_AND2_32( CLK, EN, ENCLK ); | '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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma HLS INTERFACE ap_ctrl_none port=retu... |
The wrong part of the code is:
while(true){
SNPS_AND2_32( CLK, EN, ENCLK );
}
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 SNPS_CLOCK_GATE_HIGH_d_ff_en_W32_0_0 ( bool CLK, bool EN, bool TE, ap_uint<32> W32, bool &ENCLK ) {
#pragma... |
The wrong part of the code is:
while(true){
SNPS_AND2_32( CLK, EN, ENCLK );
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
SNPS_AND2_32( CLK, EN, ENCLK ); | 'INF' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.