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

[InsertDWC] use impl_style=vivado if widths not divisible

parent 84a6e9b3
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,12 @@ class InsertDWC(Transformation):
dwc_in_width = n0.get_outstream_width()
# determine dwc outwidth
dwc_out_width = n1.get_instream_width()
larger_width = max(dwc_in_width, dwc_out_width)
smaller_width = min(dwc_in_width, dwc_out_width)
if larger_width % smaller_width == 0:
impl_style = "hls"
else:
impl_style = "vivado"
# determine shape for dwc
dwc_shape = n0.get_normal_output_shape()
......@@ -105,6 +111,7 @@ class InsertDWC(Transformation):
inWidth=dwc_in_width,
outWidth=dwc_out_width,
dataType=str(dtype.name),
impl_style=impl_style,
)
# insert dwc
graph.node.insert(node_ind + 1, dwc_node)
......
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