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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: char sub, bool &carry) { The right code snippet is: bool sub, bool &carry) {
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none port=ca...
The right code snippet is: bool sub, bool &carry) {
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE...
The wrong part of the code is: char sub, bool &carry) { 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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE a...
The wrong part of the code is: char sub, bool &carry) { The high-level-synthesis bug type of the code is: USE The right code snippet is: bool sub, bool &carry) {
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: void ripple_addsub(int A[1], int B[1], bool sub, int &sum, bool &carry) { The right code snippet is: void ripple_addsub(int A, int B, bool sub, int &sum, bool &carry) {
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none port=ca...
The right code snippet is: void ripple_addsub(int A, int B, bool sub, int &sum, bool &carry) {
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE...
The wrong part of the code is: void ripple_addsub(int A[1], int B[1], bool sub, int &sum, bool &carry) { 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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE a...
The wrong part of the code is: void ripple_addsub(int A[1], int B[1], bool sub, int &sum, bool &carry) { The high-level-synthesis bug type of the code is: SMA The right code snippet is: void ripple_addsub(int A, int B, bool sub, int &sum, bool &carry) {
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 m_axi port=A #pragma HLS INTERFACE m_axi port=B #pragma HLS INTERFACE m_axi port=sub #pragma HLS INTERFACE m_axi port=sum #pragma HLS INTERFACE m_axi port=carry ...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A #pragma HLS INTERFACE m_axi port=B #pragma HLS INTERFACE m_axi port=sub #pragma HLS INTERFACE m_axi port=sum #pragma HLS INTERFACE m_axi port=carry The right code snippet is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_...
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 m_axi port=A #pragma HLS INTERFACE m_axi port=B #pragma HLS INTERFACE m_axi port=sub #pragma HLS INTERFACE m_axi port=sum #pragma HLS INTERFACE m_axi port=carry void ...
The right code snippet is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none port=carry
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 m_axi port=A #pragma HLS INTERFACE m_axi port=B #pragma HLS INTERFACE m_axi port=sub #pragma HLS INTERFACE m_axi port=sum #pragma HLS INTERFACE m_axi p...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A #pragma HLS INTERFACE m_axi port=B #pragma HLS INTERFACE m_axi port=sub #pragma HLS INTERFACE m_axi port=sum #pragma HLS INTERFACE m_axi port=carry 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 m_axi port=A #pragma HLS INTERFACE m_axi port=B #pragma HLS INTERFACE m_axi port=sub #pragma HLS INTERFACE m_axi p...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=A #pragma HLS INTERFACE m_axi port=B #pragma HLS INTERFACE m_axi port=sub #pragma HLS INTERFACE m_axi port=sum #pragma HLS INTERFACE m_axi port=carry The high-level-synthesis bug type of the code is: RAMB The right code snippet is: #pr...
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: #pragma HLS unroll factor=2 for(int i = 0; i < 4; i++) { sum = A + B; } The right code snippet is: sum = A + B;
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none port=ca...
The right code snippet is: sum = 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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS unroll factor=2 for(int i = 0; i < 4; i++) { sum = A + B; } 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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS unroll factor=2 for(int i = 0; i < 4; i++) { sum = A + B; } The high-level-synthesis bug type of the code is: MLU The right code snippet is: sum = 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: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none port=ca...
The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=3 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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=3 The high-level-synthesis bug type of the code is: DID The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: #pragma HLS interface ap_fifo port=A #pragma HLS interface ap_fifo port=B #pragma HLS interface ap_fifo port=sub #pragma HLS interface ap_fifo port=sum #pragma HLS interface ap_fifo port=carry void ripple_addsub(int A, int B, bool sub, int &sum, bool &carry) { The right code ...
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none port=ca...
The right code snippet is: void ripple_addsub(int A, int B, bool sub, int &sum, bool &carry) {
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS interface ap_fifo port=A #pragma HLS interface ap_fifo port=B #pragma HLS interface ap_fifo port=sub #pragma HLS interface ap_fifo port=sum #pragma HLS interface ap_fifo port=carry void ripple_addsub(int A, int B, bool sub, int &sum, bool &carry) { The high-level-...
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS interface ap_fifo port=A #pragma HLS interface ap_fifo port=B #pragma HLS interface ap_fifo port=sub #pragma HLS interface ap_fifo port=sum #pragma HLS interface ap_fifo port=carry void ripple_addsub(int A, int B, bool sub, int &sum, bool &carry) { The high-level-...
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none port=ca...
The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=3 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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=A cyclic factor=3 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
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: carry = (sum >> 8) & 1; The right code snippet is: carry = (sum >> 3) & 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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none port=ca...
The right code snippet is: carry = (sum >> 3) & 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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE...
The wrong part of the code is: carry = (sum >> 8) & 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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE a...
The wrong part of the code is: carry = (sum >> 8) & 1; The high-level-synthesis bug type of the code is: SHFT The right code snippet is: carry = (sum >> 3) & 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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: void ripple_addsub(int A[16], int B[16], bool sub, int &sum, bool &carry) { The right code snippet is: void ripple_addsub(int A, int B, bool sub, int &sum, bool &carry) {
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none port=ca...
The right code snippet is: void ripple_addsub(int A, int B, bool sub, int &sum, bool &carry) {
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE...
The wrong part of the code is: void ripple_addsub(int A[16], int B[16], bool sub, int &sum, bool &carry) { 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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE a...
The wrong part of the code is: void ripple_addsub(int A[16], int B[16], bool sub, int &sum, bool &carry) { The high-level-synthesis bug type of the code is: BUF The right code snippet is: void ripple_addsub(int A, int B, bool sub, int &sum, bool &carry) {
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: #pragma HLS array_partition variable=A block factor=2 The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none port=ca...
The right code snippet is: #pragma HLS array_partition variable=A cyclic factor=2
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS array_partition variable=A block factor=2 The high-level-synthesis bug type of the code is: APT
APT
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS array_partition variable=A block factor=2 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
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none po...
The wrong part of the code is: int &sum = 0; The right code snippet is: int &sum
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE ap_none port=ca...
The right code snippet is: int &sum
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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE ap_none port=sum #pragma HLS INTERFACE...
The wrong part of the code is: int &sum = 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_none port=A #pragma HLS INTERFACE ap_none port=B #pragma HLS INTERFACE ap_none port=sub #pragma HLS INTERFACE a...
The wrong part of the code is: int &sum = 0; The high-level-synthesis bug type of the code is: ZERO The right code snippet is: int &sum
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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency =...
The wrong part of the code is: static ap_uint<8> pwm_counter; static ap_uint<8> pwm_threshold; pwm_counter = 1; pwm_threshold = 1; The right code snippet is: static ap_uint<8> pwm_counter = 0; static ap_uint<8> pwm_threshold = 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_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 100;...
The right code snippet is: static ap_uint<8> pwm_counter = 0; static ap_uint<8> pwm_threshold = 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_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_...
The wrong part of the code is: static ap_uint<8> pwm_counter; static ap_uint<8> pwm_threshold; pwm_counter = 1; pwm_threshold = 1; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> p...
The wrong part of the code is: static ap_uint<8> pwm_counter; static ap_uint<8> pwm_threshold; pwm_counter = 1; pwm_threshold = 1; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<8> pwm_counter = 0; static ap_uint<8> pwm_threshold = 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_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency =...
The wrong part of the code is: pwm_threshold = pwm_width << 8; The right code snippet is: pwm_threshold = pwm_width / 8;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 100;...
The right code snippet is: pwm_threshold = pwm_width / 8;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_...
The wrong part of the code is: pwm_threshold = pwm_width << 8; The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> p...
The wrong part of the code is: pwm_threshold = pwm_width << 8; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: pwm_threshold = pwm_width / 8;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency =...
The wrong part of the code is: while(true){ pwm_out = 1; } The right code snippet is: if (pwm_counter >= pwm_threshold) { pwm_out = 1; } else { pwm_out = 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_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 100;...
The right code snippet is: if (pwm_counter >= pwm_threshold) { pwm_out = 1; } else { pwm_out = 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_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_...
The wrong part of the code is: while(true){ pwm_out = 1; } The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> p...
The wrong part of the code is: while(true){ pwm_out = 1; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (pwm_counter >= pwm_threshold) { pwm_out = 1; } else { pwm_out = 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_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency =...
The wrong part of the code is: ap_int<8> temp = pwm_counter + 1; pwm_counter = temp; The right code snippet is: pwm_counter = pwm_counter + 1;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 100;...
The right code snippet is: pwm_counter = pwm_counter + 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: #include <ap_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_...
The wrong part of the code is: ap_int<8> temp = pwm_counter + 1; pwm_counter = temp; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> p...
The wrong part of the code is: ap_int<8> temp = pwm_counter + 1; pwm_counter = temp; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: pwm_counter = pwm_counter + 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: #include <ap_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency =...
The wrong part of the code is: case 1: pwm_threshold = pwm_width / 2; break; The right code snippet is: case 1: pwm_threshold = pwm_width / 8; break;
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 100;...
The right code snippet is: case 1: pwm_threshold = pwm_width / 8; break;
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_...
The wrong part of the code is: case 1: pwm_threshold = pwm_width / 2; break; 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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> p...
The wrong part of the code is: case 1: pwm_threshold = pwm_width / 2; break; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: case 1: pwm_threshold = pwm_width / 8; break;
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency =...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=analog_signal #pragma HLS INTERFACE ap_fifo port=enable #pragma HLS INTERFACE ap_fifo port=reset #pragma HLS INTERFACE ap_fifo port=pwm_out The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal #pragma HLS I...
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 100;...
The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal #pragma HLS INTERFACE ap_none port=enable #pragma HLS INTERFACE ap_none port=reset #pragma HLS INTERFACE ap_none port=pwm_out
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=analog_signal #pragma HLS INTERFACE ap_fifo port=enable #pragma HLS INTERFACE ap_fifo port=reset #pragma HLS INTERFACE ap_fifo port=pwm_out 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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> p...
The wrong part of the code is: #pragma HLS INTERFACE ap_fifo port=analog_signal #pragma HLS INTERFACE ap_fifo port=enable #pragma HLS INTERFACE ap_fifo port=reset #pragma HLS INTERFACE ap_fifo port=pwm_out The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pra...
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency =...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=analog_signal cyclic factor=3 The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 100;...
The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=analog_signal cyclic factor=3 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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> p...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=analog_signal cyclic factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency =...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=analog_signal cyclic factor=5 dim=2 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=analog_signal cyclic factor=3
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 100;...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=analog_signal cyclic factor=3
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=analog_signal cyclic factor=5 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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> p...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=analog_signal cyclic factor=5 dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=analog_signal cyclic factor=3
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency =...
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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 100;...
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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_...
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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> p...
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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency =...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=analog_signal The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 100;...
The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=analog_signal 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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> p...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=analog_signal The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency =...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=analog_signal The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 100;...
The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=analog_signal 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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> p...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=analog_signal The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency =...
The wrong part of the code is: #pragma HLS INTERFACE bram port=analog_signal The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 100;...
The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_...
The wrong part of the code is: #pragma HLS INTERFACE bram port=analog_signal 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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> p...
The wrong part of the code is: #pragma HLS INTERFACE bram port=analog_signal The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS INTERFACE ap_none port=analog_signal
'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 LCB(ap_uint<1>[1] analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequenc...
The wrong part of the code is: ap_uint<1>[1] analog_signal The right code snippet is: ap_uint<1> analog_signal
'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 LCB(ap_uint<1>[1] analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 1...
The right code snippet is: ap_uint<1> analog_signal
'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 LCB(ap_uint<1>[1] analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> p...
The wrong part of the code is: ap_uint<1>[1] analog_signal 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 LCB(ap_uint<1>[1] analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8...
The wrong part of the code is: ap_uint<1>[1] analog_signal The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: ap_uint<1> analog_signal
'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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency =...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_frequency = 100;...
The right code snippet is: #pragma HLS pipeline
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_int.h> void LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> pwm_width = 8; const ap_uint<8> pwm_...
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 LCB(ap_uint<1> analog_signal, ap_uint<1> enable, ap_uint<1> reset, ap_uint<1> &pwm_out) { const ap_uint<8> p...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: #pragma HLS pipeline
'MLP'