📄 pll_d0_fncd.mdl
字号:
IconShape "rectangular"
AllPortsSameDT on
OutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
SampleTime "-1"
}
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 Memory
X0 "0"
InheritSampleTime off
LinearizeMemory off
LinearizeAsDelay off
StateMustResolveToSignalObject off
RTWStateStorageClass "Auto"
}
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 RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross 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 StateSpace
A "1"
B "1"
C "1"
D "1"
X0 "0"
AbsoluteTolerance "auto"
Realization "auto"
}
Block {
BlockType SubSystem
ShowPortLabels on
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 "++"
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 TransferFcn
Numerator "[1]"
Denominator "[1 2 1]"
AbsoluteTolerance "auto"
Realization "auto"
}
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 "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "pll_d0_fncd"
Location [33, 92, 940, 660]
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 "135"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "Analog\nFilter Design1"
Ports [1, 1]
Position [230, 127, 295, 183]
FontSize 10
SourceBlock "dsparch4/Analog\nFilter Design"
SourceType "Analog Filter Design"
method "Elliptic"
filttype "Lowpass"
N "4"
Wlo "2*pi*350e3"
Whi "80"
Rp "3"
Rs "80"
}
Block {
BlockType SubSystem
Name "Divide by N"
Ports [1, 1, 0, 1]
Position [160, 230, 260, 280]
Orientation "left"
AncestorBlock "rab_favorites/Divide by N"
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Divide by N"
Location [111, 254, 712, 554]
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 "div #"
Position [140, 158, 170, 172]
IconDisplay "Port number"
}
Block {
BlockType TriggerPort
Name "Clock In"
Ports []
Position [225, 20, 245, 40]
}
Block {
BlockType Constant
Name "Constant"
Position [135, 95, 165, 125]
Value "1"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [2, 1]
Position [365, 102, 395, 133]
Operator "mod"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [455, 97, 485, 128]
Operator "<"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [215, 100, 235, 120]
ShowName off
IconShape "round"
Inputs "|++"
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [270, 90, 305, 130]
SampleTime "-1"
}
Block {
BlockType Outport
Name "Clock Out"
Position [540, 108, 570, 122]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, -25; 240, 0; 0, 20]
DstBlock "Relational\nOperator"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Unit Delay"
DstPort 1
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
DstBlock "Math\nFunction"
DstPort 1
}
Line {
SrcBlock "div #"
SrcPort 1
Points [175, 0]
DstBlock "Math\nFunction"
DstPort 2
}
Line {
SrcBlock "Math\nFunction"
SrcPort 1
Points [20, 0]
Branch {
Points [0, 90; -195, 0]
DstBlock "Sum"
DstPort 2
}
Branch {
DstBlock "Relational\nOperator"
DstPort 2
}
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
DstBlock "Clock Out"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "Fout=N*Fr=5MHz"
Position [300, 240, 330, 270]
Orientation "left"
Value "5"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Gain
Name "Gain"
Position [400, 140, 430, 170]
Gain "3*1.558*k4"
}
Block {
BlockType TransferFcn
Name "Loop Compensator"
Position [330, 68, 425, 112]
Numerator "[1.7e4*k1 1e8]*0.0026*k0"
Denominator "[1e-7*k2 1.2*k3 0]"
}
Block {
BlockType SubSystem
Name "Make Square2"
Ports [1, 1]
Position [65, 130, 95, 180]
ShowName off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "Make Square"
MaskDescription "For input +ve values output is 1\nFor input -ve"
" values output is 0"
MaskDisplay "plot(0,0,100,100,[90,70,70,50,50,30,30,10,10],["
"20,20,40,40,20,20,40,40,20],[90,87,84,80,76,73,70,67,63,60,57,53,50,47,44,40,"
"36,33,30,27,23,20,17,13,10],[70,65,63,62,63,65,70,75,77,78,77,75,70,65,63,62,"
"63,65,70,75,77,78,77,75,70])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Make Square2"
Location [459, 360, 767, 528]
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 "In1"
Position [25, 33, 55, 47]
IconDisplay "Port number"
}
Block {
BlockType Constant
Name "Constant"
Position [30, 80, 60, 110]
Value "0"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [135, 32, 165, 63]
}
Block {
BlockType Outport
Name "Out1"
Position [270, 43, 300, 57]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [55, 0]
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Make Square3"
Ports [1, 1]
Position [350, 190, 380, 240]
Orientation "left"
ShowName off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "Make Square"
MaskDescription "For input +ve values output is 1\nFor input -ve"
" values output is 0"
MaskDisplay "plot(0,0,100,100,[90,70,70,50,50,30,30,10,10],["
"20,20,40,40,20,20,40,40,20],[90,87,84,80,76,73,70,67,63,60,57,53,50,47,44,40,"
"36,33,30,27,23,20,17,13,10],[70,65,63,62,63,65,70,75,77,78,77,75,70,65,63,62,"
"63,65,70,75,77,78,77,75,70])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Make Square3"
Location [459, 360, 767, 528]
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 "In1"
Position [25, 33, 55, 47]
IconDisplay "Port number"
}
Block {
BlockType Constant
Name "Constant"
Position [30, 80, 60, 110]
Value "0"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [135, 32, 165, 63]
Operator ">"
}
Block {
BlockType Outport
Name "Out1"
Position [270, 43, 300, 57]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [55, 0]
DstBlock "Relational\nOperator"
DstPort 2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -