%function (param,label) Output
%assign curDT = FixPt_GetParameterDataTypeRec(param)
* Parameter: %<label>
%if LibBlockParameterIsComplex(param)
%<FixPt_DataTypeComment(curDT, " Complex")>
%else
%<FixPt_DataTypeComment(curDT, " ")>
%endif
%return " *"
%endfunction
%function (curDT, inStr) void
%if ISEMPTY(curDT)
%return "Output port is not a data port."
%else
%if FixPt_DataTypeIsFloat(curDT)
%assign storeType = curDT.NativeType
%assign dtClass = "Floating Point "
%else
%if FixPt_DataTypeIsBoolean(curDT)
%assign dtClass = "Boolean "
%elseif (curDT.FixedExp == 0.0) && (curDT.FracSlope == 1.0) && (curDT.Bias == 0.0)
%assign dtClass = "Integer "
%else
%assign dtClass = "Fixed Point "
%endif
%if curDT.IsSigned
%assign storeType = "S"
%else
%assign storeType = "U"
%endif
%assign storeType = storeType + STRING(curDT.RequiredBits)
%endif
%assign outStr = "* "+STRING(inStr)+" Data Type: "+dtClass+storeType
%if (curDT.FixedExp != 0.0)
%assign outStr = outStr+" 2^"+STRING(curDT.FixedExp)
%endif
%if (curDT.FracSlope != 1.0)
%assign outStr = outStr+" FSlope "+STRING(curDT.FracSlope)
%endif
%if (curDT.Bias != 0.0)
%assign outStr = outStr+" Bias "+STRING(curDT.Bias)
%endif
%return outStr
%endif
%endfunction
%function () Output
%assign anyComplex = 0
%foreach portIdx = NumDataOutputPorts
%if LibBlockOutputSignalIsComplex(portIdx)
%assign anyComplex = 1
%break
%endif
%endforeach
%if !anyComplex
%foreach portIdx = NumDataInputPorts
%if LibBlockInputSignalIsComplex(portIdx)
%assign anyComplex = 1
%break
%endif
%endforeach
%endif
%foreach portIdx = NumDataInputPorts
%assign portDT = FixPt_GetInputDataType(portIdx)
%if anyComplex
%if LibBlockInputSignalIsComplex(portIdx)
%<FixPt_DataTypeComment(portDT, "Input%<portIdx> Complex")>
%else
%<FixPt_DataTypeComment(portDT, "Input%<portIdx> Real ")>
%endif
%else
%<FixPt_DataTypeComment(portDT, "Input%<portIdx> ")>
%endif
%endforeach
%foreach portIdx = NumDataOutputPorts
%if !LibBlockOutputSignalIsValidLValue(portIdx)
%<FixPt_DataTypeComment(portDT, "Output"+STRING(portIdx)+" Not data")>
%else
%assign portDT = FixPt_GetOutputDataType(portIdx)
%if anyComplex
%if LibBlockOutputSignalIsComplex(portIdx)
%<FixPt_DataTypeComment(portDT, "Output"+STRING(portIdx)+" Complex")>
%else
%<FixPt_DataTypeComment(portDT, "Output"+STRING(portIdx)+" Real ")>
%endif
%else
%<FixPt_DataTypeComment(portDT, "Output"+STRING(portIdx) )>
%endif
%endif
%endforeach
%if EXISTS("FixPtRoundingMode")
%if FixPtRoundingMode != "Floor"
* Round Mode: %<FixPtRoundingMode>
%endif
%endif
%if EXISTS("FixPtSaturationMode")
%if FixPtSaturationMode != "Wrap"
* Saturation Mode: %<FixPtSaturationMode>
%endif
%endif
%endfunction