📄 nco.mdl
字号:
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Specify via dialog"
OutDataType "uint(32)"
SaturateOnIntegerOverflow off
}
Block {
BlockType SubSystem
Name "Look Up Table"
Ports [1, 2]
Position [865, 172, 950, 223]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Look Up Table"
Location [27, 255, 894, 623]
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 "132"
Block {
BlockType Inport
Name "In1"
Position [25, 33, 55, 47]
IconDisplay "Port number"
}
Block {
BlockType Lookup
Name "Full Cos LUT"
Position [315, 25, 365, 75]
InputValues "[0:2^12-1]"
OutputValues "cos(pi*[0:2^12-1]/2^11)"
LookUpMeth "Use Input Nearest"
OutDataTypeMode "Specify via dialog"
OutDataType "sfix(10)"
OutScaling "2^-9"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "I Channel"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Concatenate
Name "Matrix\nConcatenation"
Ports [2, 1]
Position [195, 29, 250, 71]
Mode "Vertical matrix concatenation"
}
Block {
BlockType Constant
Name "Phase"
Position [95, 175, 125, 205]
Orientation "up"
Value "2^(12-2)"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Specify via dialog"
OutDataType "ufix(12)"
ConRadixGroup "Use specified scaling"
OutScaling "1"
SampleTime "T"
FramePeriod "inf"
}
Block {
BlockType Reference
Name "Submatrix"
Ports [1, 1]
Position [460, 30, 510, 70]
SourceBlock "dspmtrx3/Submatrix"
SourceType "Submatrix"
RowSpan "Range of rows"
RowStartMode "First"
RowStartIndex "1"
RowEndMode "Index"
RowEndIndex "1"
ColSpan "Range of columns"
ColStartMode "First"
ColStartIndex "1"
ColEndMode "Last"
ColEndIndex "1"
Port {
PortNumber 1
Name "I Channel"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Reference
Name "Submatrix1"
Ports [1, 1]
Position [460, 130, 510, 170]
SourceBlock "dspmtrx3/Submatrix"
SourceType "Submatrix"
RowSpan "Range of rows"
RowStartMode "Last"
RowStartIndex "1"
RowEndMode "Index"
RowEndIndex "1"
ColSpan "Range of columns"
ColStartMode "First"
ColStartIndex "1"
ColEndMode "Last"
ColEndIndex "1"
Port {
PortNumber 1
Name "Q Channel"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [100, 95, 120, 115]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via back propagation"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "I Channel"
Position [595, 43, 625, 57]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Q Channel"
Position [595, 143, 625, 157]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
Points [15, 0]
Branch {
Points [0, 65]
DstBlock "Sum"
DstPort 1
}
Branch {
DstBlock "Matrix\nConcatenation"
DstPort 1
}
}
Line {
Name "I Channel"
Labels [0, 0]
SrcBlock "Full Cos LUT"
SrcPort 1
Points [55, 0]
Branch {
DstBlock "Submatrix"
DstPort 1
}
Branch {
Points [0, 100]
DstBlock "Submatrix1"
DstPort 1
}
}
Line {
SrcBlock "Phase"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Matrix\nConcatenation"
SrcPort 1
DstBlock "Full Cos LUT"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [35, 0; 0, -45]
DstBlock "Matrix\nConcatenation"
DstPort 2
}
Line {
Name "I Channel"
Labels [0, 0]
SrcBlock "Submatrix"
SrcPort 1
DstBlock "I Channel"
DstPort 1
}
Line {
Name "Q Channel"
Labels [0, 0]
SrcBlock "Submatrix1"
SrcPort 1
Points [0, 0]
DstBlock "Q Channel"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Manual Switch"
Ports [2, 1]
Position [482, 275, 518, 305]
Orientation "up"
ShowName off
SourceBlock "simulink/Signal\nRouting/Manual Switch"
SourceType "Manual Switch"
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"
sw "1"
action "0"
}
Block {
BlockType Reference
Name "Manual Switch2"
Ports [2, 1]
Position [302, 305, 338, 335]
Orientation "up"
ShowName off
SourceBlock "simulink/Signal\nRouting/Manual Switch"
SourceType "Manual Switch"
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"
sw "0"
action "0"
}
Block {
BlockType SubSystem
Name "Phase Dithering"
Ports [0, 1]
Position [280, 400, 340, 470]
Orientation "up"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Phase Dithering"
Location [64, 418, 776, 631]
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 SubSystem
Name "Bit to Integer Conversion"
Ports [1, 1]
Position [360, 32, 430, 78]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "Stateflow"
MaskDescription "Embedded MATLAB block"
MaskDisplay "disp('fcn');"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Bit to Integer Conversion"
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 Inport
Name "u"
Position [20, 101, 40, 119]
IconDisplay "Port number"
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 160, 320, 200]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function NCO 1"
Ports [1, 2]
Position [180, 100, 230, 160]
FunctionName "sf_sfun"
PortCounts "[1 2]"
Port {
PortNumber 2
Name "y"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 171, 480, 189]
}
Block {
BlockType Outport
Name "y"
Position [460, 101, 480, 119]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [0, 65]
DstBlock " Demux "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock "u"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
Name "y"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "y"
DstPort 1
}
}
}
Block {
BlockType FrameConversion
Name "Frame Conversion"
Position [210, 35, 265, 75]
OutFrame "Sample based"
Port {
PortNumber 1
Name "test"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Reference
Name "PN Sequence\nGenerator1"
Ports [0, 1]
Position [20, 33, 100, 77]
SourceBlock "commseqgen2/PN Sequence\nGenerator"
SourceType "PN Sequence Generator"
poly "[53 6 2 1 0]"
ini_sta "[zeros(1,52) 1]"
shift "0"
Ts "1/50e6/20"
frameBased "on"
sampPerFrame "20"
reset "off"
outDataType "double"
}
Block {
BlockType Outport
Name "Out1"
Position [510, 48, 540, 62]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "PN Sequence\nGenerator1"
SrcPort 1
DstBlock "Frame Conversion"
DstPort 1
}
Line {
Name "test"
Labels [0, 0]
SrcBlock "Frame Conversion"
SrcPort 1
Points [0, 0]
DstBlock "Bit to Integer Conversion"
DstPort 1
}
Line {
SrcBlock "Bit to Integer Conversion"
SrcPort 1
Points [0, 0]
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Scope
Name "Scope"
Ports [2]
Position [1015, 170, 1045, 225]
Floating off
Location [102, 281, 809, 664]
Open off
NumInputPorts "2"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
TimeRange "9.539748953974934e-006"
YMin "-1~-1"
YMax "1~1"
DataFormat "StructureWithTime"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -