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=in0 #pragma HLS INTERFACE ap_none port=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFACE ap_non...
The wrong part of the code is: #pragma HLS DATAFLOW The right code snippet is: N/A (no pragma found)
DFP
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_none port=in0 #pragma HLS INTERFACE ap_none port=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFACE ap_none por...
The right code snippet is: N/A (no pragma found)
DFP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_none port=in0 #pragma HLS INTERFACE ap_none port=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTER...
The wrong part of the code is: #pragma HLS DATAFLOW The high-level-synthesis bug type of the code is: DFP
DFP
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_none port=in0 #pragma HLS INTERFACE ap_none port=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFA...
The wrong part of the code is: #pragma HLS DATAFLOW The high-level-synthesis bug type of the code is: DFP The right code snippet is: N/A (no pragma found)
DFP
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_vld port=in0 #pragma HLS INTERFACE ap_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ap_vld port=in3 #pragma HLS INTERFACE ap_vld por...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=in0 #pragma HLS INTERFACE ap_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ap_vld port=in3 #pragma HLS INTERFACE ap_vld port=sel #pragma HLS INTERFACE ap_vld port=en #pragma HLS INTERFACE ap_vld port=out The right c...
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_vld port=in0 #pragma HLS INTERFACE ap_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ap_vld port=in3 #pragma HLS INTERFACE ap_vld port=sel...
The right code snippet is: #pragma HLS INTERFACE ap_none port=in0 #pragma HLS INTERFACE ap_none port=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFACE ap_none port=sel #pragma HLS INTERFACE ap_none port=en #pragma HLS INTERFACE ap_none port=out
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_vld port=in0 #pragma HLS INTERFACE ap_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ap_vld port=in3 #pragma HLS INTERFACE...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=in0 #pragma HLS INTERFACE ap_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ap_vld port=in3 #pragma HLS INTERFACE ap_vld port=sel #pragma HLS INTERFACE ap_vld port=en #pragma HLS INTERFACE ap_vld port=out The high-le...
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_vld port=in0 #pragma HLS INTERFACE ap_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=in0 #pragma HLS INTERFACE ap_vld port=in1 #pragma HLS INTERFACE ap_vld port=in2 #pragma HLS INTERFACE ap_vld port=in3 #pragma HLS INTERFACE ap_vld port=sel #pragma HLS INTERFACE ap_vld port=en #pragma HLS INTERFACE ap_vld port=out The high-le...
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 m_axi port=in0 #pragma HLS INTERFACE void mux_4to1_enable (int in0[4], int in1[4], int in2[4], int in3[4], int sel[2], int en, int out[4]) { int mux_out[4]; ...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=in0 #pragma HLS INTERFACE The right code snippet is: #pragma HLS INTERFACE ap_none port=in0 #pragma HLS INTERFACE ap_none port=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFACE ap_none ...
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=in0 #pragma HLS INTERFACE void mux_4to1_enable (int in0[4], int in1[4], int in2[4], int in3[4], int sel[2], int en, int out[4]) { int mux_out[4]; #prag...
The right code snippet is: #pragma HLS INTERFACE ap_none port=in0 #pragma HLS INTERFACE ap_none port=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFACE ap_none port=sel #pragma HLS INTERFACE ap_none port=en #pragma HLS INTERFACE ap_none port=out
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=in0 #pragma HLS INTERFACE void mux_4to1_enable (int in0[4], int in1[4], int in2[4], int in3[4], int sel[2], int en, int out[4]) { int mux...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=in0 #pragma HLS INTERFACE 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=in0 #pragma HLS INTERFACE void mux_4to1_enable (int in0[4], int in1[4], int in2[4], int in3[4], int se...
The wrong part of the code is: #pragma HLS INTERFACE m_axi port=in0 #pragma HLS INTERFACE The high-level-synthesis bug type of the code is: RAMB The right code snippet is: #pragma HLS INTERFACE ap_none port=in0 #pragma HLS INTERFACE ap_none port=in1 #pragma HLS INTERFACE ap_none port=in2 #pragma HL...
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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: register = (register << 20); The right code snippet is: register = (register << 1);
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: register = (register << 1);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: register = (register << 20); The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: register = (register << 20); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: register = (register << 1);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: static ap_uint<WIDTH> register; The right code snippet is: static ap_uint<WIDTH> register = 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: static ap_uint<WIDTH> register = 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: static ap_uint<WIDTH> register; 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: static ap_uint<WIDTH> register; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<WIDTH> register = 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: register = (register << 20); The right code snippet is: register = (register << 1);
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: register = (register << 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: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: register = (register << 20); 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: register = (register << 20); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: register = (register << 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: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: while(1); The right code snippet is: None
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: while(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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: while(1); The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: int8_t var = -1; register = (register << var); The right code snippet is: None
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: int8_t var = -1; register = (register << var); 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: int8_t var = -1; register = (register << var); The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: for (int i = 0; i < 5; i++) { register = (register << 1); } The right code snippet is: None
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: for (int i = 0; i < 5; i++) { register = (register << 1); } 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: for (int i = 0; i < 5; i++) { register = (register << 1); } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: static ap_uint<WIDTH> register; The right code snippet is: static ap_uint<WIDTH> register = 0;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: static ap_uint<WIDTH> register = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: static ap_uint<WIDTH> register; 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: static ap_uint<WIDTH> register; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static ap_uint<WIDTH> register = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: memcpy(&data_out, &data_in, sizeof(axis)); The right code snippet is: None
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: memcpy(&data_out, &data_in, sizeof(axis)); 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: memcpy(&data_out, &data_in, sizeof(axis)); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: #pragma HLS array_partition variable=register cyclic factor=3 dim=1 The right code snippet is: None
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: #pragma HLS array_partition variable=register cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: 'APT'
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: #pragma HLS array_partition variable=register cyclic factor=3 dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: #pragma HLS array_partition variable=register cyclic factor=7 dim=2 The right code snippet is: None
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: #pragma HLS array_partition variable=register cyclic factor=7 dim=2 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: #pragma HLS array_partition variable=register cyclic factor=7 dim=2 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: #pragma HLS array_partition variable=register cyclic factor=2 dim=3 The right code snippet is: None
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: #pragma HLS array_partition variable=register cyclic factor=2 dim=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: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: #pragma HLS array_partition variable=register cyclic factor=2 dim=3 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: #pragma HLS dataflow The right code snippet is: None
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: #pragma HLS dataflow 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: #pragma HLS dataflow The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: #pragma HLS interface ap_fifo port=data_out The right code snippet is: None
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: #pragma HLS interface ap_fifo port=data_out 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: #pragma HLS interface ap_fifo port=data_out The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: #pragma HLS interface m_axi port=data_out offset=slave The right code snippet is: None
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: #pragma HLS interface m_axi port=data_out offset=slave The high-level-synthesis bug type of the code is: 'RAMB'
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: #pragma HLS interface m_axi port=data_out offset=slave The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: #pragma HLS interface ap_memory port=data_out The right code snippet is: None
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: #pragma HLS interface ap_memory port=data_out 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: #pragma HLS interface ap_memory port=data_out The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: #pragma HLS interface ap_none port=data_out The right code snippet is: None
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: #pragma HLS interface ap_none port=data_out 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: #pragma HLS interface ap_none port=data_out The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: None
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
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: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDT...
The wrong part of the code is: #pragma HLS unroll partial(inner) The right code snippet is: None
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static ap_uint<WIDTH> re...
The right code snippet is: None
'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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, bool reset, bool load) { static a...
The wrong part of the code is: #pragma HLS unroll partial(inner) 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_axi_sdata.h> #define WIDTH 16 typedef ap_axis<WIDTH, 0, 0, 0> axis; void shift_register(axis &data_in, axis &data_out, b...
The wrong part of the code is: #pragma HLS unroll partial(inner) The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: None
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=tmp_ram_rd_en #pragm...
The wrong part of the code is: head_ptr = (head_ptr == MEM_DEPTH) ? 0 : head_ptr + 1; The right code snippet is: head_ptr = (head_ptr == MEM_DEPTH-1) ? 0 : head_ptr + 1;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=tmp_ram_rd_en #pragma HLS...
The right code snippet is: head_ptr = (head_ptr == MEM_DEPTH-1) ? 0 : head_ptr + 1;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=tmp_ram_r...
The wrong part of the code is: head_ptr = (head_ptr == MEM_DEPTH) ? 0 : head_ptr + 1; The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The wrong part of the code is: head_ptr = (head_ptr == MEM_DEPTH) ? 0 : head_ptr + 1; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: head_ptr = (head_ptr == MEM_DEPTH-1) ? 0 : head_ptr + 1;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=tmp_ram_rd_en #pragm...
The wrong part of the code is: ap_uint<ADDR_WIDTH> count; The right code snippet is: ap_uint<ADDR_WIDTH> count = 0;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=tmp_ram_rd_en #pragma HLS...
The right code snippet is: ap_uint<ADDR_WIDTH> count = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=tmp_ram_r...
The wrong part of the code is: ap_uint<ADDR_WIDTH> count; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The wrong part of the code is: ap_uint<ADDR_WIDTH> count; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: ap_uint<ADDR_WIDTH> count = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=tmp_ram_rd_en #pragm...
The wrong part of the code is: head_ptr = (head_ptr << MEM_DEPTH) ? 0 : head_ptr + 1; The right code snippet is: head_ptr = (head_ptr == MEM_DEPTH-1) ? 0 : head_ptr + 1;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=tmp_ram_rd_en #pragma HLS...
The right code snippet is: head_ptr = (head_ptr == MEM_DEPTH-1) ? 0 : head_ptr + 1;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=tmp_ram_r...
The wrong part of the code is: head_ptr = (head_ptr << MEM_DEPTH) ? 0 : head_ptr + 1; The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The wrong part of the code is: head_ptr = (head_ptr << MEM_DEPTH) ? 0 : head_ptr + 1; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: head_ptr = (head_ptr == MEM_DEPTH-1) ? 0 : head_ptr + 1;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=tmp_ram_rd_en #pragm...
The wrong part of the code is: while (count > 0) {} The right code snippet is: while (true) {}
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=tmp_ram_rd_en #pragma HLS...
The right code snippet is: while (true) {}
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=tmp_ram_r...
The wrong part of the code is: while (count > 0) {} The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=rd_clk #pragma HLS INTERFACE ap_clk port=wr_clk #pragma HLS INTERFACE ap_ctrl_none port=return #pragma...
The wrong part of the code is: while (count > 0) {} The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: while (true) {}
'INF'