📄 sdtoolbox.mdl
字号:
Library { Name "SDtoolbox" Version 6.2 MdlSubVersion 0 SavedCharacterEncoding "ibm-5348_P100-1997" SaveDefaultBlockParams on SampleTimeColors off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowViewerIcons on SortedOrder off ExecutionContextIcon off ShowLinearizationAnnotations on CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeReport off CovReportOnPause on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off Created "Mon Nov 08 11:04:45 2004" Creator "piero" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%<Auto>" LastModifiedBy "piero" ModifiedDateFormat "%<Auto>" LastModifiedDate "Wed Apr 13 18:46:48 2005" ModelVersionFormat "1.%<AutoIncrement:117>" ConfigurationManager "None" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" 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 StrictBusMsg "None" ProdHWDeviceType "32-bit Generic" ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } BlockParameterDefaults { Block { BlockType Constant Value "1" VectorParams1D on OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" } Block { BlockType Derivative LinearizePole "inf" } Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ParameterDataTypeMode "Same as input" ParameterDataType "sfix(16)" ParameterScalingMode "Best Precision: Matrix-wise" ParameterScaling "2^0" OutDataTypeMode "Same as input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } 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 MATLABFcn MATLABFcn "sin" OutputDimensions "-1" OutputSignalType "auto" Output1D on SampleTime "-1" } Block { BlockType Mux Inputs "4" DisplayOption "none" UseBusObject off BusObject "BusObject" NonVirtualBus off } 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 Product Inputs "2" Multiplication "Element-wise(.*)" InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Zero" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType RandomNumber Mean "0" Variance "1" Seed "0" SampleTime "-1" VectorParams1D on } Block { BlockType Reference } Block { BlockType Saturate UpperLimit "0.5" LowerLimit "-0.5" LinearizeAsGain on ZeroCross on SampleTime "-1" } Block { BlockType Scope Floating off ModelBased off TickLabels "OneTimeTick" ZoomMode "on" Grid "on" TimeRange "auto" YMin "-5" YMax "5" SaveToWorkspace off SaveName "ScopeData" LimitDataPoints on MaxDataPoints "5000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType Selector InputType "Vector" IndexMode "One-based" ElementSrc "Internal" Elements "1" RowSrc "Internal" Rows "1" ColumnSrc "Internal" Columns "1" InputPortWidth "-1" IndexIsStartValue off OutputPortSize "1" } 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" } Block { BlockType ZeroOrderHold SampleTime "1" } } 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 "SDtoolbox" Location [360, 502, 1147, 813] Open on ModelBrowserVisibility off ModelBrowserWidth 212 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" ZoomFactor "100" ReportName "simulink-default.rpt" BlocksetDataString "[0 -9.81 0]|1|0|1e-3|1|1e-3|1|2|1e-4|1e-4|0|0|1|1""e-5|Deprecated|0|0|0||1|0" Block { BlockType SubSystem Name "ADC-DAC" Ports [1, 2] Position [390, 90, 500, 150] TreatAsAtomicUnit off MinAlgLoopOccurrences off RTWSystemCode "Auto" MaskDescription "Models multi-bit ADC and DAC considering mismat""ch" MaskHelp "web('ADCDAC.html','-helpbrowser')" MaskPromptString "Number of Comparators in Quantizer|Consider Mis""match|Matching Parameter|Total Capacitance|Variance Vector Externally Provide""d|Variance Vector|Enable LOG File|Name of LOG File (*.log)" MaskStyleString "edit,checkbox,edit,edit,checkbox,edit,checkbox,""edit" MaskTunableValueString "on,on,on,on,on,on,on,on" MaskCallbackString "|opt1=(get_param(gcb,'MM'));\nopt2=(get_param(g""cb,'VVG'));\nopt3=(get_param(gcb,'LF'));\n\nswitch opt1\n case 'off'\n"" switch opt2\n case 'off'\n "" switch opt3\n ""case 'off'\n set_param""(gcb,'MaskEnables',{'on','on','off','off','off','off','on','off'});\n "" case 'on'\n "" set_param(gcb,'MaskEnables',{'on','on','off','off','o""ff','off','on','on'});\n otherwise\n"" set_param(gcb,'MaskEn""ables',{'on','on','off','off','off','off','on','off'});\n "" end\n case 'on'\n "" switch opt3\n case 'of""f'\n set_param(gcb,'Ma""skEnables',{'on','on','off','off','off','off','on','off'});\n "" case 'on'\n "" set_param(gcb,'MaskEnables',{'on','on','off','off','off','off""','on','on'});\n otherwise\n "" set_param(gcb,'MaskEnables',{""'on','on','off','off','off','off','on','off'});\n "" end\n end\n case 'on'\n ""switch opt2\n case 'off'\n "" switch opt3\n case 'off'\n"" set_param(gcb,'MaskEn""ables',{'on','on','on','on','on','off','on','off'});\n "" case 'on'\n "" set_param(gcb,'MaskEnables',{'on','on','on','on','on','off','""on','on'});\n otherwise\n "" set_param(gcb,'MaskEnables',{""'on','on','on','on','on','off','on','on'});\n ""end\n case 'on'\n switc""h opt3\n case 'off'\n "" set_param(gcb,'MaskEnables',{'on','on""','on','on','on','on','on','off'});\n ""case 'on'\n set_param(""gcb,'MaskEnables',{'on','on','on','on','on','on','on','on'});\n "" otherwise\n "" set_param(gcb,'MaskEnables',{'on','on','on','on','on'"",'on','on','off'});\n end\n end""\nend\n \n "" \n \n "" \n |||opt1=(ge""t_param(gcb,'MM'));\nopt2=(get_param(gcb,'VVG'));\nopt3=(get_param(gcb,'LF'))"";\n\nswitch opt1\n case 'off'\n switch opt2\n "" case 'off'\n switch opt3\n"" case 'off'\n "" set_param(gcb,'MaskEnables',{'on','on','off',""'off','off','off','on','off'});\n case"" 'on'\n set_param(gcb,""'MaskEnables',{'on','on','off','off','off','off','on','on'});\n "" otherwise\n "" set_param(gcb,'MaskEnables',{'on','on','off','off','o""ff','off','on','off'});\n end\n "" case 'on'\n switch opt3\n"" case 'off'\n "" set_param(gcb,'MaskEnables',{'on','on','off',""'off','off','off','on','off'});\n case"" 'on'\n set_param(gcb,""'MaskEnables',{'on','on','off','off','off','off','on','on'});\n "" otherwise\n "" set_param(gcb,'MaskEnables',{'on','on','off','off','o""ff','off','on','off'});\n end\n "" end\n case 'on'\n switch opt2\n "" case 'off'\n switch opt3\n"" case 'off'\n "" set_param(gcb,'MaskEnables',{'on','on','on','""on','on','off','on','off'});\n case 'o""n'\n set_param(gcb,'Ma""skEnables',{'on','on','on','on','on','off','on','on'});\n "" otherwise\n "" set_param(gcb,'MaskEnables',{'on','on','on','on','on','off','""on','on'});\n end\n cas""e 'on'\n switch opt3\n "" case 'off'\n "" set_param(gcb,'MaskEnables',{'on','on','on','on','on','on','on','off'""});\n case 'on'\n "" set_param(gcb,'MaskEnables',{'on','on""','on','on','on','on','on','on'});\n o""therwise\n set_param(g""cb,'MaskEnables',{'on','on','on','on','on','on','on','off'});\n "" end\n end\nend\n "" \n||opt1=(get_param(gcb,'MM'));\nopt2=(get_param(gcb,""'VVG'));\nopt3=(get_param(gcb,'LF'));\n\nswitch opt1\n case 'off'\n"" switch opt2\n case 'off'\n "" switch opt3\n ""case 'off'\n set_param""(gcb,'MaskEnables',{'on','on','off','off','off','off','on','off'});\n "" case 'on'\n "" set_param(gcb,'MaskEnables',{'on','on','off','off','o""ff','off','on','on'});\n otherwise\n"" set_param(gcb,'MaskEn""ables',{'on','on','off','off','off','off','on','off'});\n "" end\n case 'on'\n "" switch opt3\n case 'of""f'\n set_param(gcb,'Ma""skEnables',{'on','on','off','off','off','off','on','off'});\n "" case 'on'\n "" set_param(gcb,'MaskEnables',{'on','on','off','off','off','off""','on','on'});\n otherwise\n "" set_param(gcb,'MaskEnables',{""'on','on','off','off','off','off','on','off'});\n "" end\n end\n case 'on'\n ""switch opt2\n case 'off'\n "" switch opt3\n case 'off'\n"" set_param(gcb,'MaskEn""ables',{'on','on','on','on','on','off','on','off'});\n "" case 'on'\n "" set_param(gcb,'MaskEnables',{'on','on','on','on','on','off','""on','on'});\n otherwise\n "" set_param(gcb,'MaskEnables',{""'on','on','on','on','on','off','on','on'});\n ""end\n case 'on'\n switc""h opt3\n case 'off'\n "" set_param(gcb,'MaskEnables',{'on','on""','on','on','on','on','on','off'});\n ""case 'on'\n set_param(""gcb,'MaskEnables',{'on','on','on','on','on','on','on','on'});\n "" otherwise\n "" set_param(gcb,'MaskEnables',{'on','on','on','on','on'"",'on','on','off'});\n end\n end""\nend\n \n|" MaskEnableString "on,on,on,on,on,off,on,on" MaskVisibilityString "on,on,on,on,on,on,on,on" MaskToolTipString "on,on,on,on,on,on,on,on" MaskVarAliasString ",,,,,,," MaskVariables "k=@1;MM=@2;match=@3;CST=@4;VVG=@5;argo=@6;LF=@7"";NF=&8;" MaskInitialization "[Vthreshold,ncap,DAClevelIDEAL,DAClevelREAL]=in""iADC_DAC(NF,k,MM,LF,CST,argo,match,VVG);" MaskDisplay "patch([0 0.10 0.90 1 0.9 0.1 0], [0.5 0 0 0.5 1"" 1 0.5],[1.0 1.0 1.0])\ndisp('ADC-DAC')\nport_label('output', 2, ' DAC '"")\nport_label('output', 1, ' ADC ')\nplot([0 0.10 0.90 1 0.9 0.1 0], [0.""5 0 0 0.5 1 1 0.5])\n" MaskIconFrame off MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "NCOMPARATORI|on|match|ctot|off|argo(:,3)|on|ret""A.log" MaskTabNameString ",,,,,,," System { Name "ADC-DAC" Location [177, 305, 644, 540] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" ZoomFactor "100" Block { BlockType Inport Name "In1" Position [55, 103, 85, 117] Port "1" IconDisplay "Port number" LatchInput off } Block { BlockType Constant Name "Constant1" Position [50, 151, 190, 189] ShowName off Value "DAClevelIDEAL" } Block { BlockType Constant Name "Constant3" Position [40, 27, 190, 63] ShowName off Value "DAClevelREAL" } Block { BlockType Selector Name "Selector" Ports [2, 1] Position [285, 35, 325, 75] NamePlacement "alternate" ShowName off ElementSrc "External" Elements "[1 3]" InputPortWidth "k+1" } Block { BlockType Selector Name "Selector1" Ports [2, 1] Position [290, 160, 330, 200] NamePlacement "alternate" ShowName off ElementSrc "External" Elements "[1 3]" InputPortWidth "k+1" } Block { BlockType MATLABFcn Name "stageADC" Position [130, 95, 190, 125] ShowName off MATLABFcn "ADconv(u,Vthreshold)" } Block { BlockType Outport Name "ADC" Position [360, 173, 390, 187] IconDisplay "Port number" BusOutputAsStruct off } Block { BlockType Outport Name "DAC" Position [360, 48, 390, 62] Port "2" IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Selector1" SrcPort 1 DstBlock "ADC" DstPort 1 } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Selector1" DstPort 1 } Line { SrcBlock "stageADC" SrcPort 1 Points [0, 0; 40, 0] Branch { Points [0, 80] DstBlock "Selector1" DstPort 2 } Branch { Points [0, -45] DstBlock "Selector" DstPort 2 } } Line { SrcBlock "Selector" SrcPort 1 DstBlock "DAC" DstPort 1 } Line { SrcBlock "In1" SrcPort 1 DstBlock "stageADC" DstPort 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -