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

[Transform] don't run PrepareIP on nodes with output products

parent 709fa09b
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,7 @@ import finn.custom_op.registry as registry
from finn.transformation import Transformation
from finn.util.basic import make_build_dir
from finn.util.fpgadataflow import is_fpgadataflow_node
import warnings
def _codegen_single_node(node, model, fpgapart, clk):
......@@ -49,8 +50,10 @@ def _codegen_single_node(node, model, fpgapart, clk):
prefix="code_gen_ipgen_" + str(node.name) + "_"
)
inst.set_nodeattr("code_gen_dir_ipgen", code_gen_dir)
# ensure that there is generated code inside the dir
inst.code_generation_ipgen(model, fpgapart, clk)
# ensure that there is generated code inside the dir
inst.code_generation_ipgen(model, fpgapart, clk)
else:
warnings.warn("Using pre-existing code for %s" % node.name)
except KeyError:
# exception if op_type is not supported
raise Exception("Custom op_type %s is currently not supported." % op_type)
......@@ -66,6 +69,9 @@ class PrepareIP(Transformation):
* clk in ns (int)
Any nodes that already have a code_gen_dir_ipgen attribute pointing to a valid path
will be skipped.
Outcome if succesful: Node attribute "code_gen_dir_ipgen" contains path to folder
that contains generated C++ code that can be used to generate a Vivado IP block.
The subsequent transformation is HLSSynthIP"""
......
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