[WIP] Added naive ability to parse vivado synthesis reports
Created by: mackncheesiest
I noticed that the current hls4ml.report.parse_vivado_report
doesn't support parsing the resulting vivado_synth.rpt
if your model was built with vsynth=True
. I'm currently in the process of trying to sweep a number of different designs for the purpose of determining whether they're feasible for my use case, and for that it is much more useful to have at least the post synthesis LUT and FF estimates as they are much more accurate than the Vivado HLS estimates.
However, after looking at the report's format, it made sense why hls4ml
hasn't parsed it yet -- it's not necessarily output in the most machine readable format, and there don't seem to be other arguments to report_utilization
that improve that.
Looking around online, edalize has an approach that uses pyparsing, but that seemed like quite a bit to either (i) pull in the whole edalize
package as a dependency and use it here or (ii) go through their inheritance hierarchy, figure out how they're pulling off the parsing and repeat that internally here
So, for my own needs, I just threw together this small set of changes, and I figured I'd open up this PR to
- have at least something available if anyone else would benefit from similar functionality
- get some feedback on if anyone can think of a different/smarter/less hard-coded approach that I might be missing (or if the
edalize
approach seems like the best option after all)