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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101... |
The wrong part of the code is:
if ((hor_pos >= H_BLANK) || (ver_pos >= V_BLANK)) {
R = 0;
G = 0;
B = 0;
}
The right code snippet is:
if ((hor_pos < H_BLANK) || (ver_pos < V_BLANK)) {
R = 0;
G = 0;
B = 0;
} | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101;
con... |
The right code snippet is:
if ((hor_pos < H_BLANK) || (ver_pos < V_BLANK)) {
R = 0;
G = 0;
B = 0;
} | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GRE... |
The wrong part of the code is:
if ((hor_pos >= H_BLANK) || (ver_pos >= V_BLANK)) {
R = 0;
G = 0;
B = 0;
}
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3... |
The wrong part of the code is:
if ((hor_pos >= H_BLANK) || (ver_pos >= V_BLANK)) {
R = 0;
G = 0;
B = 0;
}
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
if ((hor_pos < H_BLANK) || (ver_pos < V_BLANK)) {
R = 0;
G = 0;
B = 0;
} | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101... |
The wrong part of the code is:
#pragma HLS array_partition variable=hor_pos cyclic dim=1
The right code snippet is:
#pragma HLS array_partition variable=hor_pos complete dim=1 | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101;
con... |
The right code snippet is:
#pragma HLS array_partition variable=hor_pos complete 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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GRE... |
The wrong part of the code is:
#pragma HLS array_partition variable=hor_pos cyclic 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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3... |
The wrong part of the code is:
#pragma HLS array_partition variable=hor_pos cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS array_partition variable=hor_pos complete 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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101... |
The wrong part of the code is:
#pragma HLS array_partition variable=hor_pos complete dim=2
The right code snippet is:
#pragma HLS array_partition variable=hor_pos complete dim=1 | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101;
con... |
The right code snippet is:
#pragma HLS array_partition variable=hor_pos complete 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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GRE... |
The wrong part of the code is:
#pragma HLS array_partition variable=hor_pos complete dim=2
The high-level-synthesis bug type of the code is: 'FND' | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3... |
The wrong part of the code is:
#pragma HLS array_partition variable=hor_pos complete dim=2
The high-level-synthesis bug type of the code is: 'FND'
The right code snippet is:
#pragma HLS array_partition variable=hor_pos complete 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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101... |
The wrong part of the code is:
#pragma HLS array_partition variable=hor_pos complete dim=3
The right code snippet is:
#pragma HLS array_partition variable=hor_pos complete dim=1 | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101;
con... |
The right code snippet is:
#pragma HLS array_partition variable=hor_pos complete 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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GRE... |
The wrong part of the code is:
#pragma HLS array_partition variable=hor_pos complete dim=3
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3... |
The wrong part of the code is:
#pragma HLS array_partition variable=hor_pos complete dim=3
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS array_partition variable=hor_pos complete 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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101;
con... |
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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GRE... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3... |
The wrong part of the code is:
#pragma HLS dataflow pipeline
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
#pragma HLS dataflow | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101... |
The wrong part of the code is:
#pragma HLS interface ap_ovld port=color
The right code snippet is:
#pragma HLS interface ap_none port=color | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101;
con... |
The right code snippet is:
#pragma HLS interface ap_none port=color | '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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GRE... |
The wrong part of the code is:
#pragma HLS interface ap_ovld port=color
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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3... |
The wrong part of the code is:
#pragma HLS interface ap_ovld port=color
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
#pragma HLS interface ap_none port=color | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101... |
The wrong part of the code is:
#pragma HLS interface m_axi port=hor_pos offset=none
The right code snippet is:
#pragma HLS interface m_axi port=hor_pos offset=slave | 'RAMB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101;
con... |
The right code snippet is:
#pragma HLS interface m_axi port=hor_pos offset=slave | '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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GRE... |
The wrong part of the code is:
#pragma HLS interface m_axi port=hor_pos offset=none
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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3... |
The wrong part of the code is:
#pragma HLS interface m_axi port=hor_pos offset=none
The high-level-synthesis bug type of the code is: 'RAMB'
The right code snippet is:
#pragma HLS interface m_axi port=hor_pos offset=slave | 'RAMB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=color
The right code snippet is:
#pragma HLS interface ap_none port=color | 'SMA' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101;
con... |
The right code snippet is:
#pragma HLS interface ap_none port=color | '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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GRE... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=color
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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3... |
The wrong part of the code is:
#pragma HLS interface ap_memory port=color
The high-level-synthesis bug type of the code is: 'SMA'
The right code snippet is:
#pragma HLS interface ap_none port=color | 'SMA' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101... |
The wrong part of the code is:
#pragma HLS interface ap_none port=color
The right code snippet is:
#pragma HLS interface ap_memory port=color | 'AMS' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101;
con... |
The right code snippet is:
#pragma HLS interface ap_memory port=color | '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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GRE... |
The wrong part of the code is:
#pragma HLS interface ap_none port=color
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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3... |
The wrong part of the code is:
#pragma HLS interface ap_none port=color
The high-level-synthesis bug type of the code is: 'AMS'
The right code snippet is:
#pragma HLS interface ap_memory port=color | 'AMS' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101... |
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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101;
con... |
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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GRE... |
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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3... |
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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101... |
The wrong part of the code is:
#pragma HLS unroll factor=2
The right code snippet is:
#pragma HLS unroll | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GREEN = 3'b101;
con... |
The right code snippet is:
#pragma HLS unroll | '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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3> BLUE = 3'b011;
const ap_uint<3> GRE... |
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:
The HLS translation of the given Verilog code is as follows:
```c++
#include <ap_int.h>
const ap_uint<3> BLACK = 3'b000;
const ap_uint<3... |
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 | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit res... |
The wrong part of the code is:
uint32 pwm_frequent = 0;
uint32 pwm_width = 0;
The right code snippet is:
uint32 pwm_frequent;
uint32 pwm_width; | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit reset, b... |
The right code snippet is:
uint32 pwm_frequent;
uint32 pwm_width; | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_control... |
The wrong part of the code is:
uint32 pwm_frequent = 0;
uint32 pwm_width = 0;
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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ... |
The wrong part of the code is:
uint32 pwm_frequent = 0;
uint32 pwm_width = 0;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
uint32 pwm_frequent;
uint32 pwm_width; | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit res... |
The wrong part of the code is:
if (avs_ctrl_write && avs_ctrl_address == 3) {
pwm_frequent = avs_ctrl_writedata;
} else if (avs_ctrl_write && avs_ctrl_address == 4) {
pwm_width = avs_ctrl_writedata;
}
The right code snippet is:
if (avs_ctrl_write && avs_ctrl_address == 1) {
pwm_frequent = a... | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit reset, b... |
The right code snippet is:
if (avs_ctrl_write && avs_ctrl_address == 1) {
pwm_frequent = avs_ctrl_writedata;
} else if (avs_ctrl_write && avs_ctrl_address == 2) {
pwm_width = avs_ctrl_writedata;
} | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_control... |
The wrong part of the code is:
if (avs_ctrl_write && avs_ctrl_address == 3) {
pwm_frequent = avs_ctrl_writedata;
} else if (avs_ctrl_write && avs_ctrl_address == 4) {
pwm_width = avs_ctrl_writedata;
}
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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ... |
The wrong part of the code is:
if (avs_ctrl_write && avs_ctrl_address == 3) {
pwm_frequent = avs_ctrl_writedata;
} else if (avs_ctrl_write && avs_ctrl_address == 4) {
pwm_width = avs_ctrl_writedata;
}
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
if (avs_c... | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit res... |
The wrong part of the code is:
pwm_counter_loop: while (1) {
#pragma HLS PIPELINE II=1
bit pwm_out;
bit reset_edge = reset && !pwm_counter;
if (reset_edge) {
pwm_counter = 0;
} else {
if (avs_ctrl_write && avs_ctrl_address == 1) {
pwm_frequent = avs_ctrl_writedat... | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit reset, b... |
The right code snippet is:
pwm_counter_loop: while (1) {
#pragma HLS PIPELINE II=1
bit pwm_out;
bit reset_edge = reset && !pwm_counter;
if (reset_edge) {
pwm_counter = 0;
} else {
if (avs_ctrl_write && avs_ctrl_address == 1) {
pwm_frequent = avs_ctrl_writedata;
... | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_control... |
The wrong part of the code is:
pwm_counter_loop: while (1) {
#pragma HLS PIPELINE II=1
bit pwm_out;
bit reset_edge = reset && !pwm_counter;
if (reset_edge) {
pwm_counter = 0;
} else {
if (avs_ctrl_write && avs_ctrl_address == 1) {
pwm_frequent = avs_ctrl_writedat... | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ... |
The wrong part of the code is:
pwm_counter_loop: while (1) {
#pragma HLS PIPELINE II=1
bit pwm_out;
bit reset_edge = reset && !pwm_counter;
if (reset_edge) {
pwm_counter = 0;
} else {
if (avs_ctrl_write && avs_ctrl_address == 1) {
pwm_frequent = avs_ctrl_writedat... | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit res... |
The wrong part of the code is:
avs_ctrl_writedata = 0x8A680001;
avs_ctrl_writedata = 0x8A680002;
avs_ctrl_writedata = 0x8A680003;
avs_ctrl_writedata = 0x8A680000;
The right code snippet is:
avs_ctrl_writedata = 0xEA680001;
avs_ctrl_writedata = 0xEA680002;
avs_ctrl_writedata = 0xEA680003;
avs_ctrl_write... | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit reset, b... |
The right code snippet is:
avs_ctrl_writedata = 0xEA680001;
avs_ctrl_writedata = 0xEA680002;
avs_ctrl_writedata = 0xEA680003;
avs_ctrl_writedata = 0xEA680000; | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_control... |
The wrong part of the code is:
avs_ctrl_writedata = 0x8A680001;
avs_ctrl_writedata = 0x8A680002;
avs_ctrl_writedata = 0x8A680003;
avs_ctrl_writedata = 0x8A680000;
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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ... |
The wrong part of the code is:
avs_ctrl_writedata = 0x8A680001;
avs_ctrl_writedata = 0x8A680002;
avs_ctrl_writedata = 0x8A680003;
avs_ctrl_writedata = 0x8A680000;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
avs_ctrl_writedata = 0xEA680001;
avs_ctrl_writedata = 0... | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit res... |
The wrong part of the code is:
uint32 avs_ctrl_writedata;
avs_ctrl_writedata = 0;
avs_ctrl_writedata = 0xEA680001;
avs_ctrl_writedata = 0xEA680002;
avs_ctrl_writedata = 0xEA680003;
avs_ctrl_writedata = 0xEA680004;
The right code snippet is:
uint32 avs_ctrl_writedata;
avs_ctrl_writedata = 0;
avs_ctrl_wr... | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit reset, b... |
The right code snippet is:
uint32 avs_ctrl_writedata;
avs_ctrl_writedata = 0;
avs_ctrl_writedata = 0xEA680001;
avs_ctrl_writedata = 0xEA680002;
avs_ctrl_writedata = 0xEA680003;
avs_ctrl_writedata = 0xEA680000; | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_control... |
The wrong part of the code is:
uint32 avs_ctrl_writedata;
avs_ctrl_writedata = 0;
avs_ctrl_writedata = 0xEA680001;
avs_ctrl_writedata = 0xEA680002;
avs_ctrl_writedata = 0xEA680003;
avs_ctrl_writedata = 0xEA680004;
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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ... |
The wrong part of the code is:
uint32 avs_ctrl_writedata;
avs_ctrl_writedata = 0;
avs_ctrl_writedata = 0xEA680001;
avs_ctrl_writedata = 0xEA680002;
avs_ctrl_writedata = 0xEA680003;
avs_ctrl_writedata = 0xEA680004;
The high-level-synthesis bug type of the code is: BUF
The right code snippet is:
uint... | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit res... |
The wrong part of the code is:
#pragma HLS array_partition variable=pwm_frequent block factor=2 dim=1
The right code snippet is:
#pragma HLS array_partition variable=pwm_frequent cyclic factor=2 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_none port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit reset, b... |
The right code snippet is:
#pragma HLS array_partition variable=pwm_frequent cyclic factor=2 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_none port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_control... |
The wrong part of the code is:
#pragma HLS array_partition variable=pwm_frequent block factor=2 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_none port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ... |
The wrong part of the code is:
#pragma HLS array_partition variable=pwm_frequent block factor=2 dim=1
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pragma HLS array_partition variable=pwm_frequent cyclic factor=2 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_none port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit res... |
The wrong part of the code is:
#pragma HLS array_partition variable=pwm_frequent cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS array_partition variable=pwm_frequent 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:
#pragma HLS INTERFACE ap_none port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit reset, b... |
The right code snippet is:
#pragma HLS array_partition variable=pwm_frequent 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:
#pragma HLS INTERFACE ap_none port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_control... |
The wrong part of the code is:
#pragma HLS array_partition variable=pwm_frequent 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:
#pragma HLS INTERFACE ap_none port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ... |
The wrong part of the code is:
#pragma HLS array_partition variable=pwm_frequent 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=pwm_frequent 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:
#pragma HLS INTERFACE ap_none port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit res... |
The wrong part of the code is:
#pragma HLS dataflow wait
The right code snippet is:
#pragma HLS dataflow | DFP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit reset, b... |
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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_control... |
The wrong part of the code is:
#pragma HLS dataflow wait
The high-level-synthesis bug type of the code is: DFP | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ... |
The wrong part of the code is:
#pragma HLS dataflow wait
The high-level-synthesis bug type of the code is: DFP
The right code snippet is:
#pragma HLS dataflow | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_vld port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit rese... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=reset
The right code snippet is:
#pragma HLS INTERFACE ap_none port=reset | IDAP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_vld port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit reset, bi... |
The right code snippet is:
#pragma HLS INTERFACE ap_none port=reset | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_vld port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controll... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=reset
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_vld port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef a... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_vld port=reset
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
#pragma HLS INTERFACE ap_none port=reset | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit res... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=mem random
The right code snippet is:
#pragma HLS INTERFACE m_axi port=mem | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_controller(bit reset, b... |
The right code snippet is:
#pragma HLS INTERFACE m_axi port=mem | 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=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ap_uint<32> uint32;
void fan_control... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=mem random
The high-level-synthesis bug type of the code is: RAMB | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=reset
#pragma HLS INTERFACE ap_none port=fan
#include <ap_fixed.h>
typedef ap_uint<1> bit;
typedef ... |
The wrong part of the code is:
#pragma HLS INTERFACE m_axi port=mem random
The high-level-synthesis bug type of the code is: RAMB
The right code snippet is:
#pragma HLS INTERFACE m_axi port=mem | 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 s_axilite port=return
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=in
#pragma HLS INTERFACE s_axilite port=par
#pragma HLS INTER... |
The wrong part of the code is:
bool parity;
Bug_type:
OOB
The right code snippet is:
bool parity = in.data[0]; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE s_axilite port=return
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=in
#pragma HLS INTERFACE s_axilite port=par
#pragma HLS INTERFACE ... |
The right code snippet is:
bool parity = in.data[0]; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE s_axilite port=return
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=in
#pragma HLS INTERFACE s_axilite port=par
#pragm... |
The wrong part of the code is:
bool parity;
Bug_type:
OOB
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 s_axilite port=return
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=in
#pragma HL... |
The wrong part of the code is:
bool parity;
Bug_type:
OOB
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
bool parity = in.data[0]; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void top_module(
hls::stream<bool>& clk,
hls::stream<bool>& reset,
hls::stream<ap_uint<8> >& d,
hls::stream<ap_uint<8> >& q
) {
#pragma HLS I... |
The wrong part of the code is:
if (reset.read()) {
count_out = count_out;
} else {
count_out++;
}
The right code snippet is:
if (reset.read()) {
count_out = 0;
} else {
count_out++;
} | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_math.h>
void top_module(
hls::stream<bool>& clk,
hls::stream<bool>& reset,
hls::stream<ap_uint<8> >& d,
hls::stream<ap_uint<8> >& q
) {
#pragma HLS INTERF... |
The right code snippet is:
if (reset.read()) {
count_out = 0;
} else {
count_out++;
} | '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 <hls_math.h>
void top_module(
hls::stream<bool>& clk,
hls::stream<bool>& reset,
hls::stream<ap_uint<8> >& d,
hls::stream<ap_uint<8> >& q
) {
#p... |
The wrong part of the code is:
if (reset.read()) {
count_out = count_out;
} else {
count_out++;
}
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 <hls_math.h>
void top_module(
hls::stream<bool>& clk,
hls::stream<bool>& reset,
hls::stream<ap_uint<8> >& d,
h... |
The wrong part of the code is:
if (reset.read()) {
count_out = count_out;
} else {
count_out++;
}
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
if (reset.read()) {
count_out = 0;
} else {
count_out++;
} | '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 <hls_math.h>
void top_module(
hls::stream<bool>& clk,
hls::stream<bool>& reset,
hls::stream<ap_uint<8> >& d,
hls::stream<ap_uint<8> >& q
) {
#pragma HLS I... |
The wrong part of the code is:
ap_uint<8> select_out[10];
The right code snippet is:
ap_uint<8> select_out; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_math.h>
void top_module(
hls::stream<bool>& clk,
hls::stream<bool>& reset,
hls::stream<ap_uint<8> >& d,
hls::stream<ap_uint<8> >& q
) {
#pragma HLS INTERF... |
The right code snippet is:
ap_uint<8> select_out; | '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 <hls_math.h>
void top_module(
hls::stream<bool>& clk,
hls::stream<bool>& reset,
hls::stream<ap_uint<8> >& d,
hls::stream<ap_uint<8> >& q
) {
#p... |
The wrong part of the code is:
ap_uint<8> select_out[10];
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 <hls_math.h>
void top_module(
hls::stream<bool>& clk,
hls::stream<bool>& reset,
hls::stream<ap_uint<8> >& d,
h... |
The wrong part of the code is:
ap_uint<8> select_out[10];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
ap_uint<8> select_out; | '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 <hls_math.h>
void top_module(
hls::stream<bool>& clk,
hls::stream<bool>& reset,
hls::stream<ap_uint<8> >& d,
hls::stream<ap_uint<8> >& q
) {
#pragma HLS I... |
The wrong part of the code is:
count_out<<10;
The right code snippet is:
count_out++; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <hls_math.h>
void top_module(
hls::stream<bool>& clk,
hls::stream<bool>& reset,
hls::stream<ap_uint<8> >& d,
hls::stream<ap_uint<8> >& q
) {
#pragma HLS INTERF... |
The right code snippet is:
count_out++; | '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 <hls_math.h>
void top_module(
hls::stream<bool>& clk,
hls::stream<bool>& reset,
hls::stream<ap_uint<8> >& d,
hls::stream<ap_uint<8> >& q
) {
#p... |
The wrong part of the code is:
count_out<<10;
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 <hls_math.h>
void top_module(
hls::stream<bool>& clk,
hls::stream<bool>& reset,
hls::stream<ap_uint<8> >& d,
h... |
The wrong part of the code is:
count_out<<10;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
count_out++; | 'SHFT' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.