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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
if (tx_buffer_ptr >= 32) {
tx_buffer_full = true;
}
The right code snippet is:
if (tx_buffer_ptr == 32) {
tx_buffer_full = true;
} | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
if (tx_buffer_ptr == 32) {
tx_buffer_full = true;
} | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
if (tx_buffer_ptr >= 32) {
tx_buffer_full = true;
}
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
if (tx_buffer_ptr >= 32) {
tx_buffer_full = true;
}
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
if (tx_buffer_ptr == 32) {
tx_buffer_full = true;
} | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
unsigned char bit_counter;
The right code snippet is:
unsigned char bit_counter = 0; | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
unsigned char bit_counter = 0; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
unsigned char bit_counter;
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
unsigned char bit_counter;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
unsigned char bit_counter = 0; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
tx_shift_reg = (tx_bit_stuff ? (1 << 10) : 0) | (tx_shift_reg >> 9);
The right code snippet is:
tx_shift_reg = (tx_bit_stuff ? (1 << 7) : 0) | (tx_shift_reg >> 1); | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
tx_shift_reg = (tx_bit_stuff ? (1 << 7) : 0) | (tx_shift_reg >> 1); | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
tx_shift_reg = (tx_bit_stuff ? (1 << 10) : 0) | (tx_shift_reg >> 9);
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
tx_shift_reg = (tx_bit_stuff ? (1 << 10) : 0) | (tx_shift_reg >> 9);
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
tx_shift_reg = (tx_bit_stuff ? (1 << 7) : 0) | (tx_shift_reg >> 1); | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
int i = 0;
while (i >= 0) {
i++;
}
The right code snippet is:
while (1) {
// Infinite loop
} | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
while (1) {
// Infinite loop
} | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
int i = 0;
while (i >= 0) {
i++;
}
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
int i = 0;
while (i >= 0) {
i++;
}
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
while (1) {
// Infinite loop
} | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
signed char tx_shift_reg = 0;
The right code snippet is:
unsigned char tx_shift_reg = 0; | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
unsigned char tx_shift_reg = 0; | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
signed char tx_shift_reg = 0;
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
signed char tx_shift_reg = 0;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
unsigned char tx_shift_reg = 0; | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
for (int i = 0; i < 32; i+=2) {
// Loop body
}
The right code snippet is:
for (int i = 0; i < 32; i++) {
// Loop body
} | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
for (int i = 0; i < 32; i++) {
// Loop body
} | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
for (int i = 0; i < 32; i+=2) {
// Loop body
}
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
for (int i = 0; i < 32; i+=2) {
// Loop body
}
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
for (int i = 0; i < 32; i++) {
// Loop body
} | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
unsigned char tx_buffer_ptr = {some nonzero value};
The right code snippet is:
unsigned char tx_buffer_ptr = 0; | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
unsigned char tx_buffer_ptr = 0; | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
unsigned char tx_buffer_ptr = {some nonzero value};
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
unsigned char tx_buffer_ptr = {some nonzero value};
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
unsigned char tx_buffer_ptr = 0; | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
tx_data_buffer[tx_buffer_ptr+16].data = data;
The right code snippet is:
tx_data_buffer[tx_buffer_ptr].data = data; | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
tx_data_buffer[tx_buffer_ptr].data = data; | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
tx_data_buffer[tx_buffer_ptr+16].data = data;
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
tx_data_buffer[tx_buffer_ptr+16].data = data;
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
tx_data_buffer[tx_buffer_ptr].data = data; | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
#pragma HLS array_partition variable=tx_data_buffer cyclic
The right code snippet is:
#pragma HLS array_partition variable=tx_data_buffer 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
#pragma HLS array_partition variable=tx_data_buffer 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
#pragma HLS array_partition variable=tx_data_buffer 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS array_partition variable=tx_data_buffer cyclic
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pragma HLS array_partition variable=tx_data_buffer 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
#pragma HLS array_partition variable=tx_data_buffer cyclic factor=5
The right code snippet is:
#pragma HLS array_partition variable=tx_data_buffer 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
#pragma HLS array_partition variable=tx_data_buffer 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
#pragma HLS array_partition variable=tx_data_buffer cyclic factor=5
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS array_partition variable=tx_data_buffer cyclic factor=5
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS array_partition variable=tx_data_buffer 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
#pragma HLS array_partition variable=tx_data_buffer cyclic factor=4 dim=2
The right code snippet is:
#pragma HLS array_partition variable=tx_data_buffer 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
#pragma HLS array_partition variable=tx_data_buffer 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
#pragma HLS array_partition variable=tx_data_buffer 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS array_partition variable=tx_data_buffer 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=tx_data_buffer 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
#pragma HLS dataflow loop_flatten off
The right code snippet is:
#pragma HLS dataflow | DFP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
#pragma HLS dataflow loop_flatten off
The high-level-synthesis bug type of the code is: DFP | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS dataflow loop_flatten off
The high-level-synthesis bug type of the code is: DFP
The right code snippet is:
#pragma HLS dataflow | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
#pragma HLS interface ap_fifo depth=16
The right code snippet is:
#pragma HLS interface ap_fifo depth=32 | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
#pragma HLS interface ap_fifo depth=32 | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
#pragma HLS interface ap_fifo depth=16
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS interface ap_fifo depth=16
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
#pragma HLS interface ap_fifo depth=32 | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
#pragma HLS interface m_axi port=rx_data_buffer
The right code snippet is:
#pragma HLS interface m_axi port=tx_data_buffer | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
#pragma HLS interface m_axi port=tx_data_buffer | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
#pragma HLS interface m_axi port=rx_data_buffer
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS interface m_axi port=rx_data_buffer
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
#pragma HLS interface m_axi port=tx_data_buffer | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
#pragma HLS interface bram port=tx_data_buffer
The right code snippet is:
#pragma HLS interface ap_memory port=rx_data_buffer | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
#pragma HLS interface ap_memory port=rx_data_buffer | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
#pragma HLS interface bram port=tx_data_buffer
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS interface bram port=tx_data_buffer
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
#pragma HLS interface ap_memory port=rx_data_buffer | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=rx_data_buffer
The right code snippet is:
#pragma HLS interface ap_vld port=rx_data_buffer | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
#pragma HLS interface ap_vld port=rx_data_buffer | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=rx_data_buffer
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS interface s_axilite port=rx_data_buffer
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
#pragma HLS interface ap_vld port=rx_data_buffer | 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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
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 s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma H... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The right code snippet is:
#pragma HLS unroll | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BUS
#pragma HLS IN... |
The right code snippet is:
#pragma HLS unroll | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=id bundle=CRTL_BU... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The high-level-synthesis bug type of the code is: ILNU | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE s_axilite port=data bundle=CRTL_BUS
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
#pragma HLS unroll | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum outpu... |
The wrong part of the code is:
ap_uint<32> n = 0;
ap_uint<32> m = 0;
ap_uint<32> c = 0;
ap_uint<32> p = 0;
ap_uint<32> vco = 0;
static ap_uint<32> out_reg = 0;
The right code snippet is:
ap_uint<32> n;
ap_uint<32> m;
ap_uint<32> c;
ap_uint<32> p;
ap_uint<32> vco;
static ap_uint<32> ... | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum output fre... |
The right code snippet is:
ap_uint<32> n;
ap_uint<32> m;
ap_uint<32> c;
ap_uint<32> p;
ap_uint<32> vco;
static ap_uint<32> out_reg; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Mi... |
The wrong part of the code is:
ap_uint<32> n = 0;
ap_uint<32> m = 0;
ap_uint<32> c = 0;
ap_uint<32> p = 0;
ap_uint<32> vco = 0;
static ap_uint<32> out_reg = 0;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency i... |
The wrong part of the code is:
ap_uint<32> n = 0;
ap_uint<32> m = 0;
ap_uint<32> c = 0;
ap_uint<32> p = 0;
ap_uint<32> vco = 0;
static ap_uint<32> out_reg = 0;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<32> n;
ap_uint<32> m;
ap_uint<32>... | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum outpu... |
The wrong part of the code is:
c = n + m;
The right code snippet is:
c = n * m; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum output fre... |
The right code snippet is:
c = n * m; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Mi... |
The wrong part of the code is:
c = n + m;
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency i... |
The wrong part of the code is:
c = n + m;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
c = n * m; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum outpu... |
The wrong part of the code is:
if (ctrl == 1) { // PLL-based synthesis method
n = ftw;
m = F_OUT_MAX/F_REF;
c = n * m;
p = c / 2;
vco = p * F_REF;
while(true) { // Infinite loop
out_reg = vco;
}
}
The right code snippet is:
if (ctrl == 1) { // PLL-based synthesis met... | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum output fre... |
The right code snippet is:
if (ctrl == 1) { // PLL-based synthesis method
n = ftw;
m = F_OUT_MAX/F_REF;
c = n * m;
p = c / 2;
vco = p * F_REF;
out_reg = vco;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Mi... |
The wrong part of the code is:
if (ctrl == 1) { // PLL-based synthesis method
n = ftw;
m = F_OUT_MAX/F_REF;
c = n * m;
p = c / 2;
vco = p * F_REF;
while(true) { // Infinite loop
out_reg = vco;
}
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency i... |
The wrong part of the code is:
if (ctrl == 1) { // PLL-based synthesis method
n = ftw;
m = F_OUT_MAX/F_REF;
c = n * m;
p = c / 2;
vco = p * F_REF;
while(true) { // Infinite loop
out_reg = vco;
}
}
The high-level-synthesis bug type of the code is: 'INF'
The right 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:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum outpu... |
The wrong part of the code is:
m = (ap_int<32>)F_OUT_MAX/F_REF;
The right code snippet is:
m = F_OUT_MAX/F_REF; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum output fre... |
The right code snippet is:
m = F_OUT_MAX/F_REF; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Mi... |
The wrong part of the code is:
m = (ap_int<32>)F_OUT_MAX/F_REF;
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency i... |
The wrong part of the code is:
m = (ap_int<32>)F_OUT_MAX/F_REF;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
m = F_OUT_MAX/F_REF; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum outpu... |
The wrong part of the code is:
c = n << m;
The right code snippet is:
c = n * m; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum output fre... |
The right code snippet is:
c = n * m; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Mi... |
The wrong part of the code is:
c = n << m;
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency i... |
The wrong part of the code is:
c = n << m;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
c = n * m; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum outpu... |
The wrong part of the code is:
ap_uint<16> vco_l;
ap_uint<16> vco_h;
static ap_uint<32> out_reg;
vco_l = (ap_uint<16>)vco;
vco_h = (ap_uint<16>)(vco >> 16);
The right code snippet is:
ap_uint<32> vco;
static ap_uint<32> out_reg; | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum output fre... |
The right code snippet is:
ap_uint<32> vco;
static ap_uint<32> out_reg; | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Mi... |
The wrong part of the code is:
ap_uint<16> vco_l;
ap_uint<16> vco_h;
static ap_uint<32> out_reg;
vco_l = (ap_uint<16>)vco;
vco_h = (ap_uint<16>)(vco >> 16);
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency i... |
The wrong part of the code is:
ap_uint<16> vco_l;
ap_uint<16> vco_h;
static ap_uint<32> out_reg;
vco_l = (ap_uint<16>)vco;
vco_h = (ap_uint<16>)(vco >> 16);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
ap_uint<32> vco;
static ap_uint<32> out_reg; | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum outpu... |
The wrong part of the code is:
#pragma HLS array_partition variable=n cyclic factor=2
The right code snippet is:
#pragma HLS array_partition variable=n complete | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Minimum output fre... |
The right code snippet is:
#pragma HLS array_partition variable=n 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:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency in MHz
const int F_OUT_MIN = 10; // Mi... |
The wrong part of the code is:
#pragma HLS array_partition variable=n cyclic factor=2
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
const int F_REF = 10; // Reference clock frequency in MHz
const int F_OUT_MAX = 1000; // Maximum output frequency i... |
The wrong part of the code is:
#pragma HLS array_partition variable=n cyclic factor=2
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=n complete | 'APT' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.