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:
```
#include <ap_int.h>
#pragma HLS array_partition variable=A cyclic factor=3 dim=2
#pragma HLS array_partition variable=B cyclic factor=3 dim=2
void compare_module(ap_uint<9> A, ap_... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=3 dim=2
#pragma HLS array_partition variable=B cyclic factor=3 dim=2
void compare_module(ap_uint<9> A, ap_uint<9> B, ap_uint<9> &result) {
The right code snippet is:
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_ui... | DID |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
#pragma HLS array_partition variable=A cyclic factor=3 dim=2
#pragma HLS array_partition variable=B cyclic factor=3 dim=2
void compare_module(ap_uint<9> A, ap_uint<... |
The right code snippet is:
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) { | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
#pragma HLS array_partition variable=A cyclic factor=3 dim=2
#pragma HLS array_partition variable=B cyclic factor=3 dim=2
void compare_module(ap_uin... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=3 dim=2
#pragma HLS array_partition variable=B cyclic factor=3 dim=2
void compare_module(ap_uint<9> A, ap_uint<9> B, ap_uint<9> &result) {
The high-level-synthesis bug type of the code is: DID | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
#pragma HLS array_partition variable=A cyclic factor=3 dim=2
#pragma HLS array_partition variable=B cyclic fact... |
The wrong part of the code is:
#pragma HLS array_partition variable=A cyclic factor=3 dim=2
#pragma HLS array_partition variable=B cyclic factor=3 dim=2
void compare_module(ap_uint<9> A, ap_uint<9> B, ap_uint<9> &result) {
The high-level-synthesis bug type of the code is: DID
The right code snippet is:... | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
#pragma HLS interface m_axi port=A offset=slave bundle=gmem
#pragma HLS interface m_axi port=B offset=slave bundle=gmem
#pragma HLS interface m_axi port=result... |
The wrong part of the code is:
#pragma HLS interface m_axi port=A offset=slave bundle=gmem
#pragma HLS interface m_axi port=B offset=slave bundle=gmem
#pragma HLS interface m_axi port=result offset=slave bundle=gmem
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
The right code snippe... | RAMB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
#pragma HLS interface m_axi port=A offset=slave bundle=gmem
#pragma HLS interface m_axi port=B offset=slave bundle=gmem
#pragma HLS interface m_axi port=result offs... |
The right code snippet is:
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) { | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
#pragma HLS interface m_axi port=A offset=slave bundle=gmem
#pragma HLS interface m_axi port=B offset=slave bundle=gmem
#pragma HLS interface m_axi ... |
The wrong part of the code is:
#pragma HLS interface m_axi port=A offset=slave bundle=gmem
#pragma HLS interface m_axi port=B offset=slave bundle=gmem
#pragma HLS interface m_axi port=result offset=slave bundle=gmem
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
The high-level-synthe... | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
#pragma HLS interface m_axi port=A offset=slave bundle=gmem
#pragma HLS interface m_axi port=B offset=slave bun... |
The wrong part of the code is:
#pragma HLS interface m_axi port=A offset=slave bundle=gmem
#pragma HLS interface m_axi port=B offset=slave bundle=gmem
#pragma HLS interface m_axi port=result offset=slave bundle=gmem
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
The high-level-synthe... | RAMB |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port... |
The wrong part of the code is:
int temp = A ^ B;
result = temp;
The right code snippet is:
result = A ^ B; | USE |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE ap_none port=A
... |
The right code snippet is:
result = A ^ B; | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE a... |
The wrong part of the code is:
int temp = A ^ B;
result = temp;
The high-level-synthesis bug type of the code is: USE | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
#pragma HLS INTERFACE ap_ctrl_none po... |
The wrong part of the code is:
int temp = A ^ B;
result = temp;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
result = A ^ B; | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
#pragma HLS pipeline II=2
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma ... |
The wrong part of the code is:
#pragma HLS pipeline II=2
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
The right code snippet is:
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) { | MLP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
#pragma HLS pipeline II=2
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS I... |
The right code snippet is:
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) { | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
#pragma HLS pipeline II=2
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
#pragma HLS pipeline II=2
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
The high-level-synthesis bug type of the code is: MLP | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
#pragma HLS pipeline II=2
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
#pragma HLS... |
The wrong part of the code is:
#pragma HLS pipeline II=2
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) {
The high-level-synthesis bug type of the code is: MLP
The right code snippet is:
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) { | MLP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
#pragma HLS array_partition variable=A block factor=2 dim=1
#pragma HLS array_partition variable
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma... |
The wrong part of the code is:
#pragma HLS array_partition variable=A block factor=2 dim=1
#pragma HLS array_partition variable
The right code snippet is:
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) { | APT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
#pragma HLS array_partition variable=A block factor=2 dim=1
#pragma HLS array_partition variable
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS ... |
The right code snippet is:
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) { | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
#pragma HLS array_partition variable=A block factor=2 dim=1
#pragma HLS array_partition variable
#pragma HLS INTERFACE ap_ctrl_none port=return
... |
The wrong part of the code is:
#pragma HLS array_partition variable=A block factor=2 dim=1
#pragma HLS array_partition variable
The high-level-synthesis bug type of the code is: APT | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
#pragma HLS array_partition variable=A block factor=2 dim=1
#pragma HLS array_partition variable
#pragma HL... |
The wrong part of the code is:
#pragma HLS array_partition variable=A block factor=2 dim=1
#pragma HLS array_partition variable
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
void compare_module(ap_uint<4> A, ap_uint<4> B, ap_uint<4> &result) { | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<32> mem[102... |
The wrong part of the code is:
rd_data = mem[addr+1];
The right code snippet is:
rd_data = mem[addr]; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<32> mem[1024]; /... |
The right code snippet is:
rd_data = mem[addr]; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<... |
The wrong part of the code is:
rd_data = mem[addr+1];
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_ui... |
The wrong part of the code is:
rd_data = mem[addr+1];
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
rd_data = mem[addr]; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
ap_uint<32> mem[1024]; // ... |
The wrong part of the code is:
ap_uint<32> mem[1024];
The right code snippet is:
static ap_uint<32> mem[1024]; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
ap_uint<32> mem[1024]; // Memor... |
The right code snippet is:
static ap_uint<32> mem[1024]; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
ap_uint<32> mem... |
The wrong part of the code is:
ap_uint<32> mem[1024];
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_ui... |
The wrong part of the code is:
ap_uint<32> mem[1024];
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static ap_uint<32> mem[1024]; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<32> mem[102... |
The wrong part of the code is:
addr >> 50;
The right code snippet is:
addr >> 5; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<32> mem[1024]; /... |
The right code snippet is:
addr >> 5; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<... |
The wrong part of the code is:
addr >> 50;
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_ui... |
The wrong part of the code is:
addr >> 50;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
addr >> 5; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<32> mem[102... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
mem[i] = 0;
}
The right code snippet is:
for (int i = 0; i < 1024; i++) {
mem[i] = 0;
} | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<32> mem[1024]; /... |
The right code snippet is:
for (int i = 0; i < 1024; i++) {
mem[i] = 0;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
mem[i] = 0;
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_ui... |
The wrong part of the code is:
for (int i = 0; i >= 0; i++) {
mem[i] = 0;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
for (int i = 0; i < 1024; i++) {
mem[i] = 0;
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_int<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<32> mem[1024... |
The wrong part of the code is:
ap_int<32> wr_data,
The right code snippet is:
ap_uint<32> wr_data, | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_int<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<32> mem[1024]; //... |
The right code snippet is:
ap_uint<32> wr_data, | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_int<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<3... |
The wrong part of the code is:
ap_int<32> wr_data,
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_int<32> wr_data,
ap_uin... |
The wrong part of the code is:
ap_int<32> wr_data,
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_uint<32> wr_data, | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<32> mem[102... |
The wrong part of the code is:
mem[0] = 0;
mem[1] = 0;
mem[2] = 0;
mem[3] = 0;
mem[4] = 0;
mem[5] = 0;
mem[6] = 0;
mem[7] = 0;
mem[8] = 0;
mem[9] = 0;
mem[10] = 0;
mem[11] = 0;
mem[12] = 0;
mem[13] = 0;
mem[14] = 0;
mem[15] = 0;
mem[16] = 0;
mem[17] = 0;
mem[18] = 0;
mem[19] = 0;
mem[20] = 0;
mem[21] = 0;
mem[... | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<32> mem[1024]; /... |
The right code snippet is:
for (int i = 0; i < 1024; i++) {
mem[i] = 0;
} | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_uint<32> &rd_data
) {
static ap_uint<... |
The wrong part of the code is:
mem[0] = 0;
mem[1] = 0;
mem[2] = 0;
mem[3] = 0;
mem[4] = 0;
mem[5] = 0;
mem[6] = 0;
mem[7] = 0;
mem[8] = 0;
mem[9] = 0;
mem[10] = 0;
mem[11] = 0;
mem[12] = 0;
mem[13] = 0;
mem[14] = 0;
mem[15] = 0;
mem[16] = 0;
mem[17] = 0;
mem[18] = 0;
mem[19] = 0;
mem[20] = 0;
mem[21] = 0;
mem[... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <ap_int.h>
void memory_controller (
bool rst,
bool rd_en,
bool wr_en,
ap_uint<32> addr,
ap_uint<32> wr_data,
ap_ui... |
The wrong part of the code is:
mem[0] = 0;
mem[1] = 0;
mem[2] = 0;
mem[3] = 0;
mem[4] = 0;
mem[5] = 0;
mem[6] = 0;
mem[7] = 0;
mem[8] = 0;
mem[9] = 0;
mem[10] = 0;
mem[11] = 0;
mem[12] = 0;
mem[13] = 0;
mem[14] = 0;
mem[15] = 0;
mem[16] = 0;
mem[17] = 0;
mem[18] = 0;
mem[19] = 0;
mem[20] = 0;
mem[21] = 0;
mem[... | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
case 1: seg_ou... |
The wrong part of the code is:
case 16: seg_out = 0b0001111; //F
break;
The right code snippet is:
case 15: seg_out = 0b0001111; //F
break; | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
case 1: seg_out = 0... |
The right code snippet is:
case 15: seg_out = 0b0001111; //F
break; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
cas... |
The wrong part of the code is:
case 16: seg_out = 0b0001111; //F
break;
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000... |
The wrong part of the code is:
case 16: seg_out = 0b0001111; //F
break;
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
case 15: seg_out = 0b0001111; //F
break; | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7> seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
case 1: seg_out... |
The wrong part of the code is:
ap_uint<7> seg_out
The right code snippet is:
ap_uint<7>& seg_out | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7> seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
case 1: seg_out = 0b... |
The right code snippet is:
ap_uint<7>& seg_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 <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7> seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
case... |
The wrong part of the code is:
ap_uint<7> seg_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 <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7> seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000;... |
The wrong part of the code is:
ap_uint<7> seg_out
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
ap_uint<7>& seg_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 <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
while(true) {
case 0: seg_out = 0b0100000; //0
break;
case 1: seg_out = ... |
The wrong part of the code is:
while(true) {
The right code snippet is:
switch(bin_num) { | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
while(true) {
case 0: seg_out = 0b0100000; //0
break;
case 1: seg_out = 0b011... |
The right code snippet is:
switch(bin_num) { | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
while(true) {
case 0: seg_out = 0b0100000; //0
break;
case 1:... |
The wrong part of the code is:
while(true) {
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
while(true) {
case 0: seg_out = 0b0100000; /... |
The wrong part of the code is:
while(true) {
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
switch(bin_num) { | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
case 1: seg_ou... |
The wrong part of the code is:
case 5: seg_out = 0xFFFFF001; //5
The right code snippet is:
case 5: seg_out = 0b0001001; //5 | 'USE' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
case 1: seg_out = 0... |
The right code snippet is:
case 5: seg_out = 0b0001001; //5 | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
cas... |
The wrong part of the code is:
case 5: seg_out = 0xFFFFF001; //5
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000... |
The wrong part of the code is:
case 5: seg_out = 0xFFFFF001; //5
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
case 5: seg_out = 0b0001001; //5 | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
case 1: seg_ou... |
The wrong part of the code is:
case 12: seg_out = 0b0011110; //C
The right code snippet is:
case 12: seg_out = 0b0000110; //C | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
case 1: seg_out = 0... |
The right code snippet is:
case 12: seg_out = 0b0000110; //C | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
cas... |
The wrong part of the code is:
case 12: seg_out = 0b0011110; //C
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000... |
The wrong part of the code is:
case 12: seg_out = 0b0011110; //C
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
case 12: seg_out = 0b0000110; //C | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7> seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
case 1: seg_out... |
The wrong part of the code is:
void hex7seg(ap_uint<4> bin_num, ap_uint<7> seg_out) {
The right code snippet is:
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) { | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7> seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
case 1: seg_out = 0b... |
The right code snippet is:
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_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:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7> seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;
case... |
The wrong part of the code is:
void hex7seg(ap_uint<4> bin_num, ap_uint<7> seg_out) {
The high-level-synthesis bug type of the code is: 'IDAP' | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7> seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000;... |
The wrong part of the code is:
void hex7seg(ap_uint<4> bin_num, ap_uint<7> seg_out) {
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_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:
```
#include <ap_int.h>
#pragma HLS pipeline II=2
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
b... |
The wrong part of the code is:
#pragma HLS pipeline II=2
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
The right code snippet is:
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) { | 'MLP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
#pragma HLS pipeline II=2
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
break;... |
The right code snippet is:
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) { | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
#pragma HLS pipeline II=2
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
... |
The wrong part of the code is:
#pragma HLS pipeline II=2
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
The high-level-synthesis bug type of the code is: 'MLP' | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
#pragma HLS pipeline II=2
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
switch(bin_num) {
c... |
The wrong part of the code is:
#pragma HLS pipeline II=2
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
The high-level-synthesis bug type of the code is: 'MLP'
The right code snippet is:
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) { | 'MLP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
#pragma HLS unroll factor=2
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
... |
The wrong part of the code is:
#pragma HLS unroll factor=2
switch(bin_num) {
The right code snippet is:
switch(bin_num) { | 'ILNU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
#pragma HLS unroll factor=2
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
brea... |
The right code snippet is:
switch(bin_num) { | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
#pragma HLS unroll factor=2
switch(bin_num) {
case 0: seg_out = 0b0100000; //0
... |
The wrong part of the code is:
#pragma HLS unroll factor=2
switch(bin_num) {
The high-level-synthesis bug type of the code is: 'ILNU' | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
#include <ap_int.h>
void hex7seg(ap_uint<4> bin_num, ap_uint<7>& seg_out) {
#pragma HLS unroll factor=2
switch(bin_num) {
... |
The wrong part of the code is:
#pragma HLS unroll factor=2
switch(bin_num) {
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
switch(bin_num) { | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#pragma HLS I... |
The wrong part of the code is:
float fvco = fin * M / (N-1);
The right code snippet is:
float fvco = fin * M / N; | '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 pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#pragma HLS INTERF... |
The right code snippet is:
float fvco = fin * M / N; | '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 pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#p... |
The wrong part of the code is:
float fvco = fin * M / (N-1);
The high-level-synthesis bug type of the code is: 'OOB' | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma ... |
The wrong part of the code is:
float fvco = fin * M / (N-1);
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
float fvco = fin * M / N; | '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 pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#pragma HLS I... |
The wrong part of the code is:
static bool clk_div;
The right code snippet is:
static bool clk_div = false; | '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 pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#pragma HLS INTERF... |
The right code snippet is:
static bool clk_div = false; | '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 pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#p... |
The wrong part of the code is:
static bool clk_div;
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 pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma ... |
The wrong part of the code is:
static bool clk_div;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static bool clk_div = false; | '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 pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#pragma HLS I... |
The wrong part of the code is:
phase_error += cp_gain << (clk_fb - clk_out);
The right code snippet is:
phase_error += cp_gain * (clk_fb - clk_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 pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#pragma HLS INTERF... |
The right code snippet is:
phase_error += cp_gain * (clk_fb - clk_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 pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#p... |
The wrong part of the code is:
phase_error += cp_gain << (clk_fb - clk_out);
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 pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma ... |
The wrong part of the code is:
phase_error += cp_gain << (clk_fb - clk_out);
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
phase_error += cp_gain * (clk_fb - clk_out); | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#pragma HLS I... |
The wrong part of the code is:
int i = 0;
while (i < 10) {
// Loop that terminates after 10 iterations
i++;
}
The right code snippet is:
while (true) {
// Infinite loop
} | 'INF' |
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 pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#pragma HLS INTERF... |
The right code snippet is:
while (true) {
// Infinite loop
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_math.h>
void pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#p... |
The wrong part of the code is:
int i = 0;
while (i < 10) {
// Loop that terminates after 10 iterations
i++;
}
The high-level-synthesis bug type of the code is: 'INF' | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma ... |
The wrong part of the code is:
int i = 0;
while (i < 10) {
// Loop that terminates after 10 iterations
i++;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
while (true) {
// Infinite loop
} | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#pragma HLS I... |
The wrong part of the code is:
int fvco = fin * M / N;
The right code snippet is:
float fvco = fin * M / N; | 'USE' |
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 pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#pragma HLS INTERF... |
The right code snippet is:
float fvco = fin * M / N; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_math.h>
void pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#p... |
The wrong part of the code is:
int fvco = fin * M / N;
The high-level-synthesis bug type of the code is: 'USE' | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma ... |
The wrong part of the code is:
int fvco = fin * M / N;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
float fvco = fin * M / N; | 'USE' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#pragma HLS I... |
The wrong part of the code is:
for (int i = 0; i < 10; i+=2) {
// Code that manually unrolls a loop with incorrect step size
do_something(i);
do_something(i+1);
}
The right code snippet is:
for (int i = 0; i < 10; i++) {
// Code that manually unrolls a loop
do_something(i);
do_s... | 'MLU' |
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 pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#pragma HLS INTERF... |
The right code snippet is:
for (int i = 0; i < 10; i++) {
// Code that manually unrolls a loop
do_something(i);
do_something(i+1);
do_something(i+2);
} | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#include <hls_math.h>
void pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis off port=c0
#p... |
The wrong part of the code is:
for (int i = 0; i < 10; i+=2) {
// Code that manually unrolls a loop with incorrect step size
do_something(i);
do_something(i+1);
}
The high-level-synthesis bug type of the code is: 'MLU' | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#include <hls_math.h>
void pll108MHz(
bool inclk0,
bool &c0
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma ... |
The wrong part of the code is:
for (int i = 0; i < 10; i+=2) {
// Code that manually unrolls a loop with incorrect step size
do_something(i);
do_something(i+1);
}
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
for (int i = 0; i < 10; i++) {
// Cod... | 'MLU' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.