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=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=write_en #pragma HLS INTER...
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=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=write_en #pragma HLS INTERFACE ...
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=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=write_en #pragm...
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=rst #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS I...
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: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: gray(8, 2) = bin(7, 1) ^ bin(8, 2); The right code snippet is: gray(7, 1) = bin(6, 0) ^ bin(7, 1);
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: gray(7, 1) = bin(6, 0) ^ bin(7, 1);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: gray(8, 2) = bin(7, 1) ^ bin(8, 2); The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=bin #pragma HLS INTERFA...
The wrong part of the code is: gray(8, 2) = bin(7, 1) ^ bin(8, 2); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: gray(7, 1) = bin(6, 0) ^ bin(7, 1);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // uninitialized variable The right code snippet is: gray = 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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: gray = 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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // uninitialized variable 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // uninitialized variable The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: gray = 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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: gray(7, 1) = bin(6, 0) << bin(7, 1); The right code snippet is: gray(7, 1) = bin(6, 0) ^ bin(7, 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 ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: gray(7, 1) = bin(6, 0) ^ bin(7, 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 ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: gray(7, 1) = bin(6, 0) << bin(7, 1); The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=bin #pragma HLS INTERFA...
The wrong part of the code is: gray(7, 1) = bin(6, 0) << bin(7, 1); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: gray(7, 1) = bin(6, 0) ^ bin(7, 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 ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // incorrect loop termination The right code snippet is: if (reset) {
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: if (reset) {
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // incorrect loop termination 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // incorrect loop termination The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (reset) {
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: gray[0] = (signed)bin[0] ^ bin[1]; The right code snippet is: gray[0] = bin[0] ^ bin[1];
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: gray[0] = bin[0] ^ bin[1];
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: gray[0] = (signed)bin[0] ^ bin[1]; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=bin #pragma HLS INTERFA...
The wrong part of the code is: gray[0] = (signed)bin[0] ^ bin[1]; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: gray[0] = bin[0] ^ bin[1];
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // manual loop unrolling with wrong loop count The right code snippet is: // manual loop unrolling not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: // manual loop unrolling not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // manual loop unrolling with wrong loop count 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // manual loop unrolling with wrong loop count The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: // manual loop unrolling not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: gray = 1; The right code snippet is: gray = 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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: gray = 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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: gray = 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=bin #pragma HLS INTERFA...
The wrong part of the code is: gray = 1; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: gray = 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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // copying from the wrong half of a split buffer The right code snippet is: // split buffer not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: // split buffer not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // copying from the wrong half of a split buffer 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // copying from the wrong half of a split buffer The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: // split buffer not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // pragma HLS array_partition with wrong type The right code snippet is: // pragma HLS array_partition type error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: // pragma HLS array_partition type error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // pragma HLS array_partition with wrong type 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // pragma HLS array_partition with wrong type The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: // pragma HLS array_partition type error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // pragma HLS array_partition with factor not divisible error The right code snippet is: // pragma HLS array_partition factor not divisible error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: // pragma HLS array_partition factor not divisible error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // pragma HLS array_partition with factor not divisible error 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // pragma HLS array_partition with factor not divisible error The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: // pragma HLS array_partition factor not divisible error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // pragma HLS array_partition with dim error The right code snippet is: // pragma HLS array_partition dim error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: // pragma HLS array_partition dim error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // pragma HLS array_partition with dim error 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // pragma HLS array_partition with dim error The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: // pragma HLS array_partition dim error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // pragma HLS dataflow with wrong position The right code snippet is: // pragma HLS dataflow position error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: // pragma HLS dataflow position error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // pragma HLS dataflow with wrong position 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // pragma HLS dataflow with wrong position The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: // pragma HLS dataflow position error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // pragma HLS interface with incorrect data access pattern error The right code snippet is: // pragma HLS interface incorrect data access pattern error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: // pragma HLS interface incorrect data access pattern error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // pragma HLS interface with incorrect data access pattern error 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // pragma HLS interface with incorrect data access pattern error The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: // pragma HLS interface incorrect data access pattern error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // pragma HLS interface m_axi access is random error The right code snippet is: // pragma HLS interface m_axi access not random error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: // pragma HLS interface m_axi access not random error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // pragma HLS interface m_axi access is random error 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // pragma HLS interface m_axi access is random error The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: // pragma HLS interface m_axi access not random error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // pragma HLS interface scalar values mapped to array interface The right code snippet is: // pragma HLS interface scalar values not mapped to array interface error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: // pragma HLS interface scalar values not mapped to array interface error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // pragma HLS interface scalar values mapped to array interface 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // pragma HLS interface scalar values mapped to array interface The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: // pragma HLS interface scalar values not mapped to array interface error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // pragma HLS interface array values mapped to scalar interface The right code snippet is: // pragma HLS interface array values not mapped to scalar interface error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: // pragma HLS interface array values not mapped to scalar interface error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // pragma HLS interface array values mapped to scalar interface 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // pragma HLS interface array values mapped to scalar interface The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: // pragma HLS interface array values not mapped to scalar interface error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // pragma HLS pipeline with wrong level of pipelining The right code snippet is: // pragma HLS pipeline multi-level pipelining not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: // pragma HLS pipeline multi-level pipelining not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // pragma HLS pipeline with wrong level of pipelining 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // pragma HLS pipeline with wrong level of pipelining The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: // pragma HLS pipeline multi-level pipelining not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool c...
The wrong part of the code is: // pragma HLS unroll inner loops not fully unrolled error present with wrong loop count. The right code snippet is: // pragma HLS unroll inner loops not fully unrolled error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_gray(bool clk, b...
The right code snippet is: // pragma HLS unroll inner loops not fully unrolled error not present
'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=bin #pragma HLS INTERFACE ap_none port=gray void binary_to_...
The wrong part of the code is: // pragma HLS unroll inner loops not fully unrolled error present with wrong loop count. 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=bin #pragma HLS INTERFA...
The wrong part of the code is: // pragma HLS unroll inner loops not fully unrolled error present with wrong loop count. The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: // pragma HLS unroll inner loops not fully unrolled error not present
'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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: final_output = count | seg_display(8, 1); The right code snippet is: final_output = count | seg_display;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: final_output = count | seg_display;
'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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: final_output = count | seg_display(8, 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: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: final_output = count | seg_display(8, 1); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: final_output = count | seg_display;
'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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: ap_uint<4> count_reg; The right code snippet is: static ap_uint<4> count_reg = 0;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: static ap_uint<4> count_reg = 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: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: ap_uint<4> count_reg; 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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: ap_uint<4> count_reg; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<4> count_reg = 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: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: final_output = count << 8 | seg_display; The right code snippet is: final_output = count | seg_display;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: final_output = count | seg_display;
'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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: final_output = count << 8 | seg_display; 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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: final_output = count << 8 | seg_display; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: final_output = count | seg_display;
'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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: if (rst) { while(1) { count_reg = 0; } } The right code snippet is: if (rst) { count_reg = 0; }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: if (rst) { count_reg = 0; }
'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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: if (rst) { while(1) { count_reg = 0; } } 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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: if (rst) { while(1) { count_reg = 0; } } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (rst) { count_reg = 0; }
'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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: final_output = (signed int)count | (signed int)seg_display; The right code snippet is: final_output = count | seg_display;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
The right code snippet is: final_output = count | seg_display;
'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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: final_output = (signed int)count | (signed int)seg_display; 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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: final_output = (signed int)count | (signed int)seg_display; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: final_output = count | seg_display;
'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_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=r...
The wrong part of the code is: for (int i = 0; i < 4; i++) { final_output[i] = count[i] | seg_display[i]; } The right code snippet is: None
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=rst ...
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 <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_...
The wrong part of the code is: for (int i = 0; i < 4; i++) { final_output[i] = count[i] | seg_display[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: ``` #include <ap_fixed.h> void up_down_counter(bool rst, bool up_down, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port...
The wrong part of the code is: for (int i = 0; i < 4; i++) { final_output[i] = count[i] | seg_display[i]; } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: None
'MLU'