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 <hls_math.h>
void Energy_Harvesting_Block(int env[n], int& power) {
int env_reg[n]; // register to store environmental signals
int power_reg; // register to store... |
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:
```
#include <hls_math.h>
void Energy_Harvesting_Block(int env[n], int& power) {
int env_reg[n]; // register to store environmental signals
int power_reg; // register to store gene... |
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:
```
#include <hls_math.h>
void Energy_Harvesting_Block(int env[n], int& power) {
int env_reg[n]; // register to store environmental signals
int power_reg; // regist... |
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:
```
#include <hls_math.h>
void Energy_Harvesting_Block(int env[n], int& power) {
int env_reg[n]; // register to store environmental... |
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:
```
#include <hls_math.h>
void Energy_Harvesting_Block(int env[n], int& power) {
int env_reg[n]; // register to store environmental signals
int power_reg; // register to store... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 1; i < n; i++) {
The right code snippet is:
for (int i = 1; i < n; i++) { | 'ILNU' |
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 Energy_Harvesting_Block(int env[n], int& power) {
int env_reg[n]; // register to store environmental signals
int power_reg; // register to store gene... |
The right code snippet is:
for (int i = 1; i < n; i++) { | '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 <hls_math.h>
void Energy_Harvesting_Block(int env[n], int& power) {
int env_reg[n]; // register to store environmental signals
int power_reg; // regist... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 1; i < n; i++) {
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 <hls_math.h>
void Energy_Harvesting_Block(int env[n], int& power) {
int env_reg[n]; // register to store environmental... |
The wrong part of the code is:
#pragma HLS unroll
for (int i = 1; i < n; i++) {
The high-level-synthesis bug type of the code is: 'ILNU'
The right code snippet is:
for (int i = 1; i < n; i++) { | 'ILNU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
... |
The wrong part of the code is:
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
case 8: out = inD; break;
}
The right code snippet is:
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;... | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
c... |
The right code snippet is:
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
case 3: out = inD; 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:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; ... |
The wrong part of the code is:
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
case 8: out = inD; 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:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = in... |
The wrong part of the code is:
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
case 8: out = inD; break;
}
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
switch(select) {
case 0: out = inA; 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:
int mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
... |
The wrong part of the code is:
int mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
The right code snippet is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) { | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
int mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
ca... |
The right code snippet is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) { | 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:
int mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; b... |
The wrong part of the code is:
int mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
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:
int mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = inA... |
The wrong part of the code is:
int mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) { | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
while(1) {
switch(select) {
case 0: out = inA; break;
cas... |
The wrong part of the code is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
while(1) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
case 3: out = inD; brea... | INF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
while(1) {
switch(select) {
case 0: out = inA; break;
case 1: ... |
The right code snippet is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
case 3: out = inD; break;
}
} | 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:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
while(1) {
switch(select) {
case 0: out = inA; break;
... |
The wrong part of the code is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
while(1) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
case 3: out = inD; brea... | 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:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
while(1) {
switch(select) {
... |
The wrong part of the code is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
while(1) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
case 3: out = inD; brea... | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
for(int i = 0; i < 2; i++) {
switch(select[i]) {
case 0: out = inA; b... |
The wrong part of the code is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
for(int i = 0; i < 2; i++) {
switch(select[i]) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
ca... | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
for(int i = 0; i < 2; i++) {
switch(select[i]) {
case 0: out = inA; break;... |
The right code snippet is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
case 3: out = inD; break;
}
} | 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:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
for(int i = 0; i < 2; i++) {
switch(select[i]) {
case 0: o... |
The wrong part of the code is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
for(int i = 0; i < 2; i++) {
switch(select[i]) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
ca... | 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:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
for(int i = 0; i < 2; i++) {
swit... |
The wrong part of the code is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
for(int i = 0; i < 2; i++) {
switch(select[i]) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
ca... | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void mux4to1 (unsigned int inA[8], unsigned int inB[8], unsigned int inC[8], unsigned int inD[8], unsigned int select[2], unsigned int out[8]) {
switch(select) {
case 0: ou... |
The wrong part of the code is:
void mux4to1 (unsigned int inA[8], unsigned int inB[8], unsigned int inC[8], unsigned int inD[8], unsigned int select[2], unsigned int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
case... | USE |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
void mux4to1 (unsigned int inA[8], unsigned int inB[8], unsigned int inC[8], unsigned int inD[8], unsigned int select[2], unsigned int out[8]) {
switch(select) {
case 0: out = i... |
The right code snippet is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
case 3: out = inD; break;
}
} | 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:
void mux4to1 (unsigned int inA[8], unsigned int inB[8], unsigned int inC[8], unsigned int inD[8], unsigned int select[2], unsigned int out[8]) {
switch(select) {
... |
The wrong part of the code is:
void mux4to1 (unsigned int inA[8], unsigned int inB[8], unsigned int inC[8], unsigned int inD[8], unsigned int select[2], unsigned int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
case... | 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:
void mux4to1 (unsigned int inA[8], unsigned int inB[8], unsigned int inC[8], unsigned int inD[8], unsigned int select[2], unsigned int o... |
The wrong part of the code is:
void mux4to1 (unsigned int inA[8], unsigned int inB[8], unsigned int inC[8], unsigned int inD[8], unsigned int select[2], unsigned int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
case 2: out = inC; break;
case... | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
... |
The wrong part of the code is:
#pragma HLS array_partition variable=inA cyclic factor=2 dim=2
#pragma HLS array_partition variable=inB cyclic factor=2 dim=1
#pragma HLS array_partition variable=inC cyclic factor=2
The right code snippet is:
#pragma HLS array_partition variable=inA 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:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; break;
c... |
The right code snippet is:
#pragma HLS array_partition variable=inA cyclic factor=2 dim=1
#pragma HLS array_partition variable=inB cyclic factor=2 dim=1
#pragma HLS array_partition variable=inC cyclic factor=2 dim=1
#pragma HLS array_partition variable=inD 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:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = inA; break;
case 1: out = inB; ... |
The wrong part of the code is:
#pragma HLS array_partition variable=inA cyclic factor=2 dim=2
#pragma HLS array_partition variable=inB cyclic factor=2 dim=1
#pragma HLS array_partition variable=inC cyclic factor=2
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:
void mux4to1 (int inA[8], int inB[8], int inC[8], int inD[8], int select[2], int out[8]) {
switch(select) {
case 0: out = in... |
The wrong part of the code is:
#pragma HLS array_partition variable=inA cyclic factor=2 dim=2
#pragma HLS array_partition variable=inB cyclic factor=2 dim=1
#pragma HLS array_partition variable=inC cyclic factor=2
The high-level-synthesis bug type of the code is: APT
The right code snippet is:
#pra... | APT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_R,
ap_uint<10> &VGA_G,
ap_uint<10> &VGA_... |
The wrong part of the code is:
if (col == 800) {
col = 0;
if (row == 524) {
row = 0;
vsync = 1;
} else if (row == 525) {
vsync = 0;
hsync = 1;
} else if (row == 624) {
hsync = 0;
blank = 1;
} else if (row == 625) {
blank = 0;
r... | 'OOB' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_R,
ap_uint<10> &VGA_G,
ap_uint<10> &VGA_B,
... |
The right code snippet is:
if (col == 799) {
col = 0;
if (row == 524) {
row = 0;
vsync = 1;
} else if (row == 525) {
vsync = 0;
hsync = 1;
} else if (row == 624) {
hsync = 0;
blank = 1;
} else if (row == 625) {
blank = 0;
row =... | '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:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_R,
ap_uint<10> &VGA_G,
ap_uin... |
The wrong part of the code is:
if (col == 800) {
col = 0;
if (row == 524) {
row = 0;
vsync = 1;
} else if (row == 525) {
vsync = 0;
hsync = 1;
} else if (row == 624) {
hsync = 0;
blank = 1;
} else if (row == 625) {
blank = 0;
r... | '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:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_... |
The wrong part of the code is:
if (col == 800) {
col = 0;
if (row == 524) {
row = 0;
vsync = 1;
} else if (row == 525) {
vsync = 0;
hsync = 1;
} else if (row == 624) {
hsync = 0;
blank = 1;
} else if (row == 625) {
blank = 0;
r... | 'OOB' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_R,
ap_uint<10> &VGA_G,
ap_uint<10> &VGA_... |
The wrong part of the code is:
ap_uint<2> color;
ap_uint<2> color_next;
ap_uint<16> pixel_data;
ap_uint<1> pixel_data_valid;
ap_uint<10> r_out;
ap_uint<10> g_out;
ap_uint<10> b_out;
ap_uint<1> vsync;
ap_uint<1> hsync;
ap_uint<1> blank;
The right code snippet is:
ap_uint<2> color = 0;
ap_uint<2> color_n... | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_R,
ap_uint<10> &VGA_G,
ap_uint<10> &VGA_B,
... |
The right code snippet is:
ap_uint<2> color = 0;
ap_uint<2> color_next = 0;
ap_uint<16> pixel_data = 0;
ap_uint<1> pixel_data_valid = 0;
ap_uint<10> r_out = 0;
ap_uint<10> g_out = 0;
ap_uint<10> b_out = 0;
ap_uint<1> vsync = 0;
ap_uint<1> hsync = 0;
ap_uint<1> blank = 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:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_R,
ap_uint<10> &VGA_G,
ap_uin... |
The wrong part of the code is:
ap_uint<2> color;
ap_uint<2> color_next;
ap_uint<16> pixel_data;
ap_uint<1> pixel_data_valid;
ap_uint<10> r_out;
ap_uint<10> g_out;
ap_uint<10> b_out;
ap_uint<1> vsync;
ap_uint<1> hsync;
ap_uint<1> blank;
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:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_... |
The wrong part of the code is:
ap_uint<2> color;
ap_uint<2> color_next;
ap_uint<16> pixel_data;
ap_uint<1> pixel_data_valid;
ap_uint<10> r_out;
ap_uint<10> g_out;
ap_uint<10> b_out;
ap_uint<1> vsync;
ap_uint<1> hsync;
ap_uint<1> blank;
The high-level-synthesis bug type of the code is: 'INIT'
The right ... | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_R,
ap_uint<10> &VGA_G,
ap_uint<10> &VGA_... |
The wrong part of the code is:
if (col == 799) {
col = 0;
if (row == 524) {
row = 0;
vsync = 1;
} else if (row == 525) {
vsync = 0;
hsync = 1;
} else if (row == 624) {
hsync = 0;
blank = 1;
} else if (row == 625) {
blank = 0;
r... | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_R,
ap_uint<10> &VGA_G,
ap_uint<10> &VGA_B,
... |
The right code snippet is:
if (col == 799) {
col = 0;
if (row == 524) {
row = 0;
vsync = 1;
} else if (row == 525) {
vsync = 0;
hsync = 1;
} else if (row == 624) {
hsync = 0;
blank = 1;
} else if (row == 625) {
blank = 0;
row =... | '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:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_R,
ap_uint<10> &VGA_G,
ap_uin... |
The wrong part of the code is:
if (col == 799) {
col = 0;
if (row == 524) {
row = 0;
vsync = 1;
} else if (row == 525) {
vsync = 0;
hsync = 1;
} else if (row == 624) {
hsync = 0;
blank = 1;
} else if (row == 625) {
blank = 0;
r... | '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:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_... |
The wrong part of the code is:
if (col == 799) {
col = 0;
if (row == 524) {
row = 0;
vsync = 1;
} else if (row == 525) {
vsync = 0;
hsync = 1;
} else if (row == 624) {
hsync = 0;
blank = 1;
} else if (row == 625) {
blank = 0;
r... | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_R,
ap_uint<10> &VGA_G,
ap_uint<10> &VGA_... |
The wrong part of the code is:
if (pixel_data_valid) {
while (col != 799) {
col = col + 1;
}
col = 0;
if (row == 524) {
row = 0;
vsync = 1;
} else if (row ==
The right code snippet is:
if (pixel_data_valid) {
if (col == 799) {
col = 0;
if ... | 'INF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_R,
ap_uint<10> &VGA_G,
ap_uint<10> &VGA_B,
... |
The right code snippet is:
if (pixel_data_valid) {
if (col == 799) {
col = 0;
if (row == 524) {
row = 0;
vsync = 1;
} else if (row == 525) {
vsync = 0;
hsync = 1;
} else if (row == 624) {
hsync = 0;
blan... | '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:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_R,
ap_uint<10> &VGA_G,
ap_uin... |
The wrong part of the code is:
if (pixel_data_valid) {
while (col != 799) {
col = col + 1;
}
col = 0;
if (row == 524) {
row = 0;
vsync = 1;
} else if (row ==
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:
Here's the HLS translation of the given Verilog code:
```
#include <ap_int.h>
void VGA_NIOS_CTRL(
ap_clk iCLK,
ap_uint<10> &VGA_... |
The wrong part of the code is:
if (pixel_data_valid) {
while (col != 799) {
col = col + 1;
}
col = 0;
if (row == 524) {
row = 0;
vsync = 1;
} else if (row ==
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
if (pixel_data... | 'INF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>& d_l1,
... |
The wrong part of the code is:
bool q_h0;
bool q_h1;
bool q_l0;
bool q_l1;
bool q_l0_neg;
bool q_l1_neg;
The right code snippet is:
bool q_h0 = 0;
bool q_h1 = 0;
bool q_l0 = 0;
bool q_l1 = 0;
bool q_l0_neg = 0;
bool q_l1_neg = 0; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>& d_l1,
hls:... |
The right code snippet is:
bool q_h0 = 0;
bool q_h1 = 0;
bool q_l0 = 0;
bool q_l1 = 0;
bool q_l0_neg = 0;
bool q_l1_neg = 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:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>... |
The wrong part of the code is:
bool q_h0;
bool q_h1;
bool q_l0;
bool q_l1;
bool q_l0_neg;
bool q_l1_neg;
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:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stre... |
The wrong part of the code is:
bool q_h0;
bool q_h1;
bool q_l0;
bool q_l1;
bool q_l0_neg;
bool q_l1_neg;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
bool q_h0 = 0;
bool q_h1 = 0;
bool q_l0 = 0;
bool q_l1 = 0;
bool q_l0_neg = ... | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>& d_l1,
... |
The wrong part of the code is:
while(1) {
#pragma HLS PIPELINE
// Read inputs
if(!d_h0.empty() && !d_h1.empty() && !d_l0.empty() && !d_l1.empty() && !clk.empty()) {
d_h0_val = d_h0.read();
d_h1_val = d_h1.read();
d_l0_val = d_l0.read();
d_l1_val =... | INF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>& d_l1,
hls:... |
The right code snippet is:
while(1) {
#pragma HLS PIPELINE
// Read inputs
if(!d_h0.empty() && !d_h1.empty() && !d_l0.empty() && !d_l1.empty() && !clk.empty()) {
d_h0_val = d_h0.read();
d_h1_val = d_h1.read();
d_l0_val = d_l0.read();
d_l1_val = d_l... | 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:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>... |
The wrong part of the code is:
while(1) {
#pragma HLS PIPELINE
// Read inputs
if(!d_h0.empty() && !d_h1.empty() && !d_l0.empty() && !d_l1.empty() && !clk.empty()) {
d_h0_val = d_h0.read();
d_h1_val = d_h1.read();
d_l0_val = d_l0.read();
d_l1_val =... | 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:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stre... |
The wrong part of the code is:
while(1) {
#pragma HLS PIPELINE
// Read inputs
if(!d_h0.empty() && !d_h1.empty() && !d_l0.empty() && !d_l1.empty() && !clk.empty()) {
d_h0_val = d_h0.read();
d_h1_val = d_h1.read();
d_l0_val = d_l0.read();
d_l1_val =... | INF |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>& d_l1,
... |
The wrong part of the code is:
if(!d_h0.empty() && !d_h1.empty() && !d_l0.empty() && d_l1.empty() && !clk.empty()) {
The right code snippet is:
if(!d_h0.empty() && !d_h1.empty() && !d_l0.empty() && !d_l1.empty() && !clk.empty()) { | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>& d_l1,
hls:... |
The right code snippet is:
if(!d_h0.empty() && !d_h1.empty() && !d_l0.empty() && !d_l1.empty() && !clk.empty()) { | 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:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>... |
The wrong part of the code is:
if(!d_h0.empty() && !d_h1.empty() && !d_l0.empty() && d_l1.empty() && !clk.empty()) {
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:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stre... |
The wrong part of the code is:
if(!d_h0.empty() && !d_h1.empty() && !d_l0.empty() && d_l1.empty() && !clk.empty()) {
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
if(!d_h0.empty() && !d_h1.empty() && !d_l0.empty() && !d_l1.empty() && !clk.empty()) { | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>& d_l1,
... |
The wrong part of the code is:
int q_h0 = 0;
int q_h1 = 0;
int q_l0 = 0;
int q_l1 = 0;
int q_l0_neg = 0;
int q_l1_neg = 0;
The right code snippet is:
bool q_h0 = 0;
bool q_h1 = 0;
bool q_l0 = 0;
bool q_l1 = 0;
bool q_l0_neg = 0;
bool q_l1_neg = 0; | USE |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>& d_l1,
hls:... |
The right code snippet is:
bool q_h0 = 0;
bool q_h1 = 0;
bool q_l0 = 0;
bool q_l1 = 0;
bool q_l0_neg = 0;
bool q_l1_neg = 0; | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>... |
The wrong part of the code is:
int q_h0 = 0;
int q_h1 = 0;
int q_l0 = 0;
int q_l1 = 0;
int q_l0_neg = 0;
int q_l1_neg = 0;
The high-level-synthesis bug type of the code is: USE | USE |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stre... |
The wrong part of the code is:
int q_h0 = 0;
int q_h1 = 0;
int q_l0 = 0;
int q_l1 = 0;
int q_l0_neg = 0;
int q_l1_neg = 0;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
bool q_h0 = 0;
bool q_h1 = 0;
bool q_l0 = 0;
bool q_l1 = 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:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>& d_l1,
... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_stable port=clk
#pragma HLS INTERFACE ap_stable port=d_h0
#pragma HLS INTERFACE ap_stable port=d_h1
#pragma HLS INTERFACE ap_stable port=d_l0
#pragma HLS INTERFACE ap_stable port=d_l1
#pragma HLS INTERFACE ap_stable port=q0
#pragma HLS INTERFACE ap_stable... | APT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>& d_l1,
hls:... |
The right code snippet is:
#pragma HLS INTERFACE axis port=clk
#pragma HLS INTERFACE axis port=d_h0
#pragma HLS INTERFACE axis port=d_h1
#pragma HLS INTERFACE axis port=d_l0
#pragma HLS INTERFACE axis port=d_l1
#pragma HLS INTERFACE axis port=q0
#pragma HLS INTERFACE axis port=q1 | 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:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stream<bool>& d_l0,
hls::stream<bool>... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_stable port=clk
#pragma HLS INTERFACE ap_stable port=d_h0
#pragma HLS INTERFACE ap_stable port=d_h1
#pragma HLS INTERFACE ap_stable port=d_l0
#pragma HLS INTERFACE ap_stable port=d_l1
#pragma HLS INTERFACE ap_stable port=q0
#pragma HLS INTERFACE ap_stable... | 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:
```
void ddr3_s4_uniphy_p0_hr_to_fr(
hls::stream<bool>& clk,
hls::stream<bool>& d_h0,
hls::stream<bool>& d_h1,
hls::stre... |
The wrong part of the code is:
#pragma HLS INTERFACE ap_stable port=clk
#pragma HLS INTERFACE ap_stable port=d_h0
#pragma HLS INTERFACE ap_stable port=d_h1
#pragma HLS INTERFACE ap_stable port=d_l0
#pragma HLS INTERFACE ap_stable port=d_l1
#pragma HLS INTERFACE ap_stable port=q0
#pragma HLS INTERFACE ap_stable... | 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
mux_out = in8;
The right code snippet is:
mux_out = in7; | 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
mux_out = in7; | 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
mux_out = in8;
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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
mux_out = in8;
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
mux_out = in7; | 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
int sel = 10;
The right code snippet is:
int sel; | 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
int sel; | 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
int sel = 10;
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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
int sel = 10;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
int sel; | 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
for(int i=0; ; i++)
The right code snippet is:
for(int i=0; i<10; i++) | 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
for(int i=0; i<10; i++) | 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
for(int i=0; ; 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:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
for(int i=0; ; i++)
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
for(int i=0; i<10; i++) | 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
unsigned int sel;
The right code snippet is:
int sel; | 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
int sel; | 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
unsigned int sel;
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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
unsigned int sel;
The high-level-synthesis bug type of the code is: USE
The right code snippet is:
int sel; | 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
int sel;
The right code snippet is:
int sel = 0; | ZERO |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
int sel = 0; | ZERO |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
int sel;
The high-level-synthesis bug type of the code is: ZERO | ZERO |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
int sel;
The high-level-synthesis bug type of the code is: ZERO
The right code snippet is:
int sel = 0; | ZERO |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_none port=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS array_partition variable=in0 block factor=2 dim=1
The right code snippet is:
#pragma HLS array_partition variable=in0 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
#pragma HLS array_partition variable=in0 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS array_partition variable=in0 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS array_partition variable=in0 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=in0 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS array_partition variable=in0 cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS array_partition variable=in0 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
#pragma HLS array_partition variable=in0 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS array_partition variable=in0 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS array_partition variable=in0 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=in0 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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS dataflow wait_fifo
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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTERFACE ap_none por... |
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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFACE ap_none port=in3
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS dataflow wait_fifo
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=in0
#pragma HLS INTERFACE ap_none port=in1
#pragma HLS INTERFACE ap_none port=in2
#pragma HLS INTERFA... |
The wrong part of the code is:
#pragma HLS dataflow wait_fifo
The high-level-synthesis bug type of the code is: DFP
The right code snippet is:
#pragma HLS dataflow | DFP |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.