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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; break; ...
The wrong part of the code is: case 0b0100: out = 0b11; break; The right code snippet is: case 0b0001: out = 0b01; break;
'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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; break; cas...
The right code snippet is: case 0b0001: out = 0b01; break;
'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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; br...
The wrong part of the code is: case 0b0100: out = 0b11; break; 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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) ...
The wrong part of the code is: case 0b0100: out = 0b11; break; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: case 0b0001: out = 0b01; break;
'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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; break; ...
The wrong part of the code is: int priority = 0; The right code snippet is: int priority;
'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=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; break; cas...
The right code snippet is: int priority;
'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=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; br...
The wrong part of the code is: int priority = 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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) ...
The wrong part of the code is: int priority = 0; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: int priority;
'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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; break; ...
The wrong part of the code is: out = (BRGC(2<<1),BRGC(3<<1),BRGC(1<<1),BRGC(0<<1)); The right code snippet is: out = (BRGC(2),BRGC(3),BRGC(1),BRGC(0));
'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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; break; cas...
The right code snippet is: out = (BRGC(2),BRGC(3),BRGC(1),BRGC(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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; br...
The wrong part of the code is: out = (BRGC(2<<1),BRGC(3<<1),BRGC(1<<1),BRGC(0<<1)); 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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) ...
The wrong part of the code is: out = (BRGC(2<<1),BRGC(3<<1),BRGC(1<<1),BRGC(0<<1)); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: out = (BRGC(2),BRGC(3),BRGC(1),BRGC(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: #pragma HLS INTERFACE ap_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; break; ...
The wrong part of the code is: out = (unsigned int)in; The right code snippet is: out = in;
'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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; break; cas...
The right code snippet is: out = in;
'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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; br...
The wrong part of the code is: out = (unsigned int)in; 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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) ...
The wrong part of the code is: out = (unsigned int)in; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: out = in;
'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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; break; ...
The wrong part of the code is: int BRGC = 0; The right code snippet is: int BRGC;
'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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; break; cas...
The right code snippet is: int BRGC;
'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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) { case 0b0000: out = 0b00; br...
The wrong part of the code is: int BRGC = 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_none port=in #pragma HLS INTERFACE ap_none port=out void priority_encoder(int in, int& out) { switch(~in) ...
The wrong part of the code is: int BRGC = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: int BRGC;
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: int arr[10]; int x = arr[-1]; The right code snippet is: int arr[10]; int x = arr[15];
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: int arr[10]; int x = arr[15];
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: int arr[10]; int x = arr[-1]; 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: int arr[10]; int x = arr[-1]; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: int arr[10]; int x = arr[15];
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: int x; int y = x; The right code snippet is: int x; int y = x + 5;
'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=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: int x; int y = x + 5;
'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=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: int x; int y = 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: #pragma HLS INTERFACE ap_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: int x; int y = x; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: int x; int y = x + 5;
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: int x = 5; int y = x << -1; The right code snippet is: int x = 5; int y = x << 35;
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: int x = 5; int y = x << 35;
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: int x = 5; int y = x << -1; 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: int x = 5; int y = x << -1; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: int x = 5; int y = x << 35;
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { //some code } The right code snippet is: for (int i = 0; i < 10; i++) { //some code }
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: for (int i = 0; i < 10; i++) { //some code }
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { //some code } 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: for (int i = 0; i >= 0; i++) { //some code } 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 }
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: signed char c = -56; int x = c; The right code snippet is: unsigned char c = 200; int x = c;
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: unsigned char c = 200; int x = c;
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: signed char c = -56; int x = 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: #pragma HLS INTERFACE ap_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: signed char c = -56; int x = c; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: unsigned char c = 200; int x = c;
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: for (int i = 0; i < 9; i+=2) { //some code } The right code snippet is: for (int i = 0; i < 10; i++) { //some code }
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: for (int i = 0; i < 10; i++) { //some code }
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: for (int i = 0; i < 9; i+=2) { //some code } 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: for (int i = 0; i < 9; i+=2) { //some code } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 10; i++) { //some code }
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: int x = 0; The right code snippet is: int x = 5;
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: int x = 5;
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: int x = 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: int x = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: int x = 5;
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: int arr[10]; int *ptr1 = &arr[0]; int *ptr2 = &arr[10]; memcpy(ptr1, ptr2, sizeof(int)*5); The right code snippet is: int arr[10]; int *ptr1 = &arr[0]; int *ptr2 = &arr[5]; memcpy(ptr1, ptr2, sizeof(int)*5);
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: int arr[10]; int *ptr1 = &arr[0]; int *ptr2 = &arr[5]; memcpy(ptr1, ptr2, sizeof(int)*5);
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: int arr[10]; int *ptr1 = &arr[0]; int *ptr2 = &arr[10]; memcpy(ptr1, ptr2, sizeof(int)*5); 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: int arr[10]; int *ptr1 = &arr[0]; int *ptr2 = &arr[10]; memcpy(ptr1, ptr2, sizeof(int)*5); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: int arr[10]; int *ptr1 = &arr[0]; int *ptr2 = &arr[5]; memcpy(ptr1, ptr2, sizeof(int)*5);
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: #pragma HLS array_partition variable=arr block factor=2 dim=1 The right code snippet is: #pragma HLS array_partition variable=arr cyclic factor=2 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: #pragma HLS array_partition variable=arr cyclic factor=2 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: #pragma HLS array_partition variable=arr block factor=2 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=arr block factor=2 dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=arr cyclic factor=2 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: #pragma HLS array_partition variable=arr cyclic factor=3 dim=1 The right code snippet is: #pragma HLS array_partition variable=arr 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: #pragma HLS array_partition variable=arr 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: #pragma HLS array_partition variable=arr 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=arr 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=arr 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: #pragma HLS array_partition variable=arr cyclic factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=arr 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: #pragma HLS array_partition variable=arr 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: #pragma HLS array_partition variable=arr 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=arr 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=arr 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: #pragma HLS dataflow pipeline II=2 The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: #pragma HLS dataflow pipeline II=2 The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS dataflow pipeline II=2 The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: #pragma HLS dataflow
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: #pragma HLS interface ap_fifo port=arr The right code snippet is: #pragma HLS interface ap_none port=arr
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: #pragma HLS interface ap_none port=arr
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: #pragma HLS interface ap_fifo port=arr 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS interface ap_fifo port=arr The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_none port=arr
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: #pragma HLS interface m_axi depth=64 port=arr The right code snippet is: #pragma HLS interface m_axi port=arr
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: #pragma HLS interface m_axi port=arr
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: #pragma HLS interface m_axi depth=64 port=arr 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS interface m_axi depth=64 port=arr The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=arr
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: #pragma HLS interface ap_memory port=scalar #pragma HLS interface ap_none port=arr The right code snippet is: #pragma HLS interface ap_none port=scalar #pragma HLS interface ap_memory depth=1024 port=arr
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: #pragma HLS interface ap_none port=scalar #pragma HLS interface ap_memory depth=1024 port=arr
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: #pragma HLS interface ap_memory port=scalar #pragma HLS interface ap_none port=arr 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS interface ap_memory port=scalar #pragma HLS interface ap_none port=arr The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_none port=scalar #pragma HLS interface ap_memory depth=1024 port=arr
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: #pragma HLS interface ap_none port=arr int scalar = arr; The right code snippet is: #pragma HLS interface ap_memory depth=1024 port=arr int scalar = arr[0];
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: #pragma HLS interface ap_memory depth=1024 port=arr int scalar = arr[0];
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: #pragma HLS interface ap_none port=arr int scalar = arr; 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS interface ap_none port=arr int scalar = arr; The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_memory depth=1024 port=arr int scalar = arr[0];
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: #pragma HLS pipeline II=3 The right code snippet is: #pragma HLS pipeline II=2
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
The right code snippet is: #pragma HLS pipeline II=2
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: #pragma HLS pipeline II=3 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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS pipeline II=3 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: #pragma HLS pipeline II=2
'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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none por...
The wrong part of the code is: #pragma HLS unroll factor=1 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: #pragma HLS INTERFACE ap_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ap_none port=C1 ...
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: #pragma HLS INTERFACE ap_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE ap_none port=B1 #pragma HLS INTERFACE ...
The wrong part of the code is: #pragma HLS unroll factor=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_none port=Y #pragma HLS INTERFACE ap_none port=A1 #pragma HLS INTERFACE ap_none port=A2 #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS unroll factor=1 The high-level-synthesis bug type of the code is: 'ILNU' 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 right code snippet The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: for (int i = 0; i < 10; i++) { ready_counter[i] = ready_counter[i+1]; } The right code snippet is: for (int i = 0; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; }
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: for (int i = 0; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; }
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: for (int i = 0; i < 10; i++) { ready_counter[i] = ready_counter[i+1]; } 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: for (int i = 0; i < 10; i++) { ready_counter[i] = ready_counter[i+1]; } The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: for (int i = 0; i < 9; i++) { ready_counter[i] = ready_counter[i+1]; }
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_n...
The wrong part of the code is: bool WAIT_val = false; bool nreset_val = false; bool clk_val = false; The right code snippet is: bool WAIT_val; bool nreset_val; bool clk_val;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFACE ap_ctrl_none p...
The right code snippet is: bool WAIT_val; bool nreset_val; bool clk_val;
'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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& ready_random ) { #pragma HLS INTERFAC...
The wrong part of the code is: bool WAIT_val = false; bool nreset_val = false; bool clk_val = false; 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 random_gen( hls::stream<bool>& clk, hls::stream<bool>& nreset, hls::stream<bool>& WAIT, hls::stream<bool>& read...
The wrong part of the code is: bool WAIT_val = false; bool nreset_val = false; bool clk_val = false; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: bool WAIT_val; bool nreset_val; bool clk_val;
'INIT'