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<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num2; ...
The wrong part of the code is: #pragma HLS interface ap_fifo port=num1 The right code snippet is: #pragma HLS interface ap_ctrl_none port=num1
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num2; b...
The right code snippet is: #pragma HLS interface ap_ctrl_none port=num1
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num...
The wrong part of the code is: #pragma HLS interface ap_fifo port=num1 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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { ca...
The wrong part of the code is: #pragma HLS interface ap_fifo port=num1 The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_ctrl_none port=num1
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num2; ...
The wrong part of the code is: #pragma HLS interface m_axi port=num1 offset=slave bundle=wrong_bundle The right code snippet is: #pragma HLS interface m_axi port=num1 offset=slave bundle=gmem
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num2; b...
The right code snippet is: #pragma HLS interface m_axi port=num1 offset=slave bundle=gmem
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num...
The wrong part of the code is: #pragma HLS interface m_axi port=num1 offset=slave bundle=wrong_bundle 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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { ca...
The wrong part of the code is: #pragma HLS interface m_axi port=num1 offset=slave bundle=wrong_bundle The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=num1 offset=slave bundle=gmem
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num2; ...
The wrong part of the code is: #pragma HLS interface bram port=num1 The right code snippet is: #pragma HLS interface ap_memory port=num1
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num2; b...
The right code snippet is: #pragma HLS interface ap_memory port=num1
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num...
The wrong part of the code is: #pragma HLS interface bram port=num1 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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { ca...
The wrong part of the code is: #pragma HLS interface bram port=num1 The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_memory port=num1
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num2; ...
The wrong part of the code is: #pragma HLS interface s_axilite port=num1 The right code snippet is: #pragma HLS interface ap_none port=num1
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num2; b...
The right code snippet is: #pragma HLS interface ap_none port=num1
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num...
The wrong part of the code is: #pragma HLS interface s_axilite port=num1 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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { ca...
The wrong part of the code is: #pragma HLS interface s_axilite port=num1 The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_none port=num1
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num2; ...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num2; b...
The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num...
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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { ca...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num2; ...
The wrong part of the code is: for (int i = 0; i < 10; i++) { for (int j = 0; j < 5; j++) { // some code } } The right code snippet is: for (int i = 0; i < 10; i++) { // some code }
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num2; b...
The right code snippet is: for (int i = 0; i < 10; i++) { // some code }
'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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { case 0: result = num1 + num...
The wrong part of the code is: for (int i = 0; i < 10; i++) { for (int j = 0; j < 5; j++) { // some code } } 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 calculator(ap_uint<8> num1, ap_uint<8> num2, ap_uint<2> op, ap_uint<8> &result) { switch (op) { ca...
The wrong part of the code is: for (int i = 0; i < 10; i++) { for (int j = 0; j < 5; j++) { // some code } } The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: for (int i = 0; i < 10; i++) { // some code }
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out int x; out.range(3,1) = x; out[0] ...
The wrong part of the code is: int x; out.range(3,1) = x; The right code snippet is: out.range(3,1) = out.range(2,0);
INIT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out int x; out.range(3,1) = x; out[0] = dat...
The right code snippet is: out.range(3,1) = out.range(2,0);
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out int x; out.range(3,1) = x; ...
The wrong part of the code is: int x; out.range(3,1) = x; 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: int x; out.range(3,1) = x; The high-level-synthesis bug type of the code is: INIT The right code snippet is: out.range(3,1) = out.range(2,0);
INIT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); o...
The wrong part of the code is: out[10] = data; The right code snippet is: out[0] = data;
OOB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out[10...
The right code snippet is: out[0] = data;
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: out[10] = data; 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: out[10] = data; The high-level-synthesis bug type of the code is: OOB The right code snippet is: out[0] = data;
OOB
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,8) = out.range(2,0); o...
The wrong part of the code is: out.range(3,8) = out.range(2,0); The right code snippet is: out.range(3,1) = out.range(2,0);
SHFT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,8) = out.range(2,0); out[0]...
The right code snippet is: out.range(3,1) = out.range(2,0);
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,8) = out.range(...
The wrong part of the code is: out.range(3,8) = out.range(2,0); 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: out.range(3,8) = out.range(2,0); The high-level-synthesis bug type of the code is: SHFT The right code snippet is: out.range(3,1) = out.range(2,0);
SHFT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out while(1) { out.range(3,1) = out.ra...
The wrong part of the code is: while(1) { out.range(3,1) = out.range(2,0); } The right code snippet is: out.range(3,1) = out.range(2,0);
INF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out while(1) { out.range(3,1) = out.range(2...
The right code snippet is: out.range(3,1) = out.range(2,0);
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out while(1) { out.range(3,...
The wrong part of the code is: while(1) { out.range(3,1) = out.range(2,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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: while(1) { out.range(3,1) = out.range(2,0); } The high-level-synthesis bug type of the code is: INF The right code snippet is: out.range(3,1) = out.range(2,0);
INF
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); s...
The wrong part of the code is: signed char c; out[0] = c; The right code snippet is: out[0] = data;
USE
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); signed...
The right code snippet is: out[0] = data;
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: signed char c; out[0] = c; 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: signed char c; out[0] = c; The high-level-synthesis bug type of the code is: USE The right code snippet is: out[0] = data;
USE
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out.r...
The wrong part of the code is: out.range(3,1) = out.range(2,0); out.range(1,0) = out.range(3,2); The right code snippet is: out.range(3,1) = out.range(2,0);
MLU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out.range(...
The right code snippet is: out.range(3,1) = out.range(2,0);
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: out.range(3,1) = out.range(2,0); out.range(1,0) = out.range(3,2); 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: out.range(3,1) = out.range(2,0); out.range(1,0) = out.range(3,2); The high-level-synthesis bug type of the code is: MLU The right code snippet is: out.range(3,1) = out.range(2,0);
MLU
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); i...
The wrong part of the code is: int x = 0; out[0] = x; The right code snippet is: out[0] = data;
ZERO
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); int x ...
The right code snippet is: out[0] = data;
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: int x = 0; out[0] = x; 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: int x = 0; out[0] = x; The high-level-synthesis bug type of the code is: ZERO The right code snippet is: out[0] = data;
ZERO
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); o...
The wrong part of the code is: memcpy(&buffer1[0], &buffer2[sizeof(buffer1)/2], sizeof(buffer1)/2); The right code snippet is: memcpy(&buffer1[0], &buffer2[0], sizeof(buffer1)/2);
BUF
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out[0]...
The right code snippet is: memcpy(&buffer1[0], &buffer2[0], sizeof(buffer1)/2);
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: memcpy(&buffer1[0], &buffer2[sizeof(buffer1)/2], sizeof(buffer1)/2); 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: memcpy(&buffer1[0], &buffer2[sizeof(buffer1)/2], sizeof(buffer1)/2); The high-level-synthesis bug type of the code is: BUF The right code snippet is: memcpy(&buffer1[0], &buffer2[0], sizeof(buffer1)/2);
BUF
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); o...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic The right code snippet is: #pragma HLS array_partition variable=out complete
APT
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out[0]...
The right code snippet is: #pragma HLS array_partition variable=out complete
APT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic The high-level-synthesis bug type of the code is: APT
APT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic The high-level-synthesis bug type of the code is: APT The right code snippet is: #pragma HLS array_partition variable=out complete
APT
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); o...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic factor=4 The right code snippet is: #pragma HLS array_partition variable=out cyclic factor=3
FND
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out[0]...
The right code snippet is: #pragma HLS array_partition variable=out cyclic factor=3
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic factor=4 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic factor=4 The high-level-synthesis bug type of the code is: FND The right code snippet is: #pragma HLS array_partition variable=out cyclic factor=3
FND
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); o...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic factor=3 dim=2 The right code snippet is: #pragma HLS array_partition variable=out cyclic factor=3 dim=1
DID
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out[0]...
The right code snippet is: #pragma HLS array_partition variable=out cyclic factor=3 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic factor=3 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS array_partition variable=out cyclic factor=3 dim=2 The high-level-synthesis bug type of the code is: DID The right code snippet is: #pragma HLS array_partition variable=out cyclic factor=3 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); o...
The wrong part of the code is: #pragma HLS dataflow pipeline 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out[0]...
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: #pragma HLS dataflow pipeline 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS dataflow pipeline 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); o...
The wrong part of the code is: #pragma HLS interface ap_none port=data #pragma HLS interface ap_none port=out #pragma HLS interface ap_none port=control The right code snippet is: #pragma HLS interface ap_none port=data #pragma HLS interface ap_none port=out
IDAP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out[0]...
The right code snippet is: #pragma HLS interface ap_none port=data #pragma HLS interface ap_none port=out
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: #pragma HLS interface ap_none port=data #pragma HLS interface ap_none port=out #pragma HLS interface ap_none port=control 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS interface ap_none port=data #pragma HLS interface ap_none port=out #pragma HLS interface ap_none port=control The high-level-synthesis bug type of the code is: IDAP The right code snippet is: #pragma HLS interface ap_none port=data #pragma HLS interface ap...
IDAP
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); o...
The wrong part of the code is: #pragma HLS interface m_axi port=data offset=slave bundle=gmem1 The right code snippet is: #pragma HLS interface m_axi port=data offset=slave bundle=gmem
RAMB
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out[0]...
The right code snippet is: #pragma HLS interface m_axi port=data offset=slave bundle=gmem
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: #pragma HLS interface m_axi port=data offset=slave bundle=gmem1 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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS interface m_axi port=data offset=slave bundle=gmem1 The high-level-synthesis bug type of the code is: RAMB The right code snippet is: #pragma HLS interface m_axi port=data offset=slave bundle=gmem
RAMB
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); o...
The wrong part of the code is: #pragma HLS interface bram port=out The right code snippet is: #pragma HLS interface ap_memory port=out
SMA
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out[0]...
The right code snippet is: #pragma HLS interface ap_memory port=out
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: #pragma HLS interface bram port=out The high-level-synthesis bug type of the code is: SMA
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS interface bram port=out The high-level-synthesis bug type of the code is: SMA The right code snippet is: #pragma HLS interface ap_memory port=out
SMA
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); o...
The wrong part of the code is: #pragma HLS interface ap_fifo port=data #pragma HLS interface ap_fifo port=out The right code snippet is: #pragma HLS interface ap_none port=data #pragma HLS interface ap_none port=out
AMS
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out[0]...
The right code snippet is: #pragma HLS interface ap_none port=data #pragma HLS interface ap_none port=out
AMS
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: #pragma HLS interface ap_fifo port=data #pragma HLS interface ap_fifo port=out The high-level-synthesis bug type of the code is: AMS
AMS
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS interface ap_fifo port=data #pragma HLS interface ap_fifo port=out The high-level-synthesis bug type of the code is: AMS The right code snippet is: #pragma HLS interface ap_none port=data #pragma HLS interface ap_none port=out
AMS
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); o...
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out[0]...
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); o...
The wrong part of the code is: #pragma HLS unroll factor=2 The right code snippet is: #pragma HLS unroll
ILNU
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(2,0); out[0]...
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: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=out out.range(3,1) = out.range(...
The wrong part of the code is: #pragma HLS unroll factor=2 The high-level-synthesis bug type of the code is: ILNU
ILNU
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void shift_register(bool data, ap_uint<4>& out) { #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port...
The wrong part of the code is: #pragma HLS unroll factor=2 The high-level-synthesis bug type of the code is: ILNU The right code snippet is: #pragma HLS unroll
ILNU
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE ap_none port=ENCLK bool ENCLK_reg; void SNPS_...
The wrong part of the code is: bool ENCLK_reg; bool EN = false; bool TE = false; bool CLK = false; bool ENCLK; if (EN && TE) { ENCLK_reg = true; } else { ENCLK_reg = EN; } ENCLK = ENCLK_reg; The right code snippet is: if (EN && TE) { ENCLK_reg = t...
'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_none port=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE ap_none port=ENCLK bool ENCLK_reg; void SNPS_CLOCK...
The right code snippet is: if (EN && TE) { ENCLK_reg = true; } else { ENCLK_reg = false; } ENCLK = ENCLK_reg;
'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_none port=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE ap_none port=ENCLK bool ENCLK_reg; ...
The wrong part of the code is: bool ENCLK_reg; bool EN = false; bool TE = false; bool CLK = false; bool ENCLK; if (EN && TE) { ENCLK_reg = true; } else { ENCLK_reg = EN; } ENCLK = ENCLK_reg; 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_none port=CLK #pragma HLS INTERFACE ap_none port=EN #pragma HLS INTERFACE ap_none port=TE #pragma HLS INTERFACE...
The wrong part of the code is: bool ENCLK_reg; bool EN = false; bool TE = false; bool CLK = false; bool ENCLK; if (EN && TE) { ENCLK_reg = true; } else { ENCLK_reg = EN; } ENCLK = ENCLK_reg; The high-level-synthesis bug type of the code is: 'INIT' The rig...
'INIT'