Xilinx / open-nic

AMD OpenNIC Project Overview
Apache License 2.0
226 stars 36 forks source link

Vitis HLS streaming IP #7

Open aneesullah opened 2 years ago

aneesullah commented 2 years ago

Hi,

What does the following FAQ means? Vitis HLS can generate AXI Stream interfaces for an IP according to the standard stream protocol. Why specifically we need a wrapper?

### Yes, you can use HLS to design modules that fit within the user logic boxes in the OpenNIC. However, HLS does not generate the streaming interfaces that the OpenNIC expects, so you will have to create your own RTL wrappers to connect the HLS module to these interfaces.

cneely-amd commented 2 years ago

Hi @aneesullah,

I'm going to reply that I think this might depend on how the code going into HLS is written.

Vivado HLS's user guide UG902 describes a long list of some example designs on pg. 68: https://www.xilinx.com/support/documentation/sw_manuals/xilinx2020_1/ug902-vivado-high-level-synthesis.pdf

Some of these examples have specific interfaces:

If we were to try to characterize the packet interfaces used in OpenNIC, I think they are like AXI4-stream with custom side-channel data (e.g. multiple custom TUSER like signals in OpenNIC).

I think as long as the interfaces are capable of transmitting the necessary information and the function has acceptable performance (e.g. initiation interval), then perhaps this might not be an issue.

Best regards, --Chris

aneesullah commented 2 years ago

Thanks a lot Chris for your reply. Yes, I am using the axi stream with custom side band channels and I am able to generate the interfaces correctly. What is an acceptable Initiation Interval (II) for functions that drops inside the 250 Mhz user logic box? Regards, Anees

cneely-amd commented 2 years ago

Hi @aneesullah, I think this would depend on your use case for the smart nic, and whether your HLS block is a part of the main datapath. I would aim for an initiation interval of 1 if possible. I think that the worst case is processing sustained bursts of 65 byte frames at 100 Gbps, for a packet rate of 150 Mpps. If your packet rate won't get that high, then you probably do not need to worry about this.