Replies: 1 comment 1 reply
-
Thanks for the report. Can you provide synthesis results before and after to compare? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
When synthesizing HLS4ML-generated code using hls4ml v1.1.0 and Vivado 2020.1, several synthesis warnings are generated, hindering both dataflow optimization and correct AXI interface handling.These warnings mostly stem from improper variable scoping within DATAFLOW regions and misplaced interface directives
Warnings Encountered
1. Dataflow Variable Declaration Warnings (HLS 214-113)
These warnings occurred for weight and bias variables (w2, b2, w5, b5, w8, b8) that were declared outside the dataflow region but used within it.
2. Dataflow Form Check Warnings (HLS 200-471)
3. Interface Directive Warnings (XFORM 203-803)
4. Canonical Dataflow Region Warnings (HLS 214-114)
Solutions Applied
Solution 1: Restructure Weight and Bias Declaration in myproject.cpp
Problem: Although the weight arrays like w2 were statically declared and initialized in the weight header files (e.g., w2.h), using them directly within a DATAFLOW region led to Vivado HLS analysis warnings. This is because weight and bias arrays were declared as global variables but used inside a DATAFLOW region, which can interfere with Vivado’s scheduling and optimization
Original Code:
Fixed Code:
Solution 2: Restructure AXI Interface in myproject_axi.cpp
Problem: Array-based interface with embedded loops violated dataflow canonical form.
Original Code:
Fixed Code:
Key Changes Summary
DATAFLOW
region inmyproject.cpp
Results
After implementing these changes:
This solution maintains the original functionality while ensuring compliance with Vivado HLS dataflow requirements and eliminating synthesis warnings.
Beta Was this translation helpful? Give feedback.
All reactions