📄 dpll.mdl
字号:
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType Math
Operator "exp"
OutputSignalType "auto"
SampleTime "-1"
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType "M-S-Function"
FunctionName "mlfile"
DisplayMFileStacktrace on
}
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(.*)"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Scope
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 "-1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType Sin
SineType "Time based"
TimeSource "Use simulation time"
Amplitude "1"
Bias "0"
Frequency "1"
Phase "0"
Samples "10"
Offset "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType SubSystem
ShowPortLabels "FromPortIcon"
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
TreatAsAtomicUnit off
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Terminator
}
Block {
BlockType TriggerPort
TriggerType "rising"
StatesWhenEnabling "inherit"
ShowOutputPort off
OutputDataType "auto"
SampleTimeType "triggered"
SampleTime "1"
ZeroCross on
}
Block {
BlockType UnitDelay
X0 "0"
SampleTime "1"
StateMustResolveToSignalObject off
RTWStateStorageClass "Auto"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
UseDisplayTextAsClickCallback off
}
LineDefaults {
FontName "Arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "dpll"
Location [375, 82, 1020, 467]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "Loop Filter"
Ports [1, 1]
Position [355, 83, 440, 137]
DropShadow on
DialogController "dspdialog.DigitalFilter"
DialogControllerArgs "DataTag0"
SourceBlock "dsparch4/Digital Filter"
SourceType "Digital Filter"
TypePopup "IIR (poles & zeros)"
IIRFiltStruct "Direct form II transposed"
AllPoleFiltStruct "Direct form"
FIRFiltStruct "Direct form"
CoeffSource "Specify via dialog"
NumCoeffs "b"
DenCoeffs "a"
BiQuadCoeffs "[1 0.3 0.4 1 0.1 0.2]"
LatticeCoeffs "[0.2 0.4]"
denIgnore on
FiltPerSampPopup "One filter per frame"
IC "0"
ICnum "0"
ICden "0"
additionalParams off
allowOverrides on
showCoeff off
firstCoeffMode "Same word length as input"
firstCoeffWordLength "16"
firstCoeffFracLength "15"
secondCoeffMode "Same as numerator"
secondCoeffWordLength "16"
secondCoeffFracLength "15"
thirdCoeffMode "Same as input"
thirdCoeffWordLength "16"
thirdCoeffFracLength "15"
showOut off
outputMode "Same as accumulator"
outputWordLength "16"
outputFracLength "15"
showAcc off
accumMode "Same as product output"
accumWordLength "32"
accumFracLength "30"
showMpy off
prodOutputMode "Same as input"
prodOutputWordLength "32"
prodOutputFracLength "30"
showMem off
memoryMode "Same as accumulator"
memoryWordLength "16"
memoryFracLength "15"
roundingMode "Nearest"
overflowMode off
ScaleValues "1"
scaleValueFracLength "14"
tapSumMode "Same as input"
tapSumWordLength "32"
tapSumFracLength "30"
stageIOMode "Same as input"
stageIOWordLength "16"
stageInFracLength "15"
stageOutFracLength "15"
LockScale off
FilterSource "Specify via dialog"
dfiltObjectName "dfilt.dffir([1 2 1])"
multiplicandMode "Same as output"
multiplicandWordLength "32"
multiplicandFracLength "30"
}
Block {
BlockType SubSystem
Name "NCO"
Ports [1, 1]
Position [325, 223, 395, 267]
Orientation "left"
DropShadow on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "NCO"
Location [145, 147, 790, 532]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "ctrl"
Position [30, 83, 60, 97]
IconDisplay "Port number"
}
Block {
BlockType Reference
Name "NCO"
Ports [1, 1]
Position [205, 62, 275, 118]
DialogController "dspdialog.NCO"
SourceBlock "dspsigops/NCO"
SourceType "NCO"
AccIncSrc "Input port"
AccInc "16417"
PhaseOffsetSrc "Specify via dialog"
PhaseOffset "0"
AccumWL "16"
HasDither off
DitherWL "5"
PNgeneratorLength "12"
HasPhaseQuantizer off
TableDepth "14"
HasOutputPhaseError off
Formula "Cosine"
DataType "double"
OutputWL "16"
OutputFL "14"
CompMethod "Table lookup (no interpolation)"
SampleTime "1/8000"
SamplesPerFrame "1"
}
Block {
BlockType SubSystem
Name "To Center Freq"
Ports [1, 1]
Position [110, 67, 170, 113]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "To Center Freq"
Location [392, 453, 795, 651]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "142"
Block {
BlockType Inport
Name "ctrl"
Position [390, 71, 425, 89]
Orientation "left"
IconDisplay "Port number"
}
Block {
BlockType Sum
Name "Add"
Ports [2, 1]
Position [190, 72, 220, 103]
Orientation "left"
CollapseMode "All dimensions"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
SampleTime "Ts"
}
Block {
BlockType Constant
Name "Constant"
Position [340, 115, 420, 145]
Orientation "left"
Value "round(1e6*2^16*Ts)"
OutDataTypeMode "Inherit via back propagation"
}
Block {
BlockType Gain
Name "Gain"
Position [280, 62, 330, 98]
Orientation "left"
Gain "32"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Specify via dialog"
OutDataType "sint(16)"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "inc"
Position [50, 83, 80, 97]
Orientation "left"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [-85, 0; 0, -35]
DstBlock "Add"
DstPort 2
}
Line {
SrcBlock "Add"
SrcPort 1
DstBlock "inc"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Add"
DstPort 1
}
Line {
SrcBlock "ctrl"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
}
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [330, 73, 365, 107]
SampleTime "-1"
}
Block {
BlockType Outport
Name "cos"
Position [460, 83, 490, 97]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "To Center Freq"
SrcPort 1
DstBlock "NCO"
DstPort 1
}
Line {
SrcBlock "ctrl"
SrcPort 1
DstBlock "To Center Freq"
DstPort 1
}
Line {
SrcBlock "NCO"
SrcPort 1
DstBlock "Unit Delay"
DstPort 1
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
DstBlock "cos"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "PFD"
Ports [2, 1]
Position [240, 81, 290, 139]
DropShadow on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "PFD"
Location [588, 564, 1218, 891]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "133"
Block {
BlockType Inport
Name "Ref"
Position [25, 28, 55, 42]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Var"
Position [25, 63, 55, 77]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType SubSystem
Name "Chart"
Ports [0, 1, 0, 1]
Position [120, 93, 180, 147]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "Stateflow"
MaskDescription "Stateflow diagram"
MaskDisplay "plot(sf('Private','sfblk','xIcon'),sf('Priv"
"ate','sfblk','yIcon'));text(0.5,0,sf('Private', 'sfblk', 'tIcon'),'Horizontal"
"Al','Center','VerticalAl','Bottom');"
MaskSelfModifiable on
MaskIconFrame off
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Chart"
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType TriggerPort
Name " input events "
Ports [0, 1]
Position [20, 101, 40, 119]
ShowOutputPort on
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 180, 320, 220]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function dpll 2"
Ports [1, 2]
Position [180, 100, 230, 180]
FunctionName "sf_sfun"
PortCounts "[1 2]"
Port {
PortNumber 2
Name "s"
RTWStorageClass "Auto"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -