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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// code block to be executed
}
The right code snippet is:
for (int i = 0; i < n; i++) {
// code block to be executed
} | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_none... |
The right code snippet is:
for (int i = 0; i < n; i++) {
// code block to be executed
} | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS I... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// code block to be executed
}
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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTER... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// code block to be executed
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
for (int i = 0; i < n; i++) {
// code block to be executed
} | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
const ap_int<16>& addra,
const ap_int<16>& addrb,
The right code snippet is:
const ap_uint<16>& addra,
const ap_uint<16>& addrb, | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_none... |
The right code snippet is:
const ap_uint<16>& addra,
const ap_uint<16>& addrb, | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS I... |
The wrong part of the code is:
const ap_int<16>& addra,
const ap_int<16>& addrb,
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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTER... |
The wrong part of the code is:
const ap_int<16>& addra,
const ap_int<16>& addrb,
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
const ap_uint<16>& addra,
const ap_uint<16>& addrb, | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
for (int i = 0; i < n; i+=2) {
// code block to be executed
}
The right code snippet is:
for (int i = 0; i < n; i++) {
// code block to be executed
} | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_none... |
The right code snippet is:
for (int i = 0; i < n; i++) {
// code block to be executed
} | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS I... |
The wrong part of the code is:
for (int i = 0; i < n; i+=2) {
// code block to be executed
}
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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTER... |
The wrong part of the code is:
for (int i = 0; i < n; i+=2) {
// code block to be executed
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < n; i++) {
// code block to be executed
} | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
mem_t memory[65536] = {0};
The right code snippet is:
mem_t memory[65536]; | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_none... |
The right code snippet is:
mem_t memory[65536]; | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS I... |
The wrong part of the code is:
mem_t memory[65536] = {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_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTER... |
The wrong part of the code is:
mem_t memory[65536] = {0};
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
mem_t memory[65536]; | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap... |
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_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_none... |
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_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS I... |
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_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTER... |
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_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=2 dim=1 | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_none... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=2 dim=1 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=2 dim=1 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=5 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=2 dim=1 | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_none... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=2 dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=5 dim=1
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=5 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=2 dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=2 dim=2
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=2 dim=1 | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_none... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=2 dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=memory cyclic factor=2 dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS DATAFLOW 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 ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_none... |
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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS DATAFLOW 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 ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS DATAFLOW 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 ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_vld port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=addra
The right code snippet is:
#pragma HLS INTERFACE ap_none port=addra | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_vld port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_none ... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=addra | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_vld port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS IN... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=addra
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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_vld port=addra
#pragma HLS INTERF... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=addra
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=addra | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=memory random
The right code snippet is:
#pragma HLS INTERFACE m_axi port=memory | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_none... |
The right code snippet is:
#pragma HLS INTERFACE m_axi port=memory | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=memory random
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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=memory random
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS INTERFACE m_axi port=memory | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE br... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=dina
The right code snippet is:
#pragma HLS INTERFACE ap_none port=dina | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE bram po... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=dina | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=dina
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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=dina
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=dina | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_array port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE a... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_array port=addra
The right code snippet is:
#pragma HLS INTERFACE ap_none port=addra | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_array port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_non... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=addra | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_array port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_array port=addra
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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_array port=addra
#pragma HLS INTE... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_array port=addra
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=addra | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap... |
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_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_none... |
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_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS I... |
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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#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 ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS UNROLL factor=1
The right code snippet is:
#pragma HLS UNROLL factor=2 | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS INTERFACE ap_none... |
The right code snippet is:
#pragma HLS UNROLL factor=2 | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none port=addrb
#pragma HLS I... |
The wrong part of the code is:
#pragma HLS UNROLL factor=1
The high-level-synthesis bug type of the code is: 'ILNU' | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS UNROLL factor=1
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
#pragma HLS UNROLL factor=2 | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << (i+1)));
}
out = result;
}
|
The wrong part of the code is:
result += (B[i] * (A << (i+1)));
The right code snippet is:
result += (B[i] * (A << i)); | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << (i+1)));
}
out = result;
}
The wrong part of... |
The right code snippet is:
result += (B[i] * (A << i)); | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << (i+1)));
}
out = result;
}
|
The wrong part of the code is:
result += (B[i] * (A << (i+1)));
The high-level-synthesis bug type of the code is: OOB | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A <<... |
The wrong part of the code is:
result += (B[i] * (A << (i+1)));
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
result += (B[i] * (A << i)); | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
int result;
The right code snippet is:
int result = 0; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
The wrong part of the cod... |
The right code snippet is:
int result = 0; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
int result;
The high-level-synthesis bug type of the code is: INIT | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i))... |
The wrong part of the code is:
int result;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
int result = 0; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << 10));
}
out = result;
}
|
The wrong part of the code is:
result += (B[i] * (A << 10));
The right code snippet is:
result += (B[i] * (A << i)); | SHFT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << 10));
}
out = result;
}
The wrong part of th... |
The right code snippet is:
result += (B[i] * (A << i)); | SHFT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << 10));
}
out = result;
}
|
The wrong part of the code is:
result += (B[i] * (A << 10));
The high-level-synthesis bug type of the code is: SHFT | SHFT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A <<... |
The wrong part of the code is:
result += (B[i] * (A << 10));
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
result += (B[i] * (A << i)); | SHFT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; ; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
for (int i = 0; ; i++) {
The right code snippet is:
for (int i = 0; i < 4; i++) { | INF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; ; i++) {
result += (B[i] * (A << i));
}
out = result;
}
The wrong part of the code... |
The right code snippet is:
for (int i = 0; i < 4; i++) { | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; ; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
for (int 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:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; ; i++) {
result += (B[i] * (A << i));... |
The wrong part of the code is:
for (int i = 0; ; i++) {
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
for (int i = 0; i < 4; i++) { | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
unsigned int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
unsigned int result = 0;
The right code snippet is:
int result = 0; | USE |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
unsigned int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
The wrong pa... |
The right code snippet is:
int result = 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:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
unsigned int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
... |
The wrong part of the code is:
unsigned int result = 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:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
unsigned int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i... |
The wrong part of the code is:
unsigned int result = 0;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
int result = 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:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 2; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
for (int i = 0; i < 2; i++) {
The right code snippet is:
for (int i = 0; i < 4; i++) { | MLU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 2; i++) {
result += (B[i] * (A << i));
}
out = result;
}
The wrong part of the... |
The right code snippet is:
for (int i = 0; i < 4; i++) { | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 2; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
for (int i = 0; i < 2; i++) {
The high-level-synthesis bug type of the code is: MLU | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 2; i++) {
result += (B[i] * (A <<... |
The wrong part of the code is:
for (int i = 0; i < 2; i++) {
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
for (int i = 0; i < 4; i++) { | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 1;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
int result = 1;
The right code snippet is:
int result = 0; | ZERO |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 1;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
The wrong part of the... |
The right code snippet is:
int result = 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:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 1;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
int result = 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:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 1;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A <<... |
The wrong part of the code is:
int result = 1;
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
int result = 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:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 4; i < 8; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
for (int i = 4; i < 8; i++) {
The right code snippet is:
for (int i = 0; i < 4; i++) { | BUF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 4; i < 8; i++) {
result += (B[i] * (A << i));
}
out = result;
}
The wrong part of the... |
The right code snippet is:
for (int i = 0; i < 4; i++) { | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 4; i < 8; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
for (int i = 4; i < 8; i++) {
The high-level-synthesis bug type of the code is: BUF | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 4; i < 8; i++) {
result += (B[i] * (A <<... |
The wrong part of the code is:
for (int i = 4; i < 8; i++) {
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
for (int i = 0; i < 4; i++) { | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
#pragma HLS array_partition variable=A block factor=2 dim=1
The right code snippet is:
#pragma HLS array_partition variable=A cyclic factor=2 dim=1 | APT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
The wrong part of the... |
The right code snippet is:
#pragma HLS array_partition variable=A cyclic factor=2 dim=1 | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
#pragma HLS array_partition variable=A block factor=2 dim=1
The high-level-synthesis bug type of the code is: APT | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A <<... |
The wrong part of the code is:
#pragma HLS array_partition variable=A block factor=2 dim=1
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pragma HLS array_partition variable=A cyclic factor=2 dim=1 | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS array_partition variable=A cyclic factor=2 dim=1 | FND |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
The wrong part of the... |
The right code snippet is:
#pragma HLS array_partition variable=A cyclic factor=2 dim=1 | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A << i));
}
out = result;
}
|
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: FND | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
void four_bit_multiplier(int A[4], int B[4], int out[8]) {
int result = 0;
for (int i = 0; i < 4; i++) {
result += (B[i] * (A <<... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS array_partition variable=A cyclic factor=2 dim=1 | FND |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.