Forum Discussion
HLS i++ style IP generation with oneAPI for RTL IP integration in Quartus
- 2 years ago
> To take a concrete example, I adapted the add_oneapi example to compute a single precision floating-point mul add (that would use only 1 DSP in Quartus using the dedicated IP). So to the best of my knowledge, the invocation and data interface should be streaming pipes, but it creates some extra logic shown in the report (to handle pipes or avalon mm supposedly as with directive -Xsdsp-mode=prefer-dsp it should use internal registers of the DSP and perform all computation in the DSP slice).
Can you please share the code you wrote? I am not sure I understand what you are trying to describe.
In general though, in i++, you could describe a simple adder like this:
component int add(int a, int b) { return a + b; }This would give you an IP that had two inputs synchronized to a start/busy handshake, and a single output synchronized to a done/stall handshake.
If you want to get a similar IP with SYCL HLS, you specify a streaming invocation interface using a kernel property, and streaming data interfaces using pipes.
> I don't really understand the schedule view and what the cluster exactly corresponds to along with the numerous write cycles.
You can learn about clusters in the Scheduling section of the FPGA Concepts chapter of our documentation. You can force stall-enabled clusters using the use_stall_enable_clusters kernel attribute.
As far as the 24-cycle pipe write, this is a common issue with any of the hyperflex-enabled FPGAs (Stratix™ 10, Agilex™ 7 and Agilex™ 5). In order to optimize for the high fMAX that these chips are capable of, the compiler tends to insert lots of pipeline registers, which can have negative impacts on latency (in particular small designs like yours). The compiler supports different optimization strategies. You can bias the compiler to prefer low latency over high fMAX using the -Xsoptimize=latency compiler flag.
Here is the schedule view after biasing for latency:
As far as the DSP block not being used; that is concerning. I've filed a bug report on this.
Thank you very much for the resources and explanations, that answered all my questions on that matter!