From 1daec73fd7c1b22c94dd9a3826a1a474541d117d Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu <maltanar@gmail.com> Date: Thu, 6 Aug 2020 00:13:34 +0200 Subject: [PATCH] [DMA] fix IODMA num outputs among others this will give correct TLastMarker behavior --- src/finn/custom_op/fpgadataflow/iodma.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/finn/custom_op/fpgadataflow/iodma.py b/src/finn/custom_op/fpgadataflow/iodma.py index 05870b8d9..7d0374445 100644 --- a/src/finn/custom_op/fpgadataflow/iodma.py +++ b/src/finn/custom_op/fpgadataflow/iodma.py @@ -197,11 +197,13 @@ class IODMA(HLSCustomOp): def get_number_output_values(self): oshape = self.get_normal_output_shape() itype_bits = self.get_input_datatype().bitwidth() - intfw = self.get_nodeattr("intfWidth") + stream_width = self.get_nodeattr("streamWidth") nelems = np.prod(oshape) nbits = nelems * itype_bits - assert nbits % intfw == 0, "DMA: total transfer size must be word multiple" - ovalues = nbits // intfw + assert ( + nbits % stream_width == 0 + ), "DMA: total transfer size must be word multiple" + ovalues = nbits // stream_width return ovalues def global_includes(self): -- GitLab