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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { ...
The wrong part of the code is: memcpy(buffer1, buffer2 + 512, 1024); The right code snippet is: memcpy(buffer1, buffer2, 1024);
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { resu...
The right code snippet is: memcpy(buffer1, buffer2, 1024);
'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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } els...
The wrong part of the code is: memcpy(buffer1, buffer2 + 512, 1024); 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { ...
The wrong part of the code is: memcpy(buffer1, buffer2 + 512, 1024); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: memcpy(buffer1, buffer2, 1024);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { ...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=3 The right code snippet is: #pragma HLS array_partition variable=buffer1 complete
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { resu...
The right code snippet is: #pragma HLS array_partition variable=buffer1 complete
'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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } els...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=3 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { ...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=3 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS array_partition variable=buffer1 complete
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { ...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=5 The right code snippet is: #pragma HLS array_partition variable=buffer1 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { resu...
The right code snippet is: #pragma HLS array_partition variable=buffer1 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } els...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=5 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { ...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=5 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS array_partition variable=buffer1 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { ...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 cyclic factor=2 dim=2 The right code snippet is: #pragma HLS array_partition variable=buffer1 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { resu...
The right code snippet is: #pragma HLS array_partition variable=buffer1 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } els...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { ...
The wrong part of the code is: #pragma HLS array_partition variable=buffer1 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=buffer1 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { ...
The wrong part of the code is: #pragma HLS dataflow region 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { resu...
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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } els...
The wrong part of the code is: #pragma HLS dataflow region 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { ...
The wrong part of the code is: #pragma HLS dataflow region 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { ...
The wrong part of the code is: #pragma HLS interface ap_fifo port=buffer1 depth=2 The right code snippet is: #pragma HLS interface ap_fifo port=buffer1
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { resu...
The right code snippet is: #pragma HLS interface ap_fifo port=buffer1
'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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } els...
The wrong part of the code is: #pragma HLS interface ap_fifo port=buffer1 depth=2 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { ...
The wrong part of the code is: #pragma HLS interface ap_fifo port=buffer1 depth=2 The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS interface ap_fifo port=buffer1
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { ...
The wrong part of the code is: #pragma HLS interface m_axi port=buffer1 offset=slave bundle=gmem The right code snippet is: #pragma HLS interface m_axi port=buffer1
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { resu...
The right code snippet is: #pragma HLS interface m_axi port=buffer1
'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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } els...
The wrong part of the code is: #pragma HLS interface m_axi port=buffer1 offset=slave bundle=gmem 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { ...
The wrong part of the code is: #pragma HLS interface m_axi port=buffer1 offset=slave bundle=gmem The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS interface m_axi port=buffer1
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { ...
The wrong part of the code is: #pragma HLS interface bram port=scalar_value The right code snippet is: #pragma HLS interface ap_fifo port=scalar_value
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { resu...
The right code snippet is: #pragma HLS interface ap_fifo port=scalar_value
'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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } els...
The wrong part of the code is: #pragma HLS interface bram port=scalar_value 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { ...
The wrong part of the code is: #pragma HLS interface bram port=scalar_value The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: #pragma HLS interface ap_fifo port=scalar_value
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { ...
The wrong part of the code is: #pragma HLS interface ap_fifo port=array_value The right code snippet is: #pragma HLS interface bram port=array_value
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { resu...
The right code snippet is: #pragma HLS interface bram port=array_value
'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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } els...
The wrong part of the code is: #pragma HLS interface ap_fifo port=array_value 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { ...
The wrong part of the code is: #pragma HLS interface ap_fifo port=array_value The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: #pragma HLS interface bram port=array_value
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { ...
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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { resu...
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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } els...
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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { ...
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'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { ...
The wrong part of the code is: for (int i = 0; i < 4; i++) { // loop body } The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS unroll // loop body }
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } else { resu...
The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS unroll // loop body }
'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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { result = sum - 256; } els...
The wrong part of the code is: for (int i = 0; i < 4; i++) { // loop body } 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: ```c++ void add_subtract( ap_int<8> A, ap_int<8> B, ap_int<16> &result ) { ap_int<16> sum = A + B; if (sum > 255) { ...
The wrong part of the code is: for (int i = 0; i < 4; i++) { // loop body } The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS unroll // loop body }
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: shift_reg = (shift_reg.range(7, 1), 0); The right code snippet is: shift_reg = (shift_reg.range(6, 0), 0);
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: shift_reg = (shift_reg.range(6, 0), 0);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: shift_reg = (shift_reg.range(7, 1), 0); The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: shift_reg = (shift_reg.range(7, 1), 0); The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: shift_reg = (shift_reg.range(6, 0), 0);
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: static uint8_t shift_reg; The right code snippet is: static uint8_t shift_reg = 0;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: static uint8_t shift_reg = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: static uint8_t shift_reg; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: static uint8_t shift_reg; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static uint8_t shift_reg = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: shift_reg = (shift_reg.range(8, 2), 0); The right code snippet is: shift_reg = (shift_reg.range(6, 0), 0);
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: shift_reg = (shift_reg.range(6, 0), 0);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: shift_reg = (shift_reg.range(8, 2), 0); The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: shift_reg = (shift_reg.range(8, 2), 0); The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: shift_reg = (shift_reg.range(6, 0), 0);
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: if (reset) { shift_reg = 0; } else if (comp_out) { shift_reg = (shift_reg.range(6, 0), 0); } else { while (true) { shift_reg = in_data; } } The right code snippet is: if (reset) { shift_reg = 0; } else if (comp_out) { shift_reg = (shift_reg...
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: if (reset) { shift_reg = 0; } else if (comp_out) { shift_reg = (shift_reg.range(6, 0), 0); } else { shift_reg = in_data; }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: if (reset) { shift_reg = 0; } else if (comp_out) { shift_reg = (shift_reg.range(6, 0), 0); } else { while (true) { shift_reg = in_data; } } The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: if (reset) { shift_reg = 0; } else if (comp_out) { shift_reg = (shift_reg.range(6, 0), 0); } else { while (true) { shift_reg = in_data; } } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (reset) { shif...
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: int comp_out = 0; The right code snippet is: bool comp_out = 0;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: bool comp_out = 0;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: int comp_out = 0; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: int comp_out = 0; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: bool comp_out = 0;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: for (int i = 0; i < 3; i++) { #pragma HLS UNROLL shift_reg = (shift_reg.range(6, 0), 0); } The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL shift_reg = (shift_reg.range(6, 0), 0); }
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL shift_reg = (shift_reg.range(6, 0), 0); }
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: for (int i = 0; i < 3; i++) { #pragma HLS UNROLL shift_reg = (shift_reg.range(6, 0), 0); } The high-level-synthesis bug type of the code is: 'MLU'
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: for (int i = 0; i < 3; i++) { #pragma HLS UNROLL shift_reg = (shift_reg.range(6, 0), 0); } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL shift_reg = (shift_reg.range(...
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: static uint8_t shift_reg = 1; The right code snippet is: static uint8_t shift_reg = 0;
'ZERO'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: static uint8_t shift_reg = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: static uint8_t shift_reg = 1; The high-level-synthesis bug type of the code is: 'ZERO'
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: static uint8_t shift_reg = 1; The high-level-synthesis bug type of the code is: 'ZERO' The right code snippet is: static uint8_t shift_reg = 0;
'ZERO'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: shift_reg = (shift_reg.range(14, 8), 0); The right code snippet is: shift_reg = (shift_reg.range(6, 0), 0);
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: shift_reg = (shift_reg.range(6, 0), 0);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: shift_reg = (shift_reg.range(14, 8), 0); The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: shift_reg = (shift_reg.range(14, 8), 0); The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: shift_reg = (shift_reg.range(6, 0), 0);
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg cyclic dim=0 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=0
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=0
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg cyclic dim=0 The high-level-synthesis bug type of the code is: 'APT'
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg cyclic dim=0 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=0
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete factor=2 dim=0 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=0
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=0
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete factor=2 dim=0 The high-level-synthesis bug type of the code is: 'FND'
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete factor=2 dim=0 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=0
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=1 The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=0
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=0
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=1 The high-level-synthesis bug type of the code is: 'DID'
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=1 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: #pragma HLS ARRAY_PARTITION variable=shift_reg complete dim=0
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS DATAFLOW wait The right code snippet is: #pragma HLS DATAFLOW
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS DATAFLOW
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: #pragma HLS DATAFLOW wait The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS DATAFLOW wait The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: #pragma HLS DATAFLOW
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=shift_reg The right code snippet is: #pragma HLS INTERFACE ap_none port=shift_reg
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS INTERFACE ap_none port=shift_reg
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=shift_reg The high-level-synthesis bug type of the code is: 'IDAP'
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS INTERFACE ap_vld port=shift_reg The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: #pragma HLS INTERFACE ap_none port=shift_reg
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE a...
The wrong part of the code is: #pragma HLS INTERFACE m_axi depth=50 port=shift_reg offset=random The right code snippet is: #pragma HLS INTERFACE m_axi depth=50 port=shift_reg offset=direct
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS INTERFACE ap_non...
The right code snippet is: #pragma HLS INTERFACE m_axi depth=50 port=shift_reg offset=direct
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERFACE ap_none port=in_data #pragma HLS ...
The wrong part of the code is: #pragma HLS INTERFACE m_axi depth=50 port=shift_reg offset=random The high-level-synthesis bug type of the code is: 'RAMB'
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #pragma HLS INTERFACE ap_clk port=clk #pragma HLS INTERFACE ap_rst port=reset #pragma HLS INTERFACE ap_none port=data #pragma HLS INTERF...
The wrong part of the code is: #pragma HLS INTERFACE m_axi depth=50 port=shift_reg offset=random The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: #pragma HLS INTERFACE m_axi depth=50 port=shift_reg offset=direct
'RAMB'