instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
doutb = mem[addrb + DEPTH/2].data;
The right code snippet is:
doutb = mem[addrb].data; | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
doutb = mem[addrb].data; | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INT... |
The wrong part of the code is:
doutb = mem[addrb + DEPTH/2].data;
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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFA... |
The wrong part of the code is:
doutb = mem[addrb + DEPTH/2].data;
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
doutb = mem[addrb].data; | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem block factor=16 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 dim=1 | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 dim=1 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem block factor=16 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:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem block factor=16 dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 dim=1 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=17 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 dim=1 | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=17 dim=1
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=17 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=15 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 dim=1 | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 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:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=15 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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=15 dim=1
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 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:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
void blk_mem_gen_2port(
#pragma HLS DATAFLOW
The right code snippet is:
void blk_mem_gen_2port( | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
void blk_mem_gen_2port( | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INT... |
The wrong part of the code is:
void blk_mem_gen_2port(
#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_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFA... |
The wrong part of the code is:
void blk_mem_gen_2port(
#pragma HLS DATAFLOW
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
void blk_mem_gen_2port( | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
bool clka,
bool wea,
int addra,
ap_uint<WIDTH*2> dina,
The right code snippet is:
bool clka,
bool wea,
int addra,
ap_uint<WIDTH> dina, | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
bool clka,
bool wea,
int addra,
ap_uint<WIDTH> dina, | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INT... |
The wrong part of the code is:
bool clka,
bool wea,
int addra,
ap_uint<WIDTH*2> dina,
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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFA... |
The wrong part of the code is:
bool clka,
bool wea,
int addra,
ap_uint<WIDTH*2> dina,
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
bool clka,
bool wea,
int addra,
ap_uint<WIDTH> dina, | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=doutb
The right code snippet is:
#pragma HLS INTERFACE ap_none port=doutb | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=doutb | '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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=doutb
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=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=doutb
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=doutb | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE bram... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=dina
The right code snippet is:
#pragma HLS INTERFACE ap_none port=dina | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE bram port... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=dina | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=dina
The high-level-synthesis bug type of the code is: 'SMA' | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS INTERFACE bram port=dina
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=dina | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=douta
The right code snippet is:
#pragma HLS INTERFACE ap_none port=douta | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=douta | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=douta
The high-level-synthesis bug type of the code is: 'AMS' | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=douta
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS INTERFACE ap_none port=douta | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
void blk_mem_gen_2port(
#pragma HLS PIPELINE II=2
The right code snippet is:
void blk_mem_gen_2port( | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
void blk_mem_gen_2port( | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INT... |
The wrong part of the code is:
void blk_mem_gen_2port(
#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:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFA... |
The wrong part of the code is:
void blk_mem_gen_2port(
#pragma HLS PIPELINE II=2
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
void blk_mem_gen_2port( | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_n... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 dim=2
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 dim=1 | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INTERFACE ap_none p... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 dim=1 | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFACE ap_none port=addra
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 dim=2
The high-level-synthesis bug type of the code is: 'ILNU' | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clka
#pragma HLS INTERFACE ap_clk port=clkb
#pragma HLS INTERFACE ap_none port=wea
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 dim=2
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=16 dim=1 | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#prag... |
The wrong part of the code is:
static ap_uint<32> p_count;
static ap_uint<32> n_count;
static ap_uint<32> p_count_latched;
static ap_uint<32> n_count_latched;
static ap_uint<32> p_count_diff;
static ap_uint<32> n_count_diff;
static ap_uint<2> state;
The right code snippet is:
static ap_uint<32> p_count... | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#pragma HL... |
The right code snippet is:
static ap_uint<32> p_count = 0;
static ap_uint<32> n_count = 0;
static ap_uint<32> p_count_latched = 0;
static ap_uint<32> n_count_latched = 0;
static ap_uint<32> p_count_diff = 0;
static ap_uint<32> n_count_diff = 0;
static ap_uint<2> state = 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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) ... |
The wrong part of the code is:
static ap_uint<32> p_count;
static ap_uint<32> n_count;
static ap_uint<32> p_count_latched;
static ap_uint<32> n_count_latched;
static ap_uint<32> p_count_diff;
static ap_uint<32> n_count_diff;
static ap_uint<2> state;
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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, ... |
The wrong part of the code is:
static ap_uint<32> p_count;
static ap_uint<32> n_count;
static ap_uint<32> p_count_latched;
static ap_uint<32> n_count_latched;
static ap_uint<32> p_count_diff;
static ap_uint<32> n_count_diff;
static ap_uint<2> state;
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 right code snippet
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#prag... |
The wrong part of the code is:
if (p_count_diff <= 0) p_count_diff = -p_count_diff;
The right code snippet is:
if (p_count_diff < 0) p_count_diff = -p_count_diff; | 'OOB' |
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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#pragma HL... |
The right code snippet is:
if (p_count_diff < 0) p_count_diff = -p_count_diff; | '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_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) ... |
The wrong part of the code is:
if (p_count_diff <= 0) p_count_diff = -p_count_diff;
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_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, ... |
The wrong part of the code is:
if (p_count_diff <= 0) p_count_diff = -p_count_diff;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
if (p_count_diff < 0) p_count_diff = -p_count_diff; | '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_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#prag... |
The wrong part of the code is:
if (n_count_diff > (clk_chk_n_exp << shift_amount)) {
The right code snippet is:
if (n_count_diff > (clk_chk_n_exp >> shift_amount)) { | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#pragma HL... |
The right code snippet is:
if (n_count_diff > (clk_chk_n_exp >> shift_amount)) { | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) ... |
The wrong part of the code is:
if (n_count_diff > (clk_chk_n_exp << shift_amount)) {
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, ... |
The wrong part of the code is:
if (n_count_diff > (clk_chk_n_exp << shift_amount)) {
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
if (n_count_diff > (clk_chk_n_exp >> shift_amount)) { | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#prag... |
The wrong part of the code is:
while (state == ERROR) {
p_count_latched = p_count;
n_count_latched = n_count;
}
The right code snippet is:
if (state == ERROR) {
p_count_latched = p_count;
n_count_latched = n_count;
} | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#pragma HL... |
The right code snippet is:
if (state == ERROR) {
p_count_latched = p_count;
n_count_latched = n_count;
} | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) ... |
The wrong part of the code is:
while (state == ERROR) {
p_count_latched = p_count;
n_count_latched = n_count;
}
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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, ... |
The wrong part of the code is:
while (state == ERROR) {
p_count_latched = p_count;
n_count_latched = n_count;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (state == ERROR) {
p_count_latched = p_count;
n_count_latched = n_count;
} | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#prag... |
The wrong part of the code is:
static ap_int<2> state = 0;
The right code snippet is:
static ap_uint<2> state = 0; | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#pragma HL... |
The right code snippet is:
static ap_uint<2> state = 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:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) ... |
The wrong part of the code is:
static ap_int<2> state = 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:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, ... |
The wrong part of the code is:
static ap_int<2> state = 0;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
static ap_uint<2> state = 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:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#prag... |
The wrong part of the code is:
for (int i = 0; i < 10; i++) {
if (p_clk) {
p_count = p_count + 1;
}
}
The right code snippet is:
// no suitable code snippet found | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#pragma HL... |
The right code snippet is:
// no suitable code snippet found | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) ... |
The wrong part of the code is:
for (int i = 0; i < 10; i++) {
if (p_clk) {
p_count = p_count + 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_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, ... |
The wrong part of the code is:
for (int i = 0; i < 10; i++) {
if (p_clk) {
p_count = p_count + 1;
}
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
// no suitable code snippet found | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#prag... |
The wrong part of the code is:
static ap_uint<32> p_count;
The right code snippet is:
static ap_uint<32> p_count = 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_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#pragma HL... |
The right code snippet is:
static ap_uint<32> p_count = 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_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) ... |
The wrong part of the code is:
static ap_uint<32> p_count;
The high-level-synthesis bug type of the code is: 'ZERO' | 'ZERO' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, ... |
The wrong part of the code is:
static ap_uint<32> p_count;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static ap_uint<32> p_count = 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_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#prag... |
The wrong part of the code is:
for (int i = 0; i < 10; i++) {
p_count_latched = p_count[i];
}
The right code snippet is:
// no suitable code snippet found | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#pragma HL... |
The right code snippet is:
// no suitable code snippet found | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) ... |
The wrong part of the code is:
for (int i = 0; i < 10; i++) {
p_count_latched = p_count[i];
}
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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, ... |
The wrong part of the code is:
for (int i = 0; i < 10; i++) {
p_count_latched = p_count[i];
}
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
// no suitable code snippet found | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#prag... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_p_max complete dim=1
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=2 dim=1
#pragma HLS ARRAY_PARTITION variable=shift_amount cyclic factor=3 dim=1
#pragma HLS ARRAY_PARTITION variable=reset cyclic factor=4 dim=1
#pra... | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#pragma HL... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=clk_chk_p_max
#pragma HLS INTERFACE ap_none port=clk_chk_n_exp
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=reset
#pragma HLS INTERFACE ap_none port=p_clk
#pragma HLS INTERFACE ap_none port=n_clk
#pragma HLS INT... | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) ... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_p_max complete dim=1
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=2 dim=1
#pragma HLS ARRAY_PARTITION variable=shift_amount cyclic factor=3 dim=1
#pragma HLS ARRAY_PARTITION variable=reset cyclic factor=4 dim=1
#pra... | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, ... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_p_max complete dim=1
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=2 dim=1
#pragma HLS ARRAY_PARTITION variable=shift_amount cyclic factor=3 dim=1
#pragma HLS ARRAY_PARTITION variable=reset cyclic factor=4 dim=1
#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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#prag... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=2 dim=1 | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#pragma HL... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=2 dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) ... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, ... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=3 dim=1
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=2 dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#prag... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=4 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=2 dim=1 | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#pragma HL... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=2 dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) ... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=4 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:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, ... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=4 dim=1
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=clk_chk_n_exp cyclic factor=2 dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#prag... |
The wrong part of the code is:
#pragma HLS DATAFLOW
The right code snippet is:
// no suitable code snippet found | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#pragma HL... |
The right code snippet is:
// no suitable code snippet 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:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) ... |
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_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, ... |
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:
// no suitable code snippet 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:
#include <ap_int.h>
void cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#prag... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=clk_chk_p_max
#pragma HLS INTERFACE ap_none port=clk_chk_n_exp
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=reset
#pragma HLS INTERFACE ap_none port=p_clk
#pragma HLS INTERFACE ap_none port=n_clk
#pragma HLS ... | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) {
#pragma HL... |
The right code snippet is:
// no suitable code snippet found | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, bool p_clk, bool n_clk, bool &error) ... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=clk_chk_p_max
#pragma HLS INTERFACE ap_none port=clk_chk_n_exp
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=reset
#pragma HLS INTERFACE ap_none port=p_clk
#pragma HLS INTERFACE ap_none port=n_clk
#pragma HLS ... | '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 cpci_clock_checker(ap_uint<32> clk_chk_p_max, ap_uint<32> clk_chk_n_exp, ap_uint<4> shift_amount, bool reset, ... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=clk_chk_p_max
#pragma HLS INTERFACE ap_none port=clk_chk_n_exp
#pragma HLS INTERFACE ap_none port=shift_amount
#pragma HLS INTERFACE ap_none port=reset
#pragma HLS INTERFACE ap_none port=p_clk
#pragma HLS INTERFACE ap_none port=n_clk
#pragma HLS ... | '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_none port=ADDR_1
#pragma HLS INTERFACE ap_none port=ADDR_2
#pragma HLS INTERFACE ap_none port=ADDR_3
#pragma HLS INTERFAC... |
The wrong part of the code is:
D_OUT_1 = regfile_mem[ADDR_1+1];
The right code snippet is:
D_OUT_1 = regfile_mem[ADDR_1]; | 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_none port=ADDR_1
#pragma HLS INTERFACE ap_none port=ADDR_2
#pragma HLS INTERFACE ap_none port=ADDR_3
#pragma HLS INTERFACE ap_... |
The right code snippet is:
D_OUT_1 = regfile_mem[ADDR_1]; | 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_none port=ADDR_1
#pragma HLS INTERFACE ap_none port=ADDR_2
#pragma HLS INTERFACE ap_none port=ADDR_3
#pragma H... |
The wrong part of the code is:
D_OUT_1 = regfile_mem[ADDR_1+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:
#pragma HLS INTERFACE ap_clk port=CLK
#pragma HLS INTERFACE ap_none port=ADDR_1
#pragma HLS INTERFACE ap_none port=ADDR_2
#pragma HLS IN... |
The wrong part of the code is:
D_OUT_1 = regfile_mem[ADDR_1+1];
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
D_OUT_1 = regfile_mem[ADDR_1]; | INIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.