UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant haggaie
Participant
4,812 Views
Registered: ‎06-28-2016

Mixing AXI slave and pipeline mode

Hi,

 

I got this warning when running co-simulation:

@W [SIM-376] This design mixes AXI slave interface and pipeline mode, which could potentially result in simulation dead-lock and/or get mismatching results.

I think I'm also getting the associated potential deadlock. The simulation verilog wrapper attempts to generate reads for all the outputs of my design, and waits until they are all available before writing the next "start" command. Because the outputs are not generated on every call, I'm getting a deadlock.

 

Is that it?

0 Kudos
3 Replies
Scholar u4223374
Scholar
4,792 Views
Registered: ‎04-26-2015

Re: Mixing AXI slave and pipeline mode

Could you post the code, or at least the function header + interface pragmas? I've never seen this one before, and I thought I'd seen pretty much everything that HLS could produce.

0 Kudos
Participant haggaie
Participant
4,669 Views
Registered: ‎06-28-2016

Re: Mixing AXI slave and pipeline mode

I'll try to post some code. I believe I solved the actual deadlock though: I have a dataflow design with multiple FIFO interfaces. In some places I didn't check that the FIFOs were not full and I think that was the cause. The warning is still there though.

0 Kudos
Participant haggaie
Participant
4,666 Views
Registered: ‎06-28-2016

Re: Mixing AXI slave and pipeline mode

Okay. Here's an example. (It might be a little more complex than needed, I just copied it from another MWE I recently posted):

#include <hls_stream.h>

struct s {
    int a;
    int b;
};

void link(hls::stream<s>& in, hls::stream<s>& out)
{
#pragma HLS pipeline enable_flush
    if (in.empty() || out.full())
        return;

    out.write(in.read());
}

/* Top HLS function */
void top(hls::stream<s>& in, hls::stream<s>& out)
{
#pragma HLS dataflow
#pragma HLS interface s_axilite port=return
    static hls::stream<s> streams[2];

    link(in, streams[0]);
    link(streams[0], streams[1]);
    link(streams[1], out);
}

/* Testbench */
int main(int argc, char **argv)
{
    s example = { 1, 2 }, result;
    hls::stream<s> input, output;
    input.write(example);
    top(input, output);
    top(input, output);
    top(input, output);
    result = output.read();
    return !(result.a == example.a && result.b == example.b);
}
0 Kudos