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_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
static uint4_t Q;
The right code snippet is:
static uint4_t Q = 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 ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
static uint4_t Q = 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 ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
static uint4_t Q;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
static uint4_t Q;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static uint4_t Q = 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 ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
shift_register(shifted_Q, Q << 5, reset, SER);
The right code snippet is:
shift_register(shifted_Q, Q, reset, SER); | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
shift_register(shifted_Q, Q, reset, SER); | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
shift_register(shifted_Q, Q << 5, reset, SER);
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
shift_register(shifted_Q, Q << 5, reset, SER);
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
shift_register(shifted_Q, Q, reset, SER); | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
while(0) {
// code to be executed infinitely
}
The right code snippet is:
while(1) {
// code to be executed infinitely
} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
while(1) {
// code to be executed infinitely
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
while(0) {
// code to be executed infinitely
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
while(0) {
// code to be executed infinitely
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
while(1) {
// code to be executed infinitely
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
int8_t A;
The right code snippet is:
uint4_t A; | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
uint4_t A; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
int8_t A;
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
int8_t A;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
uint4_t A; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
// code to be unrolled
}
The right code snippet is:
for (int i = 0; i < 4; i++) {
// code to be unrolled
} | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
for (int i = 0; i < 4; i++) {
// code to be unrolled
} | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
// code to be unrolled
}
The high-level-synthesis bug type of the code is: 'MLU' | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
for (int i = 0; i < 3; i++) {
// code to be unrolled
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < 4; i++) {
// code to be unrolled
} | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
static uint4_t Q = 1;
The right code snippet is:
static uint4_t Q = 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 ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
static uint4_t Q = 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 ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
static uint4_t Q = 1;
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
static uint4_t Q = 1;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static uint4_t Q = 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 ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
memcpy(buffer_1, buffer_2 + 1, sizeof(buffer_1));
The right code snippet is:
memcpy(buffer_1, buffer_2, sizeof(buffer_1)); | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
memcpy(buffer_1, buffer_2, sizeof(buffer_1)); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
memcpy(buffer_1, buffer_2 + 1, sizeof(buffer_1));
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
memcpy(buffer_1, buffer_2 + 1, sizeof(buffer_1));
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
memcpy(buffer_1, buffer_2, sizeof(buffer_1)); | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer_1 cyclic dim=0
The right code snippet is:
#pragma HLS array_partition variable=buffer_1 complete dim=0 | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
#pragma HLS array_partition variable=buffer_1 complete dim=0 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer_1 cyclic dim=0
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer_1 cyclic dim=0
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=buffer_1 complete dim=0 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer_1 complete factor=3 dim=0
The right code snippet is:
#pragma HLS array_partition variable=buffer_1 complete dim=0 | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
#pragma HLS array_partition variable=buffer_1 complete dim=0 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer_1 complete factor=3 dim=0
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer_1 complete factor=3 dim=0
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=buffer_1 complete dim=0 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer_1 cyclic dim=1
The right code snippet is:
#pragma HLS array_partition variable=buffer_1 complete dim=0 | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
#pragma HLS array_partition variable=buffer_1 complete dim=0 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer_1 cyclic dim=1
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS array_partition variable=buffer_1 cyclic dim=1
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=buffer_1 complete dim=0 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
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_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
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_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
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_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=buffer_1
The right code snippet is:
#pragma HLS interface ap_none port=buffer_1 | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
#pragma HLS interface ap_none port=buffer_1 | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=buffer_1
The high-level-synthesis bug type of the code is: 'IDAP' | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=buffer_1
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface ap_none port=buffer_1 | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
#pragma HLS interface m_axi port=buffer_1 offset=slave
The right code snippet is:
#pragma HLS interface m_axi port=buffer_1 | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
#pragma HLS interface m_axi port=buffer_1 | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS interface m_axi port=buffer_1 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_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS interface m_axi port=buffer_1 offset=slave
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi port=buffer_1 | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=buffer_1
The right code snippet is:
#pragma HLS interface ap_none port=buffer_1 | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
#pragma HLS interface ap_none port=buffer_1 | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=buffer_1
The high-level-synthesis bug type of the code is: 'SMA' | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=buffer_1
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface ap_none port=buffer_1 | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
#pragma HLS interface ap_none port=buffer_1
The right code snippet is:
#pragma HLS interface ap_memory port=buffer_1 | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
#pragma HLS interface ap_memory port=buffer_1 | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS interface ap_none port=buffer_1
The high-level-synthesis bug type of the code is: 'AMS' | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS interface ap_none port=buffer_1
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface ap_memory port=buffer_1 | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
#pragma HLS pipeline | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
#pragma HLS pipeline | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP' | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
#pragma HLS pipeline | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none ... |
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 ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFACE ap_none port=... |
The right code snippet is:
#pragma HLS unroll | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFACE ap_none port=A
#pragma HLS INTERFA... |
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 ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=reset
#pragma HLS INTERFACE ap_none port=SER
#pragma HLS INTERFA... |
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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hl... |
The wrong part of the code is:
state = (input, state(5, 1), 0);
The right code snippet is:
state = (input, state(4, 1), 0); | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hls::st... |
The right code snippet is:
state = (input, state(4, 1), 0); | '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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state... |
The wrong part of the code is:
state = (input, state(5, 1), 0);
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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; /... |
The wrong part of the code is:
state = (input, state(5, 1), 0);
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
state = (input, state(4, 1), 0); | '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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hl... |
The wrong part of the code is:
static int state; // one-hot encoded state variables
The right code snippet is:
static int state = 0b00001; // one-hot encoded state variables | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hls::st... |
The right code snippet is:
static int state = 0b00001; // one-hot encoded state variables | '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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state... |
The wrong part of the code is:
static int state; // one-hot encoded state variables
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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; /... |
The wrong part of the code is:
static int state; // one-hot encoded state variables
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static int state = 0b00001; // one-hot encoded state variables | '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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hl... |
The wrong part of the code is:
state = (input, state(8, 1), 0);
The right code snippet is:
state = (input, state(4, 1), 0); | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hls::st... |
The right code snippet is:
state = (input, state(4, 1), 0); | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state... |
The wrong part of the code is:
state = (input, state(8, 1), 0);
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; /... |
The wrong part of the code is:
state = (input, state(8, 1), 0);
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
state = (input, state(4, 1), 0); | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hl... |
The wrong part of the code is:
default:
state = 0b00010;
break;
The right code snippet is:
default:
state = 0b00001;
break; | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hls::st... |
The right code snippet is:
default:
state = 0b00001;
break; | '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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state... |
The wrong part of the code is:
default:
state = 0b00010;
break;
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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; /... |
The wrong part of the code is:
default:
state = 0b00010;
break;
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
default:
state = 0b00001;
break; | '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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hl... |
The wrong part of the code is:
unsigned int input = in.read();
The right code snippet is:
int input = in.read(); | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hls::st... |
The right code snippet is:
int input = in.read(); | '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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state... |
The wrong part of the code is:
unsigned int input = in.read();
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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; /... |
The wrong part of the code is:
unsigned int input = in.read();
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
int input = in.read(); | '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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hl... |
The wrong part of the code is:
for(int i=0; i<5; i+=2) {
switch(state(i, i+1)) {
case 0b01:
state(i, i+1) = (input, 0);
break;
case 0b10:
state(i, i+1) = (0, input);
break;
case 0b11:
state(i, i+1) = (input, input);
... | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hls::st... |
The right code snippet is:
None | '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:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state... |
The wrong part of the code is:
for(int i=0; i<5; i+=2) {
switch(state(i, i+1)) {
case 0b01:
state(i, i+1) = (input, 0);
break;
case 0b10:
state(i, i+1) = (0, input);
break;
case 0b11:
state(i, i+1) = (input, input);
... | '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:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; /... |
The wrong part of the code is:
for(int i=0; i<5; i+=2) {
switch(state(i, i+1)) {
case 0b01:
state(i, i+1) = (input, 0);
break;
case 0b10:
state(i, i+1) = (0, input);
break;
case 0b11:
state(i, i+1) = (input, input);
... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hl... |
The wrong part of the code is:
static int state = 0;
The right code snippet is:
static int state = 0b00001; // one-hot encoded state variables | 'ZERO' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hls::st... |
The right code snippet is:
static int state = 0b00001; // one-hot encoded state variables | '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:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state... |
The wrong part of the code is:
static int state = 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:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; /... |
The wrong part of the code is:
static int state = 0;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static int state = 0b00001; // one-hot encoded state variables | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hl... |
The wrong part of the code is:
int buffer[5] = {0};
for(int i=0; i<5; i++) {
buffer[i] = in.read();
}
state = (buffer[0], buffer[1], buffer[2], buffer[3], buffer[4]);
The right code snippet is:
None | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state_machine(hls::st... |
The right code snippet is:
None | '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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; // number of states
void onehot_state... |
The wrong part of the code is:
int buffer[5] = {0};
for(int i=0; i<5; i++) {
buffer[i] = in.read();
}
state = (buffer[0], buffer[1], buffer[2], buffer[3], buffer[4]);
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 <hls_stream.h>
const int n = 4; // number of input signals
const int m = 2; // number of output signals
const int s = 5; /... |
The wrong part of the code is:
int buffer[5] = {0};
for(int i=0; i<5; i++) {
buffer[i] = in.read();
}
state = (buffer[0], buffer[1], buffer[2], buffer[3], buffer[4]);
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
None | 'BUF' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.