instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=data_in1
#pragma HLS INTERFACE ap_none port=data_in2
#pragma HLS INTERFACE ap_none port=shift_amount1
#pragma HLS INTERFACE ap_none port=shift_amount... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=shifted_data1
The right code snippet is:
#pragma HLS INTERFACE ap_none port=shifted_data1 | 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_none port=data_in1
#pragma HLS INTERFACE ap_none port=data_in2
#pragma HLS INTERFACE ap_none port=shift_amount1
#pragma HLS INTERFACE ap_none port=shift_amount2
#pr... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=shifted_data1 | 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_none port=data_in1
#pragma HLS INTERFACE ap_none port=data_in2
#pragma HLS INTERFACE ap_none port=shift_amount1
#pragma HLS INTERFACE ap_none port=s... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=shifted_data1
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_none port=data_in1
#pragma HLS INTERFACE ap_none port=data_in2
#pragma HLS INTERFACE ap_none port=shift_amount1... |
The wrong part of the code is:
#pragma HLS INTERFACE axis port=shifted_data1
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
#pragma HLS INTERFACE ap_none port=shifted_data1 | 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_none port=data_in1
#pragma HLS INTERFACE ap_none port=data_in2
#pragma HLS INTERFACE ap_none port=shift_amount1
#pragma HLS INTERFACE ap_none port=shift_amount... |
The wrong part of the code is:
#pragma HLS PIPELINE II=2
The right code snippet is:
#pragma HLS PIPELINE II=1 | MLP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=data_in1
#pragma HLS INTERFACE ap_none port=data_in2
#pragma HLS INTERFACE ap_none port=shift_amount1
#pragma HLS INTERFACE ap_none port=shift_amount2
#pr... |
The right code snippet is:
#pragma HLS PIPELINE II=1 | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=data_in1
#pragma HLS INTERFACE ap_none port=data_in2
#pragma HLS INTERFACE ap_none port=shift_amount1
#pragma HLS INTERFACE ap_none port=s... |
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:
#pragma HLS INTERFACE ap_none port=data_in1
#pragma HLS INTERFACE ap_none port=data_in2
#pragma HLS INTERFACE ap_none port=shift_amount1... |
The wrong part of the code is:
#pragma HLS PIPELINE II=2
The high-level-synthesis bug type of the code is: MLP
The right code snippet is:
#pragma HLS PIPELINE II=1 | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=data_in1
#pragma HLS INTERFACE ap_none port=data_in2
#pragma HLS INTERFACE ap_none port=shift_amount1
#pragma HLS INTERFACE ap_none port=shift_amount... |
The wrong part of the code is:
shifted_data = data_in << shift_amount;
The right code snippet is:
shifted_data = data_in >> shift_amount; | SHFT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=data_in1
#pragma HLS INTERFACE ap_none port=data_in2
#pragma HLS INTERFACE ap_none port=shift_amount1
#pragma HLS INTERFACE ap_none port=shift_amount2
#pr... |
The right code snippet is:
shifted_data = data_in >> 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:
#pragma HLS INTERFACE ap_none port=data_in1
#pragma HLS INTERFACE ap_none port=data_in2
#pragma HLS INTERFACE ap_none port=shift_amount1
#pragma HLS INTERFACE ap_none port=s... |
The wrong part of the code is:
shifted_data = data_in << 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:
#pragma HLS INTERFACE ap_none port=data_in1
#pragma HLS INTERFACE ap_none port=data_in2
#pragma HLS INTERFACE ap_none port=shift_amount1... |
The wrong part of the code is:
shifted_data = data_in << shift_amount;
The high-level-synthesis bug type of the code is: SHFT
The right code snippet is:
shifted_data = data_in >> 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:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
The wrong part of the code is:
out = mem[address+1];
The right code snippet is:
out = mem[address]; | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
The right code snippet is:
out = mem[address]; | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
The wrong part of the code is:
out = mem[address+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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
The wrong part of the code is:
out = mem[address+1];
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
out = mem[address]; | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
The wrong part of the code is:
out = mem[MEM_SIZE];
The right code snippet is:
out = mem[address]; | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
The right code snippet is:
out = mem[address]; | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
The wrong part of the code is:
out = mem[MEM_SIZE];
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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
The wrong part of the code is:
out = mem[MEM_SIZE];
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
out = mem[address]; | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// loop body
}
The right code snippet is:
for (int i = 0; i < 10; i++) {
// loop body
} | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
The right code snippet is:
for (int i = 0; i < 10; i++) {
// loop body
} | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// loop body
}
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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
// loop body
}
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
for (int i = 0; i < 10; i++) {
// loop body
} | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
The wrong part of the code is:
short s_out = mem[address];
out = s_out;
The right code snippet is:
out = mem[address]; | USE |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
The right code snippet is:
out = mem[address]; | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
The wrong part of the code is:
short s_out = mem[address];
out = s_out;
The high-level-synthesis bug type of the code is: USE | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
The wrong part of the code is:
short s_out = mem[address];
out = s_out;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
out = mem[address]; | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
The wrong part of the code is:
memcpy(out+size, in, size);
The right code snippet is:
memcpy(out, in, size); | BUF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
The right code snippet is:
memcpy(out, in, size); | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
The wrong part of the code is:
memcpy(out+size, in, size);
The high-level-synthesis bug type of the code is: BUF | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
The wrong part of the code is:
memcpy(out+size, in, size);
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
memcpy(out, in, size); | BUF |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem cyclic
The right code snippet is:
#pragma HLS array_partition variable=mem complete | APT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
The right code snippet is:
#pragma HLS array_partition variable=mem 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:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem cyclic
The high-level-synthesis bug type of the code is: APT | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem cyclic
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pragma HLS array_partition variable=mem 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:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem complete factor=3
The right code snippet is:
#pragma HLS array_partition variable=mem complete | FND |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
The right code snippet is:
#pragma HLS array_partition variable=mem complete | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem complete factor=3
The high-level-synthesis bug type of the code is: FND | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS array_partition variable=mem complete factor=3
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS array_partition variable=mem complete | FND |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
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:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
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:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
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:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_none port=out
The right code snippet is:
#pragma HLS interface ap_none port=out | IDAP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
The right code snippet is:
#pragma HLS interface ap_none port=out | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_none port=out
The high-level-synthesis bug type of the code is: IDAP | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS interface ap_ctrl_none port=out
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
#pragma HLS interface ap_none port=out | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
The wrong part of the code is:
#pragma HLS interface m_axi port=mem offset=slave
The right code snippet is:
#pragma HLS interface m_axi port=mem 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
The right code snippet is:
#pragma HLS interface m_axi port=mem 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
The wrong part of the code is:
#pragma HLS interface m_axi port=mem offset=slave
The high-level-synthesis bug type of the code is: RAMB | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS interface m_axi port=mem offset=slave
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
#pragma HLS interface m_axi port=mem offset=direct | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=mem
The right code snippet is:
#pragma HLS interface ap_memory port=mem | SMA |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
The right code snippet is:
#pragma HLS interface ap_memory port=mem | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=mem
The high-level-synthesis bug type of the code is: SMA | SMA |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS interface ap_fifo port=mem
The high-level-synthesis bug type of the code is: SMA
The right code snippet is:
#pragma HLS interface ap_memory port=mem | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=mem
The right code snippet is:
#pragma HLS interface axis port=mem | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
The right code snippet is:
#pragma HLS interface axis port=mem | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=mem
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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS interface ap_vld port=mem
The high-level-synthesis bug type of the code is: AMS
The right code snippet is:
#pragma HLS interface axis port=mem | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The right code snippet is:
#pragma HLS pipeline II=1 | MLP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
The right code snippet is:
#pragma HLS pipeline II=1 | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
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:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS pipeline II=2
The high-level-synthesis bug type of the code is: MLP
The right code snippet is:
#pragma HLS pipeline II=1 | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The right code snippet is:
#pragma HLS unroll factor=4 | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_SIZE 32768
void... |
The right code snippet is:
#pragma HLS unroll factor=4 | 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_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INTERFACE ap_none port=out
#define MEM_... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The high-level-synthesis bug type of the code is: ILNU | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=address
#pragma HLS INTERFACE ap_none port=clock
#pragma HLS INTERFACE ap_none port=q
#pragma HLS INT... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
#pragma HLS unroll factor=4 | ILNU |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma... |
The wrong part of the code is:
gray_out[5] = binary_in[10];
The right code snippet is:
gray_out[0] = binary_in[0]; | 'OOB': Out-of-bounds array access |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS ... |
The right code snippet is:
gray_out[0] = binary_in[0]; | 'OOB': Out-of-bounds array access |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_... |
The wrong part of the code is:
gray_out[5] = binary_in[10];
The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access | 'OOB': Out-of-bounds array access |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pr... |
The wrong part of the code is:
gray_out[5] = binary_in[10];
The high-level-synthesis bug type of the code is: 'OOB': Out-of-bounds array access
The right code snippet is:
gray_out[0] = binary_in[0]; | 'OOB': Out-of-bounds array access |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma... |
The wrong part of the code is:
ap_uint<4> uninitialized_variable;
gray_out[0] = uninitialized_variable;
The right code snippet is:
gray_out[0] = binary_in[0]; | 'INIT': Read of uninitialized variable |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS ... |
The right code snippet is:
gray_out[0] = binary_in[0]; | 'INIT': Read of uninitialized variable |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_... |
The wrong part of the code is:
ap_uint<4> uninitialized_variable;
gray_out[0] = uninitialized_variable;
The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable | 'INIT': Read of uninitialized variable |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pr... |
The wrong part of the code is:
ap_uint<4> uninitialized_variable;
gray_out[0] = uninitialized_variable;
The high-level-synthesis bug type of the code is: 'INIT': Read of uninitialized variable
The right code snippet is:
gray_out[0] = binary_in[0]; | 'INIT': Read of uninitialized variable |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma... |
The wrong part of the code is:
gray_out[1] = binary_in[0] ^ binary_in[10];
The right code snippet is:
gray_out[1] = binary_in[0] ^ binary_in[1]; | 'SHFT': Bit shift by an out-of-bounds amount |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS ... |
The right code snippet is:
gray_out[1] = binary_in[0] ^ binary_in[1]; | 'SHFT': Bit shift by an out-of-bounds amount |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_... |
The wrong part of the code is:
gray_out[1] = binary_in[0] ^ binary_in[10];
The high-level-synthesis bug type of the code is: 'SHFT': Bit shift by an out-of-bounds amount | 'SHFT': Bit shift by an out-of-bounds amount |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pr... |
The wrong part of the code is:
gray_out[1] = binary_in[0] ^ binary_in[10];
The high-level-synthesis bug type of the code is: 'SHFT': Bit shift by an out-of-bounds amount
The right code snippet is:
gray_out[1] = binary_in[0] ^ binary_in[1]; | 'SHFT': Bit shift by an out-of-bounds amount |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma... |
The wrong part of the code is:
for (int i = 0; i > 4; i++) {
gray_out[i] = binary_in[i];
}
The right code snippet is:
for (int i = 0; i < 4; i++) {
gray_out[i] = binary_in[i];
} | 'INF': An infinite loop arising from an incorrect loop termination |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS ... |
The right code snippet is:
for (int i = 0; i < 4; i++) {
gray_out[i] = binary_in[i];
} | 'INF': An infinite loop arising from an incorrect loop termination |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_... |
The wrong part of the code is:
for (int i = 0; i > 4; i++) {
gray_out[i] = binary_in[i];
}
The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination | 'INF': An infinite loop arising from an incorrect loop termination |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pr... |
The wrong part of the code is:
for (int i = 0; i > 4; i++) {
gray_out[i] = binary_in[i];
}
The high-level-synthesis bug type of the code is: 'INF': An infinite loop arising from an incorrect loop termination
The right code snippet is:
for (int i = 0; i < 4; i++) {
gray_out[i] = binary_in[i]... | 'INF': An infinite loop arising from an incorrect loop termination |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma... |
The wrong part of the code is:
ap_int<4> signed_binary_in = binary_in;
gray_out[0] = signed_binary_in;
The right code snippet is:
gray_out[0] = binary_in[0]; | 'USE': Unintended sign extension |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS ... |
The right code snippet is:
gray_out[0] = binary_in[0]; | 'USE': Unintended sign extension |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_... |
The wrong part of the code is:
ap_int<4> signed_binary_in = binary_in;
gray_out[0] = signed_binary_in;
The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension | 'USE': Unintended sign extension |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pr... |
The wrong part of the code is:
ap_int<4> signed_binary_in = binary_in;
gray_out[0] = signed_binary_in;
The high-level-synthesis bug type of the code is: 'USE': Unintended sign extension
The right code snippet is:
gray_out[0] = binary_in[0]; | 'USE': Unintended sign extension |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma... |
The wrong part of the code is:
gray_out[0] = binary_in[0];
gray_out[1] = binary_in[1];
gray_out[2] = binary_in[2];
gray_out[3] = binary_in[3];
The right code snippet is:
for (int i = 0; i < 4; i++) {
gray_out[i] = binary_in[i];
} | 'MLU': Errors in manual loop unrolling |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS ... |
The right code snippet is:
for (int i = 0; i < 4; i++) {
gray_out[i] = binary_in[i];
} | 'MLU': Errors in manual loop unrolling |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_... |
The wrong part of the code is:
gray_out[0] = binary_in[0];
gray_out[1] = binary_in[1];
gray_out[2] = binary_in[2];
gray_out[3] = binary_in[3];
The high-level-synthesis bug type of the code is: 'MLU': Errors in manual loop unrolling | 'MLU': Errors in manual loop unrolling |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pr... |
The wrong part of the code is:
gray_out[0] = binary_in[0];
gray_out[1] = binary_in[1];
gray_out[2] = binary_in[2];
gray_out[3] = binary_in[3];
The high-level-synthesis bug type of the code is: 'MLU': Errors in manual loop unrolling
The right code snippet is:
for (int i = 0; i < 4; i++) {
gray_o... | 'MLU': Errors in manual loop unrolling |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma... |
The wrong part of the code is:
ap_uint<4> gray_out;
The right code snippet is:
ap_uint<4> gray_out = 0; | 'ZERO': Variable initialized to zero instead of nonzero initializer |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS ... |
The right code snippet is:
ap_uint<4> gray_out = 0; | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_... |
The wrong part of the code is:
ap_uint<4> gray_out;
The high-level-synthesis bug type of the code is: 'ZERO': Variable initialized to zero instead of nonzero initializer | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pr... |
The wrong part of the code is:
ap_uint<4> gray_out;
The high-level-synthesis bug type of the code is: 'ZERO': Variable initialized to zero instead of nonzero initializer
The right code snippet is:
ap_uint<4> gray_out = 0; | 'ZERO': Variable initialized to zero instead of nonzero initializer |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma... |
The wrong part of the code is:
gray_out[2] = binary_in[3] ^ binary_in[4];
The right code snippet is:
gray_out[2] = binary_in[1] ^ binary_in[2]; | 'BUF': Copying from the wrong half of a split buffer |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```c++
void binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_out
#pragma HLS ... |
The right code snippet is:
gray_out[2] = binary_in[1] ^ binary_in[2]; | 'BUF': Copying from the wrong half of a split buffer |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pragma HLS INTERFACE ap_none port=gray_... |
The wrong part of the code is:
gray_out[2] = binary_in[3] ^ binary_in[4];
The high-level-synthesis bug type of the code is: 'BUF': Copying from the wrong half of a split buffer | 'BUF': Copying from the wrong half of a split buffer |
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 binary_to_gray(
const ap_uint<4> binary_in,
ap_uint<4> &gray_out
) {
#pragma HLS INTERFACE ap_none port=binary_in
#pr... |
The wrong part of the code is:
gray_out[2] = binary_in[3] ^ binary_in[4];
The high-level-synthesis bug type of the code is: 'BUF': Copying from the wrong half of a split buffer
The right code snippet is:
gray_out[2] = binary_in[1] ^ binary_in[2]; | 'BUF': Copying from the wrong half of a split buffer |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.