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

[CustomOp] reflect hls prefix changes for rtlsim

parent f0c04ef4
No related branches found
No related tags found
No related merge requests found
......@@ -98,9 +98,10 @@ class ConvolutionInputGenerator(HLSCustomOp):
)
elif mode == "rtlsim":
code_gen_dir = self.get_nodeattr("code_gen_dir_ipgen")
prefixed_top_name = "%s_%s" % (node.name, node.name)
# check if needed file exists
verilog_file = "{}/project_{}/sol1/impl/verilog/{}.v".format(
code_gen_dir, node.name, node.name
code_gen_dir, node.name, prefixed_top_name
)
if os.path.isfile(verilog_file):
inp = context[node.input[0]]
......@@ -209,7 +210,7 @@ class ConvolutionInputGenerator(HLSCustomOp):
self.code_gen_dict["$DOCOMPUTE$"] = [
"""{}<ConvKernelDim1, IFMChannels1, Input_precision1, IFMDim1,
OFMDim1, SIMD1, Stride1> (in0, out, numReps);""".format(
node.op_type,
node.op_type
)
]
......
......@@ -479,9 +479,10 @@ class StreamingFCLayer_Batch(HLSCustomOp):
# reshape output to have expected shape
context[node.output[0]] = context[node.output[0]].reshape(1, mh)
elif mode == "rtlsim":
prefixed_top_name = "%s_%s" % (node.name, node.name)
# check if needed file exists
verilog_file = "{}/project_{}/sol1/impl/verilog/{}.v".format(
code_gen_dir, node.name, node.name
code_gen_dir, node.name, prefixed_top_name
)
if os.path.isfile(verilog_file):
nbits = self.get_instream_width()
......
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