Model { Name "fxpdemo_code_only" Version 6.1 MdlSubVersion 0 GraphicalInterface { NumRootInports 1 Inport { Name "In0" } NumRootOutports 1 Outport { BusObject "" BusOutputAsStruct "off" Name "Out1" } ParameterArgumentNames "" ComputedModelVersion "1.100" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "US-ASCII" PreLoadFcn "preload_feedback" SaveDefaultBlockParams on SampleTimeColors on LibraryLinkDisplay "none" WideLines on ShowLineDimensions on ShowPortDataTypes on ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowViewerIcons on SortedOrder on ExecutionContextIcon off ShowLinearizationAnnotations on RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "d" CovNameIncrementing off CovHtmlReporting on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off CovReportOnPause on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" BlockNameDataTip off BlockParametersDataTip on BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off Created "Fri Jun 19 12:53:28 1998" Creator "andyb" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "jretik" ModifiedDateFormat "%" LastModifiedDate "Mon Oct 11 15:32:52 2004" ModelVersionFormat "1.%" ConfigurationManager "none" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" TryForcingSFcnDF off ExtModeBatchMode off ExtModeEnableFloating on ExtModeTrigType "manual" ExtModeTrigMode "normal" ExtModeTrigPort "1" ExtModeTrigElement "any" ExtModeTrigDuration 1000 ExtModeTrigDurationFloating "auto" ExtModeTrigHoldOff 0 ExtModeTrigDelay 0 ExtModeTrigDirection "rising" ExtModeTrigLevel 0 ExtModeArchiveMode "off" ExtModeAutoIncOneShot off ExtModeIncDirWhenArm off ExtModeAddSuffixToVar off ExtModeWriteAllDataToWs off ExtModeArmWhenConnect on ExtModeSkipDownloadWhenConnect off ExtModeLogAll on ExtModeAutoUpdateStatusClock off BufferReuse on StrictBusMsg "None" ProdHWDeviceType "32-bit Generic" ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 1 Simulink.ConfigSet { $ObjectID 1 Version "1.1.0" Array { Type "Handle" Dimension 7 Simulink.SolverCC { $ObjectID 2 Version "1.1.0" StartTime "0.0" StopTime "4-2*tsamp" AbsTol "1e-6" FixedStep "tsamp" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "auto" MinStep "auto" RelTol "1e-3" SolverMode "SingleTasking" Solver "FixedStepDiscrete" SolverName "FixedStepDiscrete" ZeroCrossControl "UseLocalSettings" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" RateTranMode "Deterministic" } Simulink.DataIOCC { $ObjectID 3 Version "1.1.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints off MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveFormat "Array" SaveOutput off SaveState off SignalLogging on SaveTime off StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "sigsOut" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" } Simulink.OptimizationCC { $ObjectID 4 Version "1.1.0" BlockReduction on BooleanDataType on ConditionallyExecuteInputs on ConditionalExecOptimization "on_for_testing" InlineParams on InlineInvariantSignals on OptimizeBlockIOStorage on BufferReuse on EnforceIntegerDowncast on ExpressionFolding on FoldNonRolledExpr on LocalBlockOutputs on ParameterPooling on RollThreshold 5 SystemCodeInlineAuto off StateBitsets off DataBitsets off UseTempVars off ZeroExternalMemoryAtStartup off ZeroInternalMemoryAtStartup off InitFltsAndDblsToZero on NoFixptDivByZeroProtection off OptimizeModelRefInitCode on LifeSpan "1" BufferReusableBoundary off } Simulink.DebuggingCC { $ObjectID 5 Version "1.1.0" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" CheckSSInitialOutputMsg on CheckExecutionContextPreStartOutputMsg off CheckExecutionContextRuntimeOutputMsg off SignalResolutionControl "TryResolveAllWithWarning" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" SolverPrmCheckMsg "none" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskDSMMsg "warning" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" TasksWithSamePriorityMsg "warning" CheckMatrixSingularityMsg "none" IntegerOverflowMsg "none" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "warning" ParameterOverflowMsg "warning" ParameterPrecisionLossMsg "none" UnderSpecifiedDataTypeMsg "none" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" InvalidFcnCallConnMsg "error" FcnCallInpInsideContextMsg "Use local settings" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SFcnCompatibilityMsg "none" UniqueDataStoreMsg "none" BusObjectLabelMismatch off RootOutportRequireBusObject "warning" AssertControl "UseLocalSettings" EnableOverflowDetection off ModelReferenceIOMsg "none" ModelReferenceVersionMismatchMessage "none" ModelReferenceIOMismatchMessage "none" ModelReferenceCSMismatchMessage "none" ModelReferenceSimTargetVerbose off UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" } Simulink.HardwareCC { $ObjectID 6 Version "1.1.0" ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 32 ProdBitPerLong 32 ProdIntDivRoundTo "Undefined" ProdEndianess "Unspecified" ProdWordSize 32 ProdShiftRightIntArith on ProdHWDeviceType "32-bit Generic" TargetBitPerChar 8 TargetBitPerShort 16 TargetBitPerInt 32 TargetBitPerLong 32 TargetShiftRightIntArith on TargetIntDivRoundTo "Undefined" TargetEndianess "Unspecified" TargetWordSize 32 TargetTypeEmulationWarnSuppressLevel 0 TargetPreprocMaxBitsSint 32 TargetPreprocMaxBitsUint 32 TargetHWDeviceType "Specified" TargetUnknown on ProdEqTarget on } Simulink.ModelReferenceCC { $ObjectID 7 Version "1.1.0" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" ModelReferenceNumInstancesAllowed "Multi" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 8 Version "1.1.0" SystemTargetFile "ert.tlc" GenCodeOnly on MakeCommand "make_rtw" TemplateMakefile "ert_default_tmf" GenerateReport on SaveLog off RTWVerbose on RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off ProcessScriptMode "Default" ConfigurationMode "Optimized" ProcessScript "ert_make_rtw_hook" ConfigAtBuild off IncludeHyperlinkInReport on LaunchReport on GenCPP off Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 9 Version "1.1.0" ForceParamTrailComments off GenerateComments off IgnoreCustomStorageClasses off IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off IncDataTypeInIds off PrefixModelToSubsysFcnNames off CustomSymbolStr "$R$N$M" MangleLength 1 DefineNamingRule "None" ParamNamingRule "None" SignalNamingRule "None" InsertBlockDesc off SimulinkBlockComments off EnableCustomComments off InlinedPrmAccess "Literals" ReqsInCode off } Simulink.ERTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 10 Version "1.1.0" TargetFcnLib "ansi_tfl_tmw.mat" GenFloatMathFcnCalls "ANSI_C" UtilityFuncGeneration "Auto" GenerateFullHeader on GenerateSampleERTMain off IsPILTarget off ModelReferenceCompliant on IncludeMdlTerminateFcn off CombineOutputUpdateFcns on SuppressErrorStatus on IncludeFileDelimiter "Auto" ERTCustomFileBanners on SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging off MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode on SupportContinuousTime on SupportNonInlinedSFcns on GenerateErtSFunction off GenerateASAP2 off ExtMode off ExtModeTransport 0 ExtModeStaticAlloc off ExtModeStaticAllocSize 1000000 ExtModeTesting off ExtModeMexFile "ext_comm" InlinedParameterPlacement "Hierarchical" TargetOS "BareBoardExample" MultiInstanceErrorCode "Error" RateGroupingCode on RootIOFormat "Individual arguments" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off ERTSrcFileBannerTemplate "ert_code_template.cgt" ERTHdrFileBannerTemplate "ert_code_template.cgt" ERTDataSrcFileTemplate "ert_code_template.cgt" ERTDataHdrFileTemplate "ert_code_template.cgt" ERTCustomFileTemplate "example_file_process.tlc" InitialValueSource "Model" ModuleNamingRule "Unspecified" SignalDisplayLevel 10 ParamTuneLevel 10 GlobalDataDefinition "Auto" GlobalDataReference "Auto" GRTInterface off } PropName "Components" } } PropName "Components" } Name "Configuration" SimulationMode "normal" ExtraOptions "-aInitFltsAndDblsToZero=0 " CurrentDlgPage "Solver" } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 1 } BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } BlockParameterDefaults { Block { BlockType Inport UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" DataType "auto" OutDataType "sfix(16)" OutScaling "2^0" SignalType "auto" SamplingMode "auto" Interpolate on } Block { BlockType Outport Port "1" UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" DataType "auto" OutDataType "sfix(16)" OutScaling "2^0" SignalType "auto" SamplingMode "auto" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Reference } Block { BlockType SubSystem ShowPortLabels on Permissions "ReadWrite" PermitHierarchicalResolution "All" SystemSampleTime "-1" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" SimViewingDevice off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" } Block { BlockType Sum IconShape "rectangular" Inputs "++" InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType UnitDelay X0 "0" SampleTime "1" StateMustResolveToSignalObject off RTWStateStorageClass "Auto" } } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight "normal" FontAngle "normal" } System { Name "fxpdemo_code_only" Location [8, 99, 592, 665] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" ReportName "simulink-default.rpt" Block { BlockType Inport Name "In0" Position [115, 118, 145, 132] Port "1" IconDisplay "Port number" DataType "Specify via dialog" OutDataType "sfix(8)" OutScaling "2^-4" LatchInput off Interpolate off } Block { BlockType SubSystem Name "Controller" Ports [1, 1] Position [240, 87, 315, 163] FontName "Arial" FontSize 14 FontWeight "bold" TreatAsAtomicUnit off MinAlgLoopOccurrences off RTWSystemCode "Auto" System { Name "Controller" Location [112, 364, 698, 787] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" Block { BlockType Inport Name "In1" Position [15, 78, 45, 92] Port "1" IconDisplay "Port number" LatchInput off } Block { BlockType Sum Name "Combine Terms" Ports [2, 1] Position [360, 11, 395, 309] Inputs "+-" InputSameDT off OutDataTypeMode "Specify via dialog" OutDataType "AccumType" OutScaling "2^(-28)" } Block { BlockType Reference Name "Denominator Terms" Ports [1, 1] Position [235, 216, 275, 254] SourceBlock "fixpt_lib_4/Filters/FIR" SourceType "Fixed-Point FIR" mgainval "dden(2:length(dden))" vinit "0.0" samptime "tsamp" GainDataTypeScalingMode "Specify via dialog" GainDataType "BaseType" GainScaling "2^-14" MatRadixGroup "Best Precision: Element-wise" OutputDataTypeScalingMode "Specify via dialog" OutDataType "AccumType" OutScaling "2^(-27)" LockScale "off" RndMeth "Floor" DoSatur "on" } Block { BlockType Reference Name "Down Cast" Ports [1, 1] Position [445, 141, 490, 179] SourceBlock "fixpt_lib_4/Data Type/Conversion" SourceType "Fixed-Point to Fixed-Point Conversion" ConvertRealWorld "Real World Value" OutputDataTypeScalingMode "Specify via dialog" OutDataType "BaseType" OutScaling "2^(-12)" LockScale "off" RndMeth "Floor" DoSatur "on" } Block { BlockType Reference Name "Numerator Terms" Ports [1, 1] Position [230, 65, 270, 105] SourceBlock "fixpt_lib_4/Filters/FIR" SourceType "Fixed-Point FIR" mgainval "dnum" vinit "0.0" samptime "tsamp" GainDataTypeScalingMode "Specify via dialog" GainDataType "BaseType" GainScaling "2^-14" MatRadixGroup "Best Precision: Element-wise" OutputDataTypeScalingMode "Specify via dialog" OutDataType "AccumType" OutScaling "2^(-28)" LockScale "off" RndMeth "Floor" DoSatur "on" } Block { BlockType UnitDelay Name "Prev Out" Position [105, 216, 145, 254] X0 "0.0" SampleTime "tsamp" } Block { BlockType Reference Name "Up Cast" Ports [1, 1] Position [95, 66, 140, 104] SourceBlock "fixpt_lib_4/Data Type/Conversion" SourceType "Fixed-Point to Fixed-Point Conversion" ConvertRealWorld "Real World Value" OutputDataTypeScalingMode "Specify via dialog" OutDataType "BaseType" OutScaling "2^(-12)" LockScale "off" RndMeth "Floor" DoSatur "on" } Block { BlockType Outport Name "Out1" Position [515, 125, 545, 140] Orientation "up" IconDisplay "Port number" InitialOutput "0" } Line { SrcBlock "In1" SrcPort 1 DstBlock "Up Cast" DstPort 1 } Line { SrcBlock "Up Cast" SrcPort 1 DstBlock "Numerator Terms" DstPort 1 } Line { SrcBlock "Prev Out" SrcPort 1 DstBlock "Denominator Terms" DstPort 1 } Line { SrcBlock "Down Cast" SrcPort 1 Points [35, 0] Branch { DstBlock "Out1" DstPort 1 } Branch { Points [0, 240; -475, 0; 0, -165] DstBlock "Prev Out" DstPort 1 } } Line { SrcBlock "Numerator Terms" SrcPort 1 DstBlock "Combine Terms" DstPort 1 } Line { SrcBlock "Denominator Terms" SrcPort 1 DstBlock "Combine Terms" DstPort 2 } Line { SrcBlock "Combine Terms" SrcPort 1 DstBlock "Down Cast" DstPort 1 } Annotation { Name "Reduce Output from\nAccumulator Size to\nBa" "se Memory Size" Position [471, 223] } Annotation { Name "Combine Numerator \nand Denominator \nContr" "ibutions to TF\nin Accumulator" Position [382, 359] } Annotation { Name "Store Most\nRecent Output\nIn Memory for\nO" "ne Sample Time" Position [127, 303] } Annotation { Name "Multiply and Accumulate\nMost Recent Output" "s and\nDenominator Coefficients\nin Accumulator" Position [261, 306] } Annotation { Name "Multiply and Accumulate\nMost Recent Inputs" " and\nNumerator Coefficients\nin Accumulator" Position [251, 154] } Annotation { Name "Convert from \nA2D Type\nto BaseType" Position [118, 146] } } } Block { BlockType Outport Name "Out1" Position [415, 118, 445, 132] IconDisplay "Port number" } Line { SrcBlock "Controller" SrcPort 1 DstBlock "Out1" DstPort 1 } Line { SrcBlock "In0" SrcPort 1 DstBlock "Controller" DstPort 1 } Annotation { Name "Root Level Inport\nmust specify output's\ndata " "type and scaling" Position [125, 176] } Annotation { Name "Generating Code ONLY for the Digital Controller" " \nfrom the example fxpdemo_feedback.mdl" Position [296, 37] FontName "Arial" FontSize 24 FontWeight "bold" } Annotation { Name "Check List: PURE Fixed Point Code Generation\n" "\n1) Copy Fixed-Point portion to new model\n\n2) Add root level inputs\n " "a) set Output data type\n b) set Ouput scaling value\n\n3) Under menu 'Si" "mulation/Parameters...'\n a) set Solver Type to 'Fixed-step'\n b) als" "o set Solver Type to 'discrete (no continuous states)'\n c) set Fixed ste" "p size to appropriate value\n\n4) Under menu 'Tools/RTW Options...'\n a) " "hit 'Browse...' button, select 'Embedded-C Real-Time Target', hit OK\n b)" " select Category:ERT code generation options, check 'Integer code only'\n " " c) set other optimizations, such as inlining, as suitable..." Position [23, 417] HorizontalAlignment "left" FontName "Arial" FontSize 14 FontWeight "bold" } Annotation { Name "Root Level Outport" Position [437, 175] } Annotation { Name "Digital Controller\nSoftware on\nFixed Point \n" "Processor" Position [279, 228] FontName "Arial" FontSize 16 FontWeight "bold" } } }