instruction stringlengths 139 357k | response stringlengths 36 4.54k | buggy_type stringclasses 745
values |
|---|---|---|
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS factor=3 // Factor not divisible for the pragma '#pragma HLS array_partition'
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS | 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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axil... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS | 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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS factor=3 // Factor not divisible for the pragma '#pragma HLS array_partition'
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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite ... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS factor=3 // Factor not divisible for the pragma '#pragma HLS array_partition'
The high-level-synthesis bug type of the code is: FND
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=inst_in bun... | 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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS dim=2 // Dim incorrect dimension for the pragma '#pragma HLS array_partition'
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS | DID |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axil... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS dim=2 // Dim incorrect dimension for the pragma '#pragma HLS array_partition'
The high-level-synthesis bug type of the code is: DID | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite ... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS dim=2 // Dim incorrect dimension for the pragma '#pragma HLS array_partition'
The high-level-synthesis bug type of the code is: DID
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=inst_in bun... | DID |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The wrong part of the code is:
#pragma HLS DATAFLOW // Dataflow position error for the pragma '#pragma HLS dataflow'
The right code snippet is:
#pragma HLS PIPELINE II=1 | 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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axil... |
The right code snippet is:
#pragma HLS PIPELINE II=1 | 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_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS DATAFLOW // Dataflow position error for the pragma '#pragma HLS dataflow'
The high-level-synthesis bug type of the code is: DFP | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite ... |
The wrong part of the code is:
#pragma HLS DATAFLOW // Dataflow position error for the pragma '#pragma HLS dataflow'
The high-level-synthesis bug type of the code is: DFP
The right code snippet is:
#pragma HLS PIPELINE II=1 | DFP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS depth=2 // Incorrect data access pattern for the pragma '#pragma HLS interface'
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS | IDAP |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS INTERFACE s_axil... |
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite port=clk bundle=CTRL_BUS
#pragma HLS ... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS depth=2 // Incorrect data access pattern for the pragma '#pragma HLS interface'
The high-level-synthesis bug type of the code is: IDAP | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=rst bundle=CTRL_BUS
#pragma HLS INTERFACE s_axilite ... |
The wrong part of the code is:
#pragma HLS INTERFACE s_axilite port=inst_in bundle=CTRL_BUS depth=2 // Incorrect data access pattern for the pragma '#pragma HLS interface'
The high-level-synthesis bug type of the code is: IDAP
The right code snippet is:
#pragma HLS INTERFACE s_axilite port=inst_in ... | IDAP |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=c
#pragma HLS INTERFACE ap_none port=... |
The wrong part of the code is:
ap_uint<8> temp_product = 0;
The right code snippet is:
ap_uint<8> temp_product; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=c
#pragma HLS INTERFACE ap_none port=sum
#... |
The right code snippet is:
ap_uint<8> temp_product; | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=c
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
ap_uint<8> temp_product = 0;
The high-level-synthesis bug type of the code is: INIT | INIT |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
ap_uint<8> temp_product = 0;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
ap_uint<8> temp_product; | 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_clk port=clk
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=c
#pragma HLS INTERFACE ap_none port=... |
The wrong part of the code is:
temp_sum = a + b - c;
The right code snippet is:
temp_sum = a + b + c; | 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_clk port=clk
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=c
#pragma HLS INTERFACE ap_none port=sum
#... |
The right code snippet is:
temp_sum = a + b + c; | 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_clk port=clk
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=c
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
temp_sum = a + b - c;
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_clk port=clk
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
temp_sum = a + b - c;
The high-level-synthesis bug type of the code is: OOB
The right code snippet is:
temp_sum = a + b + c; | OOB |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=c
#pragma HLS INTERFACE ap_none port=... |
The wrong part of the code is:
#pragma HLS unroll factor(2)
temp_product = a * b;
The right code snippet is:
temp_product = a * b; | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=c
#pragma HLS INTERFACE ap_none port=sum
#... |
The right code snippet is:
temp_product = a * b; | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap_none port=c
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS unroll factor(2)
temp_product = a * b;
The high-level-synthesis bug type of the code is: ILNU | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_none port=a
#pragma HLS INTERFACE ap_none port=b
#pragma HLS INTERFACE ap... |
The wrong part of the code is:
#pragma HLS unroll factor(2)
temp_product = a * b;
The high-level-synthesis bug type of the code is: ILNU
The right code snippet is:
temp_product = a * b; | 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 PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls::stream<boo... |
The wrong part of the code is:
bool rst = true;
The right code snippet is:
bool rst; | INIT |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls::stream<bool>& C... |
The right code snippet is:
bool rst; | 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 PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls:... |
The wrong part of the code is:
bool rst = true;
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 PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
... |
The wrong part of the code is:
bool rst = true;
The high-level-synthesis bug type of the code is: INIT
The right code snippet is:
bool rst; | 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 PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls::stream<boo... |
The wrong part of the code is:
switch (sel) {
case 3'b000: divisor = 2; break;
case 3'b001: divisor = 3; break;
case 3'b010: divisor = 4; break;
case 3'b011: divisor = 5; break;
case 3'b100: divisor = 6; break;
case 3'b101: divisor = 7; break;
case 3'b110: divisor = 8; break;
ca... | OOB |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls::stream<bool>& C... |
The right code snippet is:
switch (sel) {
case 3'b000: divisor = 2; break;
case 3'b001: divisor = 3; break;
case 3'b010: divisor = 4; break;
case 3'b011: divisor = 5; break;
case 3'b100: divisor = 6; break;
case 3'b101: divisor = 7; break;
case 3'b110: divisor = 8; break;
case 3... | 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 PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls:... |
The wrong part of the code is:
switch (sel) {
case 3'b000: divisor = 2; break;
case 3'b001: divisor = 3; break;
case 3'b010: divisor = 4; break;
case 3'b011: divisor = 5; break;
case 3'b100: divisor = 6; break;
case 3'b101: divisor = 7; break;
case 3'b110: divisor = 8; break;
ca... | 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 PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
... |
The wrong part of the code is:
switch (sel) {
case 3'b000: divisor = 2; break;
case 3'b001: divisor = 3; break;
case 3'b010: divisor = 4; break;
case 3'b011: divisor = 5; break;
case 3'b100: divisor = 6; break;
case 3'b101: divisor = 7; break;
case 3'b110: divisor = 8; break;
ca... | 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 PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls::stream<boo... |
The wrong part of the code is:
while (counter < divisor) {
The right code snippet is:
while (true) { | INF |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls::stream<bool>& C... |
The right code snippet is:
while (true) { | 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 PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls:... |
The wrong part of the code is:
while (counter < divisor) {
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:
```
void PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
... |
The wrong part of the code is:
while (counter < divisor) {
The high-level-synthesis bug type of the code is: INF
The right code snippet is:
while (true) { | 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 PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls::stream<boo... |
The wrong part of the code is:
if (counter == divisor - 1) {
CDIV1.write(~CDIV1.read());
CDIVX.write(~CDIVX.read());
counter++;
}
The right code snippet is:
if (counter == divisor - 1) {
CDIV1.write(~CDIV1.read());
CDIVX.write(~CDIVX.read());
counter = 0;
} | MLU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls::stream<bool>& C... |
The right code snippet is:
if (counter == divisor - 1) {
CDIV1.write(~CDIV1.read());
CDIVX.write(~CDIVX.read());
counter = 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:
```
void PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls:... |
The wrong part of the code is:
if (counter == divisor - 1) {
CDIV1.write(~CDIV1.read());
CDIVX.write(~CDIVX.read());
counter++;
}
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:
```
void PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
... |
The wrong part of the code is:
if (counter == divisor - 1) {
CDIV1.write(~CDIV1.read());
CDIVX.write(~CDIVX.read());
counter++;
}
The high-level-synthesis bug type of the code is: MLU
The right code snippet is:
if (counter == divisor - 1) {
CDIV1.write(~CDIV1.read());
CDIVX.writ... | MLU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
```
void PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls::stream<boo... |
The wrong part of the code is:
switch (sel) {
case 3'b000: divisor = 2; break;
case 3'b001: divisor = 3; break;
case 3'b010: divisor = 4; break;
case 3'b011: divisor = 5; break;
case 3'b100: divisor = 6; break;
case 3'b101: divisor = 7; break;
case 3'b110: divisor = 8; break;
}
... | ILNU |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
```
void PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls::stream<bool>& C... |
The right code snippet is:
switch (sel) {
case 3'b000: divisor = 2; break;
case 3'b001: divisor = 3; break;
case 3'b010: divisor = 4; break;
case 3'b011: divisor = 5; break;
case 3'b100: divisor = 6; break;
case 3'b101: divisor = 7; break;
case 3'b110: divisor = 8; break;
case 3... | 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 PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
hls::stream<bool>& SEL0,
hls:... |
The wrong part of the code is:
switch (sel) {
case 3'b000: divisor = 2; break;
case 3'b001: divisor = 3; break;
case 3'b010: divisor = 4; break;
case 3'b011: divisor = 5; break;
case 3'b100: divisor = 6; break;
case 3'b101: divisor = 7; break;
case 3'b110: divisor = 8; break;
}
... | 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 PCSCLKDIV (
hls::stream<bool>& CLKI,
hls::stream<bool>& RST,
hls::stream<bool>& SEL2,
hls::stream<bool>& SEL1,
... |
The wrong part of the code is:
switch (sel) {
case 3'b000: divisor = 2; break;
case 3'b001: divisor = 3; break;
case 3'b010: divisor = 4; break;
case 3'b011: divisor = 5; break;
case 3'b100: divisor = 6; break;
case 3'b101: divisor = 7; break;
case 3'b110: divisor = 8; break;
}
... | ILNU |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
if (rd_en && !empty_flag) {
dout = mem[FIFO_DEPTH].data;
}
The right code snippet is:
if (rd_en && !empty_flag) {
dout = mem[mem_addr].data;
} | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
if (rd_en && !empty_flag) {
dout = mem[mem_addr].data;
} | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
if (rd_en && !empty_flag) {
dout = mem[FIFO_DEPTH].data;
}
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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
if (rd_en && !empty_flag) {
dout = mem[FIFO_DEPTH].data;
}
The high-level-synthesis bug type of the code is: 'OOB'
The right code snippet is:
if (rd_en && !empty_flag) {
dout = mem[mem_addr].data;
} | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
static fifo_mem_t mem;
The right code snippet is:
static fifo_mem_t mem[FIFO_DEPTH]; | 'INIT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
static fifo_mem_t mem[FIFO_DEPTH]; | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
static fifo_mem_t mem;
The high-level-synthesis bug type of the code is: 'INIT' | 'INIT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
static fifo_mem_t mem;
The high-level-synthesis bug type of the code is: 'INIT'
The right code snippet is:
static fifo_mem_t mem[FIFO_DEPTH]; | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
next_wr_ptr = (wr_ptr << FIFO_DEPTH) ? 0 : wr_ptr + 1;
The right code snippet is:
next_wr_ptr = (wr_ptr == FIFO_DEPTH-1) ? 0 : wr_ptr + 1; | 'SHFT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
next_wr_ptr = (wr_ptr == FIFO_DEPTH-1) ? 0 : wr_ptr + 1; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
next_wr_ptr = (wr_ptr << FIFO_DEPTH) ? 0 : wr_ptr + 1;
The high-level-synthesis bug type of the code is: 'SHFT' | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
next_wr_ptr = (wr_ptr << FIFO_DEPTH) ? 0 : wr_ptr + 1;
The high-level-synthesis bug type of the code is: 'SHFT'
The right code snippet is:
next_wr_ptr = (wr_ptr == FIFO_DEPTH-1) ? 0 : wr_ptr + 1; | 'SHFT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
for (int i = 0; i >= FIFO_DEPTH; i++) {
mem[i].data = 0;
}
The right code snippet is:
for (int i = 0; i < FIFO_DEPTH; i++) {
mem[i].data = 0;
} | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
for (int i = 0; i < FIFO_DEPTH; i++) {
mem[i].data = 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
for (int i = 0; i >= FIFO_DEPTH; i++) {
mem[i].data = 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
for (int i = 0; i >= FIFO_DEPTH; i++) {
mem[i].data = 0;
}
The high-level-synthesis bug type of the code is: 'INF'
The right code snippet is:
for (int i = 0; i < FIFO_DEPTH; i++) {
mem[i].data = 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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
ap_int<ADDR_WIDTH> next_wr_ptr;
ap_int<ADDR_WIDTH> next_rd_ptr;
The right code snippet is:
ap_uint<ADDR_WIDTH> next_wr_ptr;
ap_uint<ADDR_WIDTH> next_rd_ptr; | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
ap_uint<ADDR_WIDTH> next_wr_ptr;
ap_uint<ADDR_WIDTH> next_rd_ptr; | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
ap_int<ADDR_WIDTH> next_wr_ptr;
ap_int<ADDR_WIDTH> next_rd_ptr;
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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
ap_int<ADDR_WIDTH> next_wr_ptr;
ap_int<ADDR_WIDTH> next_rd_ptr;
The high-level-synthesis bug type of the code is: 'USE'
The right code snippet is:
ap_uint<ADDR_WIDTH> next_wr_ptr;
ap_uint<ADDR_WIDTH> next_rd_ptr; | '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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=2 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem complete dim=1 | 'MLU' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem complete dim=1 | '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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=2 dim=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:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=2 dim=1
The high-level-synthesis bug type of the code is: 'MLU'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem complete dim=1 | 'MLU' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
static ap_uint<ADDR_WIDTH> wr_ptr;
static ap_uint<ADDR_WIDTH> rd_ptr;
The right code snippet is:
static ap_uint<ADDR_WIDTH> wr_ptr = 0;
static ap_uint<ADDR_WIDTH> rd_ptr = 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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
static ap_uint<ADDR_WIDTH> wr_ptr = 0;
static ap_uint<ADDR_WIDTH> rd_ptr = 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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
static ap_uint<ADDR_WIDTH> wr_ptr;
static ap_uint<ADDR_WIDTH> rd_ptr;
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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
static ap_uint<ADDR_WIDTH> wr_ptr;
static ap_uint<ADDR_WIDTH> rd_ptr;
The high-level-synthesis bug type of the code is: 'ZERO'
The right code snippet is:
static ap_uint<ADDR_WIDTH> wr_ptr = 0;
static ap_uint<ADDR_WIDTH> rd_ptr = 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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
if (wr_en && !full_flag) {
mem_addr = rd_ptr;
} else {
mem_addr = wr_ptr;
}
The right code snippet is:
if (wr_en && !full_flag) {
mem_addr = wr_ptr;
} else {
mem_addr = rd_ptr;
} | 'BUF' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
if (wr_en && !full_flag) {
mem_addr = wr_ptr;
} else {
mem_addr = rd_ptr;
} | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
if (wr_en && !full_flag) {
mem_addr = rd_ptr;
} else {
mem_addr = wr_ptr;
}
The high-level-synthesis bug type of the code is: 'BUF' | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
if (wr_en && !full_flag) {
mem_addr = rd_ptr;
} else {
mem_addr = wr_ptr;
}
The high-level-synthesis bug type of the code is: 'BUF'
The right code snippet is:
if (wr_en && !full_flag) {
mem_addr = wr_ptr;
} else {
mem_addr = rd_ptr;
} | 'BUF' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem complete dim=1 | 'APT' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem complete dim=1 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT' | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic dim=1
The high-level-synthesis bug type of the code is: 'APT'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem complete dim=1 | 'APT' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=3 dim=1
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem complete dim=1 | 'FND' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem complete dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem 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_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem 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=mem complete dim=1 | 'FND' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=2 dim=2
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem complete dim=1 | 'DID' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem complete dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID' | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
#pragma HLS ARRAY_PARTITION variable=mem cyclic factor=2 dim=2
The high-level-synthesis bug type of the code is: 'DID'
The right code snippet is:
#pragma HLS ARRAY_PARTITION variable=mem complete dim=1 | 'DID' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
void fifo_24bit(bool clk, bool rst, ap_uint<DATA_WIDTH> din, bool wr_en, bool rd_en, ap_uint<DATA_WIDTH> &dout, bool &full, bool &empty) {
#pragma HLS dataflow
The right code snippet is:
void fifo_24bit(bool clk, bool rst, ap_uint<DATA_WIDTH> din, bool wr_en, bool rd_en... | 'DFP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
void fifo_24bit(bool clk, bool rst, ap_uint<DATA_WIDTH> din, bool wr_en, bool rd_en, ap_uint<DATA_WIDTH> &dout, bool &full, bool &empty) { | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
void fifo_24bit(bool clk, bool rst, ap_uint<DATA_WIDTH> din, bool wr_en, bool rd_en, ap_uint<DATA_WIDTH> &dout, bool &full, bool &empty) {
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: 'DFP' | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
void fifo_24bit(bool clk, bool rst, ap_uint<DATA_WIDTH> din, bool wr_en, bool rd_en, ap_uint<DATA_WIDTH> &dout, bool &full, bool &empty) {
#pragma HLS dataflow
The high-level-synthesis bug type of the code is: 'DFP'
The right code snippet is:
void fifo_24bit(bool cl... | 'DFP' |
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_non... |
The wrong part of the code is:
typedef struct {
ap_uint<DATA_WIDTH> data[2];
} fifo_mem_t;
The right code snippet is:
typedef struct {
ap_uint<DATA_WIDTH> data;
} fifo_mem_t; | 'IDAP' |
Given the following buggy code, and the wrong part of the code, generate the right code snippet:
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTERFACE ap_none por... |
The right code snippet is:
typedef struct {
ap_uint<DATA_WIDTH> data;
} fifo_mem_t; | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE ap_none port=wr_en
#pragma HLS INTER... |
The wrong part of the code is:
typedef struct {
ap_uint<DATA_WIDTH> data[2];
} fifo_mem_t;
The high-level-synthesis bug type of the code is: 'IDAP' | 'IDAP' |
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet
The buggy code is:
#pragma HLS INTERFACE ap_clk port=clk
#pragma HLS INTERFACE ap_rst port=rst
#pragma HLS INTERFACE ap_none port=din
#pragma HLS INTERFACE... |
The wrong part of the code is:
typedef struct {
ap_uint<DATA_WIDTH> data[2];
} fifo_mem_t;
The high-level-synthesis bug type of the code is: 'IDAP'
The right code snippet is:
typedef struct {
ap_uint<DATA_WIDTH> data;
} fifo_mem_t; | 'IDAP' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.