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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: out = (in_1.range(4,0), in_1.range(99,5)) | (in_2.range(4,0), in_2.range(99,5)); #pragma HLS unroll factor=2 The right code snippet is: out = (in_1.range(4,0), in_1.range(99,5)) | (in_2.range(4,0), in_2.range(99,5));
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: out = (in_1.range(4,0), in_1.range(99,5)) | (in_2.range(4,0), in_2.range(99,5));
'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_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: out = (in_1.range(4,0), in_1.range(99,5)) | (in_2.range(4,0), in_2.range(99,5)); #pragma HLS unroll factor=2 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_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: out = (in_1.range(4,0), in_1.range(99,5)) | (in_2.range(4,0), in_2.range(99,5)); #pragma HLS unroll factor=2 The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: out = (in_1.range(4,0), in_1.range(99,5)) | (in_2.range(4,0), in_2.range(99,...
'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 <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: bool in = 0; The right code snippet is: bool in;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: bool in;
'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 <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: bool in = 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 <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: bool in = 0; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: bool in;
'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 <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: functional_module(in_1.range(49,0), in_2.range(49,0), functional_out); The right code snippet is: functional_module(in_1, in_2, functional_out);
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: functional_module(in_1, in_2, functional_out);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: functional_module(in_1.range(49,0), in_2.range(49,0), functional_out); The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: functional_module(in_1.range(49,0), in_2.range(49,0), functional_out); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: functional_module(in_1, in_2, functional_out);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: #pragma HLS array_partition variable=in_1 block factor=2 dim=1 The right code snippet is: #pragma HLS array_partition variable=in_1 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: #pragma HLS array_partition variable=in_1 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: #pragma HLS array_partition variable=in_1 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: #pragma HLS array_partition variable=in_1 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=in_1 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: #pragma HLS array_partition variable=in_1 cyclic factor=3 dim=1 The right code snippet is: #pragma HLS array_partition variable=in_1 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: #pragma HLS array_partition variable=in_1 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: #pragma HLS array_partition variable=in_1 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: #pragma HLS array_partition variable=in_1 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=in_1 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: #pragma HLS array_partition variable=in_1 cyclic factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=in_1 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: #pragma HLS array_partition variable=in_1 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: #pragma HLS array_partition variable=in_1 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: #pragma HLS array_partition variable=in_1 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=in_1 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: #pragma HLS dataflow pipeline 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: #pragma HLS dataflow pipeline 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: #pragma HLS dataflow pipeline 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: #pragma HLS interface ap_ctrl_hs port=return The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: #pragma HLS interface ap_ctrl_hs port=return 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: #pragma HLS interface ap_ctrl_hs port=return The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_ctrl_none port=return
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: #pragma HLS interface m_axi port=in_1 offset=unknown The right code snippet is: #pragma HLS interface m_axi port=in_1 offset=slave
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: #pragma HLS interface m_axi port=in_1 offset=slave
'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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: #pragma HLS interface m_axi port=in_1 offset=unknown 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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: #pragma HLS interface m_axi port=in_1 offset=unknown The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=in_1 offset=slave
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: #pragma HLS interface bram port=in_1 The right code snippet is: #pragma HLS interface axis port=in_1
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: #pragma HLS interface axis port=in_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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: #pragma HLS interface bram port=in_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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: #pragma HLS interface bram port=in_1 The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface axis port=in_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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
The wrong part of the code is: #pragma HLS interface ap_vld port=in_1 The right code snippet is: #pragma HLS interface ap_none port=in_1
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
The right code snippet is: #pragma HLS interface ap_none port=in_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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
The wrong part of the code is: #pragma HLS interface ap_vld port=in_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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
The wrong part of the code is: #pragma HLS interface ap_vld port=in_1 The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface ap_none port=in_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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) {...
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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<100> &out) { ...
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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<100> in_1, ap_uint<100> in_2, ap_uint<1...
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: ``` #include <ap_int.h> void buffer_module(bool in, ap_uint<1> &out) { out = (in) ? 0bZ : out; } void functional_module(ap_uint<10...
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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_clock #pragma HLS INTERFACE ap_none port=locked #pra...
The wrong part of the code is: wire reset_high; LUT1 mmcm_adv_inst_i_1(.I0(resetn), .O(reset_high)); reset_high = 1'b0; // uninitialized variable reset_high is assigned a value of 0 The right code snippet is: wire reset_high; LUT1 mmcm_adv_inst_i_1(.I0(resetn), .O(reset_high));
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_clock #pragma HLS INTERFACE ap_none port=locked #pragma H...
The right code snippet is: wire reset_high; LUT1 mmcm_adv_inst_i_1(.I0(resetn), .O(reset_high));
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_clock #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: wire reset_high; LUT1 mmcm_adv_inst_i_1(.I0(resetn), .O(reset_high)); reset_high = 1'b0; // uninitialized variable reset_high is assigned a value of 0 The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_cloc...
The wrong part of the code is: wire reset_high; LUT1 mmcm_adv_inst_i_1(.I0(resetn), .O(reset_high)); reset_high = 1'b0; // uninitialized variable reset_high is assigned a value of 0 The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: wire reset_high; LUT1 mmcm_adv_i...
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_clock #pragma HLS INTERFACE ap_none port=locked #pra...
The wrong part of the code is: while(1){ // some code // missing a break statement or condition for loop termination } The right code snippet is: while(1){ // some code }
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_clock #pragma HLS INTERFACE ap_none port=locked #pragma H...
The right code snippet is: while(1){ // some code }
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_clock #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: while(1){ // some code // missing a break statement or condition for 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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_cloc...
The wrong part of the code is: while(1){ // some code // missing a break statement or condition for loop termination } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: while(1){ // some code }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_clock #pragma HLS INTERFACE ap_none port=locked #pra...
The wrong part of the code is: BUFG clkout1_buf(.I(Main_clock_Clk_Wizard), .O(VGA_clock)); // copying from the wrong half of a split buffer BUFG clkout2_buf(.I(VGA_clock_Clk_Wizard), .O(Main_clock)); The right code snippet is: BUFG clkout1_buf(.I(VGA_clock_Clk_Wizard), .O(VGA_clock)); BUFG clkout2_buf(...
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_clock #pragma HLS INTERFACE ap_none port=locked #pragma H...
The right code snippet is: BUFG clkout1_buf(.I(VGA_clock_Clk_Wizard), .O(VGA_clock)); BUFG clkout2_buf(.I(Main_clock_Clk_Wizard), .O(Main_clock));
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_clock #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: BUFG clkout1_buf(.I(Main_clock_Clk_Wizard), .O(VGA_clock)); // copying from the wrong half of a split buffer BUFG clkout2_buf(.I(VGA_clock_Clk_Wizard), .O(Main_clock)); 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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_cloc...
The wrong part of the code is: BUFG clkout1_buf(.I(Main_clock_Clk_Wizard), .O(VGA_clock)); // copying from the wrong half of a split buffer BUFG clkout2_buf(.I(VGA_clock_Clk_Wizard), .O(Main_clock)); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: BUFG clkout1_buf...
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_clock #pragma HLS INTERFACE ap_none port=locked #pra...
The wrong part of the code is: #pragma HLS UNROLL factor=4 for(int i=0; i<16; i+=2){ // inner loop not fully unrolled // some code // missing unrolling for i+1 } The right code snippet is: #pragma HLS UNROLL factor=4 for(int i=0; i<16; i++){ // some code }
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_clock #pragma HLS INTERFACE ap_none port=locked #pragma H...
The right code snippet is: #pragma HLS UNROLL factor=4 for(int i=0; i<16; i++){ // some code }
'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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_clock #pragma HLS INTERFACE ap_none port=...
The wrong part of the code is: #pragma HLS UNROLL factor=4 for(int i=0; i<16; i+=2){ // inner loop not fully unrolled // some code // missing unrolling for i+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_ctrl_none port=return #pragma HLS INTERFACE ap_none port=VGA_clock #pragma HLS INTERFACE ap_none port=Main_cloc...
The wrong part of the code is: #pragma HLS UNROLL factor=4 for(int i=0; i<16; i+=2){ // inner loop not fully unrolled // some code // missing unrolling for i+1 } The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: #pragma HLS UNROLL factor=4 for(int i=0; i<16; i+...
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff = A - B + 1; // Accessing an out-of-bounds i...
The wrong part of the code is: ap_int<5> diff = A - B + 1; // Accessing an out-of-bounds index of the array by adding 1 to the result The right code snippet is: ap_int<5> diff = A - B;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff = A - B + 1; // Accessing an out-of-bounds index ...
The right code snippet is: ap_int<5> diff = A - B;
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff = A - B + 1; // Accessing an out-...
The wrong part of the code is: ap_int<5> diff = A - B + 1; // Accessing an out-of-bounds index of the array by adding 1 to the result 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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> di...
The wrong part of the code is: ap_int<5> diff = A - B + 1; // Accessing an out-of-bounds index of the array by adding 1 to the result The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: ap_int<5> diff = A - B;
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff; // Declaring the variable without initializ...
The wrong part of the code is: ap_int<5> diff; // Declaring the variable without initializing it The right code snippet is: ap_int<5> diff = A - B;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff; // Declaring the variable without initializing i...
The right code snippet is: ap_int<5> diff = A - B;
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff; // Declaring the variable withou...
The wrong part of the code is: ap_int<5> diff; // Declaring the variable without initializing it 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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> di...
The wrong part of the code is: ap_int<5> diff; // Declaring the variable without initializing it The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_int<5> diff = A - B;
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff = A - B; EQ = (diff == 0); GT = (dif...
The wrong part of the code is: EQ = (diff << 5 == 0); // Shifting the variable by an out-of-bounds amount The right code snippet is: EQ = (diff == 0); GT = (diff[4] == 0) && (diff != 0); LT = (diff[4] == 1);
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff = A - B; EQ = (diff == 0); GT = (diff[4] ...
The right code snippet is: EQ = (diff == 0); GT = (diff[4] == 0) && (diff != 0); LT = (diff[4] == 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: void magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff = A - B; EQ = (diff == 0); ...
The wrong part of the code is: EQ = (diff << 5 == 0); // Shifting the variable by an out-of-bounds amount 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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> di...
The wrong part of the code is: EQ = (diff << 5 == 0); // Shifting the variable by an out-of-bounds amount The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: EQ = (diff == 0); GT = (diff[4] == 0) && (diff != 0); LT = (diff[4] == 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: void magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { while (diff != 0) {} // Creating an infinite loop by not up...
The wrong part of the code is: while (diff != 0) {} // Creating an infinite loop by not updating the loop variable The right code snippet is: ap_int<5> diff = A - B;
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { while (diff != 0) {} // Creating an infinite loop by not updatin...
The right code snippet is: ap_int<5> diff = A - B;
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { while (diff != 0) {} // Creating an infinite loo...
The wrong part of the code is: while (diff != 0) {} // Creating an infinite loop by not updating the loop variable 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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { while (diff ...
The wrong part of the code is: while (diff != 0) {} // Creating an infinite loop by not updating the loop variable The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: ap_int<5> diff = A - B;
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { unsigned int diff_unsigned = diff; // Unintended sign exten...
The wrong part of the code is: unsigned int diff_unsigned = diff; // Unintended sign extension by converting a signed variable to an unsigned variable The right code snippet is: ap_int<5> diff = A - B;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { unsigned int diff_unsigned = diff; // Unintended sign extension ...
The right code snippet is: ap_int<5> diff = A - B;
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { unsigned int diff_unsigned = diff; // Unintended...
The wrong part of the code is: unsigned int diff_unsigned = diff; // Unintended sign extension by converting a signed variable to an unsigned variable 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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { unsigned int...
The wrong part of the code is: unsigned int diff_unsigned = diff; // Unintended sign extension by converting a signed variable to an unsigned variable The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_int<5> diff = A - B;
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff1 = A - B; ap_int<5> diff2 = A - B; ap_int<5> ...
The wrong part of the code is: ap_int<5> diff1 = A - B; ap_int<5> diff2 = A - B; ap_int<5> diff3 = A - B; // Errors in manual loop unrolling by not updating the loop variable The right code snippet is: ap_int<5> diff = A - B;
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff1 = A - B; ap_int<5> diff2 = A - B; ap_int<5> diff3...
The right code snippet is: ap_int<5> diff = A - B;
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff1 = A - B; ap_int<5> diff2 = A - B;...
The wrong part of the code is: ap_int<5> diff1 = A - B; ap_int<5> diff2 = A - B; ap_int<5> diff3 = A - B; // Errors in manual loop unrolling by not updating the loop variable 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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> di...
The wrong part of the code is: ap_int<5> diff1 = A - B; ap_int<5> diff2 = A - B; ap_int<5> diff3 = A - B; // Errors in manual loop unrolling by not updating the loop variable The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: ap_int<5> diff = A - B;
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff = 0; // Initializing the variable to zero in...
The wrong part of the code is: ap_int<5> diff = 0; // Initializing the variable to zero instead of a non-zero value The right code snippet is: ap_int<5> diff = A - B;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff = 0; // Initializing the variable to zero instead...
The right code snippet is: ap_int<5> diff = A - B;
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff = 0; // Initializing the variable...
The wrong part of the code is: ap_int<5> diff = 0; // Initializing the variable to zero instead of a non-zero value The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: void magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> di...
The wrong part of the code is: ap_int<5> diff = 0; // Initializing the variable to zero instead of a non-zero value The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: ap_int<5> diff = A - B;
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff = buf2[A] - buf1[B]; // Copying from the wro...
The wrong part of the code is: ap_int<5> diff = buf2[A] - buf1[B]; // Copying from the wrong half of a split buffer The right code snippet is: ap_int<5> diff = A - B;
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: void magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff = buf2[A] - buf1[B]; // Copying from the wrong ha...
The right code snippet is: ap_int<5> diff = A - B;
'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 magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> diff = buf2[A] - buf1[B]; // Copying f...
The wrong part of the code is: ap_int<5> diff = buf2[A] - buf1[B]; // 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: void magnitude_comparator_4bit ( ap_uint<4> A, ap_uint<4> B, ap_uint<1>& EQ, ap_uint<1>& GT, ap_uint<1>& LT ) { ap_int<5> di...
The wrong part of the code is: ap_int<5> diff = buf2[A] - buf1[B]; // 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: ap_int<5> diff = A - B;
'BUF'