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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
for(int i = 0; i >= 0; i++) {
// do something
}
The right code snippet is:
for(int i = 0; i < 10; i++) {
// do something
} | INF |
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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
The right code snippet is:
for(int i = 0; i < 10; i++) {
// do something
} | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
The wrong part of the code is:
for(int i = 0; i >= 0; i++) {
// do something
}
The high-level-synthesis bug type of the code is: INF | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
The wrong part of the code is:
for(int i = 0; i >= 0; i++) {
// do something
}
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
for(int i = 0; i < 10; i++) {
// do something
} | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
signed char c = -1;
The right code snippet is:
unsigned char c = 255; | 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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
The right code snippet is:
unsigned char c = 255; | 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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
The wrong part of the code is:
signed char c = -1;
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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
The wrong part of the code is:
signed char c = -1;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
unsigned char c = 255; | 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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
for(int i = 0; i < 5; i++) {
// do something
}
The right code snippet is:
for(int i = 0; i < 10; i++) {
// do something
} | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
The right code snippet is:
for(int i = 0; i < 10; i++) {
// do something
} | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
The wrong part of the code is:
for(int i = 0; i < 5; i++) {
// do something
}
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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
The wrong part of the code is:
for(int i = 0; i < 5; i++) {
// do something
}
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
for(int i = 0; i < 10; i++) {
// do something
} | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
int x = 0;
The right code snippet is:
int x = 10; | 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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
The right code snippet is:
int x = 10; | 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_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
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 = 10; | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
memcpy(dest + size/2, src, size);
The right code snippet is:
memcpy(dest, src, size); | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
The right code snippet is:
memcpy(dest, src, size); | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
The wrong part of the code is:
memcpy(dest + size/2, src, size);
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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
The wrong part of the code is:
memcpy(dest + size/2, src, size);
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
memcpy(dest, src, size); | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
#pragma HLS array_partition variable=my_array cyclic
The right code snippet is:
#pragma HLS array_partition variable=my_array complete | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
The right code snippet is:
#pragma HLS array_partition variable=my_array 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:
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
The wrong part of the code is:
#pragma HLS array_partition variable=my_array 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:
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
The wrong part of the code is:
#pragma HLS array_partition variable=my_array cyclic
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pragma HLS array_partition variable=my_array 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:
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
#pragma HLS array_partition variable=my_array cyclic factor=3
The right code snippet is:
#pragma HLS array_partition variable=my_array cyclic factor=4 | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
The right code snippet is:
#pragma HLS array_partition variable=my_array cyclic factor=4 | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
The wrong part of the code is:
#pragma HLS array_partition variable=my_array cyclic factor=3
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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
The wrong part of the code is:
#pragma HLS array_partition variable=my_array cyclic factor=3
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS array_partition variable=my_array cyclic factor=4 | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
#pragma HLS array_partition variable=my_array cyclic factor=4 dim=2
The right code snippet is:
#pragma HLS array_partition variable=my_array cyclic factor=4 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
The right code snippet is:
#pragma HLS array_partition variable=my_array cyclic factor=4 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
The wrong part of the code is:
#pragma HLS array_partition variable=my_array cyclic factor=4 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
The wrong part of the code is:
#pragma HLS array_partition variable=my_array cyclic factor=4 dim=2
The high-level-synthesis bug type of the code is: DID
The right code snippet is:
#pragma HLS array_partition variable=my_array cyclic factor=4 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
#pragma HLS dataflow region
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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
The wrong part of the code is:
#pragma HLS dataflow region
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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
The wrong part of the code is:
#pragma HLS dataflow region
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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=my_port
The right code snippet is:
#pragma HLS interface ap_none port=my_port | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
The right code snippet is:
#pragma HLS interface ap_none port=my_port | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=my_port
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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=my_port
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
#pragma HLS interface ap_none port=my_port | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=my_port offset=slave
The right code snippet is:
#pragma HLS interface m_axi port=my_port | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
The right code snippet is:
#pragma HLS interface m_axi port=my_port | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
The wrong part of the code is:
#pragma HLS interface m_axi port=my_port offset=slave
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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
The wrong part of the code is:
#pragma HLS interface m_axi port=my_port offset=slave
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
#pragma HLS interface m_axi port=my_port | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
#pragma HLS interface bram port=my_port
The right code snippet is:
#pragma HLS interface ap_fifo port=my_port | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
The right code snippet is:
#pragma HLS interface ap_fifo port=my_port | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
The wrong part of the code is:
#pragma HLS interface bram port=my_port
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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
The wrong part of the code is:
#pragma HLS interface bram port=my_port
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
#pragma HLS interface ap_fifo port=my_port | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=my_port
The right code snippet is:
#pragma HLS interface bram port=my_port | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
The right code snippet is:
#pragma HLS interface bram port=my_port | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=my_port
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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=my_port
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
#pragma HLS interface bram port=my_port | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
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:
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
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:
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
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_none port=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
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:
#pragma HLS INTERFACE ap_none port=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
... |
The wrong part of the code is:
#pragma HLS unroll factor=3 inner_loop=1
The right code snippet is:
#pragma HLS unroll factor=4 | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(in) {
ca... |
The right code snippet is:
#pragma HLS unroll factor=4 | 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=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_counter(int in, int& out) {
switch(... |
The wrong part of the code is:
#pragma HLS unroll factor=3 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_none port=in
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=out
void bit_co... |
The wrong part of the code is:
#pragma HLS unroll factor=3 inner_loop=1
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
#pragma HLS unroll factor=4 | 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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE... |
The wrong part of the code is:
shift_reg <= {shift_reg[7:1], din};
The right code snippet is:
shift_reg <= {shift_reg[6:0], din}; | 'OOB': Out-of-bounds array access |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
shift_reg <= {shift_reg[6:0], din}; | 'OOB': Out-of-bounds array access |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HL... |
The wrong part of the code is:
shift_reg <= {shift_reg[7:1], din};
The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access | 'OOB': Out-of-bounds array access |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
shift_reg <= {shift_reg[7:1], din};
The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access
The right code snippet is:
shift_reg <= {shift_reg[6:0], din}; | 'OOB': Out-of-bounds array access |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE... |
The wrong part of the code is:
// uninitialized variable read
dout <= shift_reg + 1;
The right code snippet is:
shift_reg <= 8'b0; | 'INIT': Read of uninitialized variable |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
shift_reg <= 8'b0; | 'INIT': Read of uninitialized variable |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HL... |
The wrong part of the code is:
// uninitialized variable read
dout <= shift_reg + 1;
The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable | 'INIT': Read of uninitialized variable |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
// uninitialized variable read
dout <= shift_reg + 1;
The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable
The right code snippet is:
shift_reg <= 8'b0; | 'INIT': Read of uninitialized variable |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE... |
The wrong part of the code is:
// bit shift by out-of-bounds amount
shift_reg <= {shift_reg[8:0], din};
The right code snippet is:
shift_reg <= {shift_reg[6:0], din}; | 'SHFT': Bit shift by an out-of-bounds amount |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
shift_reg <= {shift_reg[6:0], din}; | 'SHFT': Bit shift by an out-of-bounds amount |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HL... |
The wrong part of the code is:
// bit shift by out-of-bounds amount
shift_reg <= {shift_reg[8:0], din};
The high-level-synthesis bug type of the code is: 'SHFT': Bit shift by an out-of-bounds amount | 'SHFT': Bit shift by an out-of-bounds amount |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
// bit shift by out-of-bounds amount
shift_reg <= {shift_reg[8:0], din};
The high-level-synthesis bug type of the code is: 'SHFT': Bit shift by an out-of-bounds amount
The right code snippet is:
shift_reg <= {shift_reg[6:0], din}; | 'SHFT': Bit shift by an out-of-bounds amount |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE... |
The wrong part of the code is:
// incorrect loop termination condition
always @(posedge clk) begin
while (1) begin
shift_reg <= {shift_reg[6:0], din};
dout <= shift_reg;
end
end
The right code snippet is:
always @(posedge clk) begin
if (rst) begin
shift_reg <= 8'b0;
dout <= 8'b0;
... | 'INF': An infinite loop arising from an incorrect loop termination |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
always @(posedge clk) begin
if (rst) begin
shift_reg <= 8'b0;
dout <= 8'b0;
end
else if (shen) begin
shift_reg <= {shift_reg[6:0], din};
dout <= shift_reg;
end
end | 'INF': An infinite loop arising from an incorrect loop termination |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HL... |
The wrong part of the code is:
// incorrect loop termination condition
always @(posedge clk) begin
while (1) begin
shift_reg <= {shift_reg[6:0], din};
dout <= shift_reg;
end
end
The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination | 'INF': An infinite loop arising from an incorrect loop termination |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
// incorrect loop termination condition
always @(posedge clk) begin
while (1) begin
shift_reg <= {shift_reg[6:0], din};
dout <= shift_reg;
end
end
The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination
... | 'INF': An infinite loop arising from an incorrect loop termination |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE... |
The wrong part of the code is:
// unintended sign extension
shift_reg <= {signed(shift_reg[6:0]), din};
The right code snippet is:
shift_reg <= {shift_reg[6:0], din}; | 'USE': Unintended sign extension |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
shift_reg <= {shift_reg[6:0], din}; | 'USE': Unintended sign extension |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HL... |
The wrong part of the code is:
// unintended sign extension
shift_reg <= {signed(shift_reg[6:0]), din};
The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension | 'USE': Unintended sign extension |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
// unintended sign extension
shift_reg <= {signed(shift_reg[6:0]), din};
The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension
The right code snippet is:
shift_reg <= {shift_reg[6:0], din}; | 'USE': Unintended sign extension |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE... |
The wrong part of the code is:
// error in manual loop unrolling
always @(posedge clk) begin
if (rst) begin
shift_reg <= 8'b0;
dout <= 8'b0;
end
else if (shen) begin
shift_reg <= {shift_reg[6:0], din};
dout <= shift_reg;
shift_reg <= {shift_reg[6:0], din};
dout <= shift_reg;
end... | 'MLU': Errors in manual loop unrolling |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
always @(posedge clk) begin
if (rst) begin
shift_reg <= 8'b0;
dout <= 8'b0;
end
else if (shen) begin
shift_reg <= {shift_reg[6:0], din};
dout <= shift_reg;
end
end | 'MLU': Errors in manual loop unrolling |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HL... |
The wrong part of the code is:
// error in manual loop unrolling
always @(posedge clk) begin
if (rst) begin
shift_reg <= 8'b0;
dout <= 8'b0;
end
else if (shen) begin
shift_reg <= {shift_reg[6:0], din};
dout <= shift_reg;
shift_reg <= {shift_reg[6:0], din};
dout <= shift_reg;
end... | 'MLU': Errors in manual loop unrolling |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
// error in manual loop unrolling
always @(posedge clk) begin
if (rst) begin
shift_reg <= 8'b0;
dout <= 8'b0;
end
else if (shen) begin
shift_reg <= {shift_reg[6:0], din};
dout <= shift_reg;
shift_reg <= {shift_reg[6:0], din};
dout <= shift_reg;
end... | 'MLU': Errors in manual loop unrolling |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE... |
The wrong part of the code is:
// variable initialized to zero instead of nonzero initializer
shift_reg <= 8'hff;
The right code snippet is:
shift_reg <= 8'b0; | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
shift_reg <= 8'b0; | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HL... |
The wrong part of the code is:
// variable initialized to zero instead of nonzero initializer
shift_reg <= 8'hff;
The high-level-synthesis bug type of the code is: 'ZERO': Variable initialized to zero instead of nonzero initializer | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
// variable initialized to zero instead of nonzero initializer
shift_reg <= 8'hff;
The high-level-synthesis bug type of the code is: 'ZERO': Variable initialized to zero instead of nonzero initializer
The right code snippet is:
shift_reg <= 8'b0; | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE... |
The wrong part of the code is:
// copying from the wrong half of a split buffer
always @(posedge clk) begin
if (rst) begin
shift_reg <= 8'b0;
dout <= 8'b0;
end
else if (shen) begin
shift_reg <= {shift_reg[1:0], din};
dout <= shift_reg;
end
end
The right code snippet is:
always @... | 'BUF': Copying from the wrong half of a split buffer |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
always @(posedge clk) begin
if (rst) begin
shift_reg <= 8'b0;
dout <= 8'b0;
end
else if (shen) begin
shift_reg <= {shift_reg[6:0], din};
dout <= shift_reg;
end
end | 'BUF': Copying from the wrong half of a split buffer |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HL... |
The wrong part of the code is:
// copying from the wrong half of a split buffer
always @(posedge clk) begin
if (rst) begin
shift_reg <= 8'b0;
dout <= 8'b0;
end
else if (shen) begin
shift_reg <= {shift_reg[1:0], din};
dout <= shift_reg;
end
end
The high-level-synthesis bug type of th... | 'BUF': Copying from the wrong half of a split buffer |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
// copying from the wrong half of a split buffer
always @(posedge clk) begin
if (rst) begin
shift_reg <= 8'b0;
dout <= 8'b0;
end
else if (shen) begin
shift_reg <= {shift_reg[1:0], din};
dout <= shift_reg;
end
end
The high-level-synthesis bug type of th... | 'BUF': Copying from the wrong half of a split buffer |
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_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE... |
The wrong part of the code is:
// array partition type error
reg [7:1] shift_reg;
The right code snippet is:
reg [7:0] shift_reg; | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
reg [7:0] shift_reg; | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HL... |
The wrong part of the code is:
// array partition type error
reg [7:1] shift_reg;
The high-level-synthesis bug type of the code is: 'APT': Array partition type error for the pragma '#pragma HLS array_partition' | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
// array partition type error
reg [7:1] shift_reg;
The high-level-synthesis bug type of the code is: 'APT': Array partition type error for the pragma '#pragma HLS array_partition'
The right code snippet is:
reg [7:0] shift_reg; | 'APT': Array partition type error for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE... |
The wrong part of the code is:
// factor not divisible error
reg [7:3] shift_reg;
The right code snippet is:
reg [7:0] shift_reg; | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HLS INTERFACE ap_n... |
The right code snippet is:
reg [7:0] shift_reg; | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=shen
#pragma HL... |
The wrong part of the code is:
// factor not divisible error
reg [7:3] shift_reg;
The high-level-synthesis bug type of the code is: 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The wrong part of the code is:
// factor not divisible error
reg [7:3] shift_reg;
The high-level-synthesis bug type of the code is: 'FND': Factor not divisible for the pragma '#pragma HLS array_partition'
The right code snippet is:
reg [7:0] shift_reg; | 'FND': Factor not divisible for the pragma '#pragma HLS array_partition' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.