Skip to content
Snippets Groups Projects
Commit cbc3a58c authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[Transform] support synth resource analysis mode for AnnotateRes

parent c8ae7d0b
No related branches found
No related tags found
No related merge requests found
......@@ -34,9 +34,9 @@ import finn.util.basic as util
def hls_synth_res_estimation(model):
"""Extracts the results from the vivado synthesis.
"""Extracts the FPGA resource results from the Vivado HLS synthesis estimates.
Returns {node name : resource estimation}."""
Returns {node name : resources_dict}."""
res_dict = {}
for node in model.graph.node:
......
......@@ -31,6 +31,7 @@ from finn.transformation import Transformation
from finn.transformation.move_reshape import _is_fpgadataflow_node
from finn.analysis.fpgadataflow.res_estimation import res_estimation
from finn.analysis.fpgadataflow.hls_synth_res_estimation import hls_synth_res_estimation
from finn.analysis.fpgadataflow.post_synth_res import post_synth_res
class AnnotateResources(Transformation):
......@@ -53,6 +54,8 @@ class AnnotateResources(Transformation):
res_fxn = res_estimation
elif self.mode == "hls":
res_fxn = hls_synth_res_estimation
elif self.mode == "synth":
res_fxn = post_synth_res
else:
raise Exception("Unrecognized mode for AnnotateResources")
res_dict = model.analysis(res_fxn)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment