diff --git a/src/finn/custom_op/fpgadataflow/convolutioninputgenerator_rtl.py b/src/finn/custom_op/fpgadataflow/convolutioninputgenerator_rtl.py index 77a3d189744efc39940c2f57b1c6b65da2c70a25..0a51c9e8815e50a8cd70a1349c0e267790ccc0fb 100755 --- a/src/finn/custom_op/fpgadataflow/convolutioninputgenerator_rtl.py +++ b/src/finn/custom_op/fpgadataflow/convolutioninputgenerator_rtl.py @@ -847,13 +847,15 @@ class ConvolutionInputGenerator_rtl(HLSCustomOp): intf_names["axilite"] = ["s_axilite"] return intf_names - def get_dynamic_config(self, ifm_dim, stride=None, dilation=None): + def get_dynamic_config(self, ifm_dim=None, stride=None, dilation=None): """Returns a configuration dict to re-configure FM dimension during runtime. Stride and dilation can also be changed. Certain restrictions apply (e.g. component must be synthesized for largest buffer size).""" # NOTE: For better driver integration, this functionality could be packaged # as a standalone function in the future + if ifm_dim is None: + ifm_dim = self.get_nodeattr("IFMDim") k = self.get_nodeattr("ConvKernelDim") if stride is None: stride = self.get_nodeattr("Stride") diff --git a/src/finn/custom_op/fpgadataflow/fmpadding_rtl.py b/src/finn/custom_op/fpgadataflow/fmpadding_rtl.py index d0302540bd55a427bfe8ab56de7adc8c9d37cb5f..a85c765a00c6081540d8148715d7ed9e675e36f4 100644 --- a/src/finn/custom_op/fpgadataflow/fmpadding_rtl.py +++ b/src/finn/custom_op/fpgadataflow/fmpadding_rtl.py @@ -271,10 +271,14 @@ class FMPadding_rtl(HLSCustomOp): } return code_gen_dict - def get_dynamic_config(self, ifm_dims, pads): + def get_dynamic_config(self, ifm_dims=None, pads=None): """Returns a configuration dict to re-configure FM dimension and padding amounts during runtime.""" + if ifm_dims is None: + ifm_dims = self.get_nodeattr("ImgDim") + if pads is None: + pads = self.get_nodeattr("Padding") chans = self.get_nodeattr("NumChannels") simd = self.get_nodeattr("SIMD") idt = self.get_input_datatype()