heterocl icon indicating copy to clipboard operation
heterocl copied to clipboard

SW Simulation failed using RTL IP integration

Open hecmay opened this issue 5 years ago • 7 comments

Vivado HLS provides users with blackbox option when adding source files to the working project. Users can add a json file specifying the RTL kernel (i.e IP we want to integrate) and its corresponding C model (i.e. behavior level model).

addfile -blacbox rtl_model.json

The #170 is currently using the blackbox to connect HLS kernel and RTL IPs. This method is not stable (the SW simulation oftentimes halts forever). Also it has a lot of limitations, making it hard to be extended to other IP cores.

Instead of using blackbox, we should consider each IP core as a kernel function (instead of a sub-function being called inside the top-level function), and enqueue kernels in the OpenCL host program.

hecmay avatar Apr 10 '20 19:04 hecmay

Instead of using blackbox, we should consider each IP core as a kernel function (instead of a sub-function being called inside the top-level function), and connect the kernel functions in the OpenCL host program.

Do you mean kernel-to-kernel streaming?

Blaok avatar Apr 10 '20 20:04 Blaok

@Blaok. Yes, that's what I mean. We can create the k2k streaming channels, and all the kernel functions (either IPs or HLS functions) are enqueued into the command queue.

hecmay avatar Apr 10 '20 20:04 hecmay

Why is OpenCL host program required to support kernel-to-kernel streaming?

zhangzhiru avatar Apr 10 '20 20:04 zhangzhiru

@Hecmay Good to know. SODA actually has some preliminary support for k2k streaming. I'll keep you posted when I have a fully working version ready for integration.

Blaok avatar Apr 10 '20 20:04 Blaok

Why is OpenCL host program required to support kernel-to-kernel streaming?

The streaming channels between kernels are not declared in OpenCL host program. It's similar to autorun attribute in AOCL where the host program only enqueues the kernels, and data is streamed between those kernels.

hecmay avatar Apr 10 '20 21:04 hecmay

... and connect the kernel functions in the OpenCL host program.

So this part is misleading in your first post.

seanlatias avatar Apr 10 '20 21:04 seanlatias

... and connect the kernel functions in the OpenCL host program.

So this part is misleading in your first post.

That's true. It's a bit misleading. Removed.

hecmay avatar Apr 11 '20 01:04 hecmay