From b0a2f15d81ba7774fe8c55ce12538e50c805935c Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu <yamanu@xilinx.com> Date: Thu, 23 Jan 2020 15:09:31 +0000 Subject: [PATCH] [CustomOp] add TLastMarker to register, shorten attr name --- src/finn/custom_op/fpgadataflow/tlastmarker.py | 4 ++-- src/finn/custom_op/registry.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/finn/custom_op/fpgadataflow/tlastmarker.py b/src/finn/custom_op/fpgadataflow/tlastmarker.py index c76f4003f..77b03b018 100644 --- a/src/finn/custom_op/fpgadataflow/tlastmarker.py +++ b/src/finn/custom_op/fpgadataflow/tlastmarker.py @@ -13,7 +13,7 @@ class TLastMarker(HLSCustomOp): my_attrs = { "NumIters": ("i", True, 0), # width of input-output data streams - "StreamDataWidth": ("i", True, 0) + "StreamWidth": ("i", True, 0) } my_attrs.update(super().get_nodeattr_types()) return my_attrs @@ -38,7 +38,7 @@ class TLastMarker(HLSCustomOp): self.code_gen_dict["$GLOBALS$"] = ['#include "ap_axi_sdata.h"'] def defines(self, var): - stream_width = self.get_nodeattr("StreamDataWidth") + stream_width = self.get_nodeattr("StreamWidth") # output stream must have TLAST, so we use this stream data type: # qdma_axis<stream_data_width,0,0,0 > out_stream_dtype = "qdma_axis<%d,0,0,0>" % stream_width diff --git a/src/finn/custom_op/registry.py b/src/finn/custom_op/registry.py index fa4b0ed94..dc1a05a01 100644 --- a/src/finn/custom_op/registry.py +++ b/src/finn/custom_op/registry.py @@ -5,6 +5,7 @@ from finn.custom_op.fpgadataflow.convolutioninputgenerator import ( ) from finn.custom_op.fpgadataflow.streamingfclayer_batch import StreamingFCLayer_Batch from finn.custom_op.fpgadataflow.streamingmaxpool_batch import StreamingMaxPool_Batch +from finn.custom_op.fpgadataflow.tlastmarker import TLastMarker from finn.custom_op.multithreshold import MultiThreshold from finn.custom_op.xnorpopcount import XnorPopcountMatMul @@ -16,3 +17,4 @@ custom_op["XnorPopcountMatMul"] = XnorPopcountMatMul custom_op["StreamingMaxPool_Batch"] = StreamingMaxPool_Batch custom_op["StreamingFCLayer_Batch"] = StreamingFCLayer_Batch custom_op["ConvolutionInputGenerator"] = ConvolutionInputGenerator +custom_op["TLastMarker"] = TLastMarker -- GitLab