📄 dds.mdl
字号:
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 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 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 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"
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 "arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "DDS"
Location [99, 94, 679, 391]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Constant
Name "Constant"
Position [100, 75, 165, 105]
ShowName off
SampleTime "1"
}
Block {
BlockType Constant
Name "Constant1"
Position [100, 110, 165, 140]
ShowName off
Value "4"
SampleTime "1"
}
Block {
BlockType Constant
Name "Constant2"
Position [100, 145, 165, 175]
ShowName off
Value "5"
SampleTime "1"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [380, 109, 410, 141]
Floating off
Location [553, 489, 877, 728]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "SubDDS"
Ports [3, 1]
Position [235, 74, 325, 176]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "SubDDS"
Location [2, 78, 1014, 728]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "Phase"
Position [25, 68, 55, 82]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Freq"
Position [25, 128, 55, 142]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Amp"
Position [25, 203, 55, 217]
Port "3"
IconDisplay "Port number"
}
Block {
BlockType Sum
Name "Add"
Ports [2, 1]
Position [330, 49, 360, 151]
ShowName off
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Add1"
Ports [2, 1]
Position [190, 103, 225, 147]
ShowName off
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain"
Position [75, 57, 145, 93]
ShowName off
Gain "2^12"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain1"
Position [75, 116, 155, 154]
ShowName off
Gain "2^6"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [2, 1]
Position [450, 59, 485, 146]
ShowName off
Operator "mod"
}
Block {
BlockType Constant
Name "Mod 2^16"
Position [380, 110, 420, 140]
Value "2^16"
SampleTime "1"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [190, 187, 220, 218]
ShowName off
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "SinLUT"
Ports [1, 1]
Position [520, 77, 575, 133]
SourceBlock "simulink/Lookup\nTables/Direct Lookup\nTabl"
"e (n-D)"
SourceType "LookupNDDirect"
maskTabDims "1"
explicitNumDims "1"
outDims "Element"
tabIsInput off
mxTable "sin(2*pi*(0:2^16-1)/(2^16))"
clipFlag "None"
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [250, 108, 285, 142]
ShowName off
SampleTime "-1"
}
Block {
BlockType Outport
Name "DDSout"
Position [270, 198, 300, 212]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Phase"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Add1"
SrcPort 1
Points [0, 0]
DstBlock "Unit Delay"
DstPort 1
}
Line {
SrcBlock "Freq"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Amp"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Product"
SrcPort 1
Points [0, 0]
DstBlock "DDSout"
DstPort 1
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Add"
DstPort 2
}
Branch {
Points [0, -35; -140, 0; 0, 25]
DstBlock "Add1"
DstPort 1
}
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Add"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Add1"
DstPort 2
}
Line {
SrcBlock "Math\nFunction"
SrcPort 1
DstBlock "SinLUT"
DstPort 1
}
Line {
SrcBlock "SinLUT"
SrcPort 1
Points [20, 0; 0, 70; -440, 0; 0, 20]
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Add"
SrcPort 1
Points [45, 0; 0, -20]
DstBlock "Math\nFunction"
DstPort 1
}
Line {
SrcBlock "Mod 2^16"
SrcPort 1
DstBlock "Math\nFunction"
DstPort 2
}
Annotation {
Name "16 Bits of Sine LUT"
Position [498, 202]
DropShadow on
UseDisplayTextAsClickCallback off
FontSize 22
FontWeight "bold"
}
}
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "SubDDS"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "SubDDS"
DstPort 2
}
Line {
SrcBlock "SubDDS"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Constant2"
SrcPort 1
DstBlock "SubDDS"
DstPort 3
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -