📄 nco.mdl
字号:
NumInputs "2"
}
Block {
BlockType Constant
}
Block {
BlockType DataTypeConversion
OutDataTypeMode "Inherit via back propagation"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
ConvertRealWorld "Real World Value (RWV)"
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Demux
Outputs "4"
DisplayOption "none"
BusSelectionMode off
}
Block {
BlockType FrameConversion
OutFrame "Frame based"
}
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
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType Lookup
InputValues "[-4:5]"
OutputValues " rand(1,10)-0.5"
LookUpMeth "Interpolation-Extrapolation"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
LUTDesignTableMode "Redesign Table"
LUTDesignDataSource "Block Dialog"
LUTDesignFunctionName "sqrt(x)"
LUTDesignUseExistingBP on
LUTDesignRelError "0.01"
LUTDesignAbsError "1e-6"
}
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"
}
Block {
BlockType SignalViewerScope
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"
Disabled off
ScrollMode 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(.*)"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Reference
}
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 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 Switch
Criteria "u2 >= Threshold"
Threshold "0"
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Terminator
}
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"
}
LineDefaults {
FontName "Arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "NCO"
Location [2, 84, 1014, 741]
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 "95"
ReportName "simulink-default.rpt"
Block {
BlockType Constant
Name " 1"
Position [365, 355, 395, 385]
Orientation "left"
NamePlacement "alternate"
ShowName off
Value "0"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint32"
OutDataType "ufix(12)"
ConRadixGroup "Use specified scaling"
OutScaling "1"
SampleTime "T"
FramePeriod "inf"
}
Block {
BlockType Constant
Name " 2"
Position [475, 355, 505, 385]
Orientation "up"
ShowName off
Value "0"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "int32"
OutDataType "ufix(12)"
ConRadixGroup "Use specified scaling"
OutScaling "1"
SampleTime "T"
FramePeriod "inf"
}
Block {
BlockType Sum
Name "Add"
Ports [2, 1]
Position [145, 182, 175, 213]
InputSameDT off
OutDataTypeMode "Specify via dialog"
OutDataType "ufix(32)"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "counter"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Reference
Name "Extract Bits"
Ports [1, 1]
Position [575, 180, 655, 220]
SourceBlock "simulink/Logic and Bit\nOperations/Extract Bits"
SourceType "Extract Bits"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
bitsToExtract "Range starting with most significant bit"
numBits "12"
bitIdxRange "[20 31]"
outScalingMode "Treat bit field as an integer"
}
Block {
BlockType SubSystem
Name "Filter1"
Ports [1, 1]
Position [545, 299, 595, 361]
Orientation "left"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Filter1"
Location [124, 160, 739, 364]
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 "164"
Block {
BlockType Inport
Name "In1"
Position [340, 38, 370, 52]
Orientation "left"
IconDisplay "Port number"
}
Block {
BlockType Gain
Name "Gain"
Position [155, 30, 185, 60]
Orientation "left"
Gain "2"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Specify via dialog"
OutDataType "uint(32)"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [85, 35, 105, 55]
Orientation "left"
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "int32"
SaturateOnIntegerOverflow off
}
Block {
BlockType UnitDelay
Name "Unit Delay1"
Position [260, 28, 295, 62]
Orientation "left"
NamePlacement "alternate"
ShowName off
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Unit Delay2"
Position [155, 83, 190, 117]
Orientation "left"
NamePlacement "alternate"
ShowName off
SampleTime "-1"
}
Block {
BlockType Outport
Name "Out1"
Position [15, 38, 45, 52]
Orientation "left"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Unit Delay1"
DstPort 1
}
Line {
SrcBlock "Unit Delay1"
SrcPort 1
Points [-35, 0]
Branch {
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, 55]
DstBlock "Unit Delay2"
DstPort 1
}
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Unit Delay2"
SrcPort 1
Points [-55, 0]
DstBlock "Sum"
DstPort 2
}
}
}
Block {
BlockType Gain
Name "Gain"
Position [680, 235, 710, 265]
Orientation "down"
Gain "2^20"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -