📄 cdma1.mdl
字号:
Floating off
SampleTime "-1"
}
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 Ground
}
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 MagnitudeAngleToComplex
Input "Magnitude and angle"
ConstantPart "0"
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 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 RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Reshape
OutputDimensionality "1-D array"
OutputDimensions "[1,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 Terminator
}
}
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 "CDMA1"
Location [0, 82, 1268, 775]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "AWGN\nChannel"
Ports [1, 1]
Position [595, 337, 670, 383]
ShowName off
SourceBlock "commchan3/AWGN\nChannel"
SourceType "AWGN Channel"
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"
seed "67"
noiseMode "Signal to noise ratio (Eb/No)"
EbNodB "4"
EsNodB "10"
SNRdB "0"
bitsPerSym "1"
Ps "1"
Tsym "1e-6"
variance "1"
}
Block {
BlockType Sum
Name "Add"
Ports [2, 1]
Position [410, 342, 440, 373]
ShowName off
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "BPSK\nDemodulator\nBaseban"
Ports [1, 1]
Position [1010, 237, 1080, 283]
ShowName off
DialogController "commDDGCreate"
DialogControllerArgs "DataTag0"
SourceBlock "commdigbbndpm3/BPSK\nDemodulator\nBaseband"
SourceType "BPSK Demodulator Baseband"
Ph "0"
DecType "Hard decision"
VarSource "Dialog"
Variance "1"
outDtype "double"
}
Block {
BlockType Reference
Name "BPSK\nDemodulator\nBaseban1"
Ports [1, 1]
Position [1010, 357, 1080, 403]
ShowName off
DialogController "commDDGCreate"
DialogControllerArgs "DataTag1"
SourceBlock "commdigbbndpm3/BPSK\nDemodulator\nBaseband"
SourceType "BPSK Demodulator Baseband"
Ph "0"
DecType "Hard decision"
VarSource "Dialog"
Variance "1"
outDtype "double"
}
Block {
BlockType Reference
Name "BPSK\nModor\nBaseband"
Ports [1, 1]
Position [215, 318, 290, 362]
ShowName off
SourceBlock "commdigbbndpm3/BPSK\nModulator\nBaseband"
SourceType "BPSK Modulator Baseband"
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"
Ph "0"
outDtype "double"
outWordLen "16"
outUDDataType "sfix(16)"
outFracLenMode "Best precision"
outFracLen "15"
}
Block {
BlockType Reference
Name "Bernoulli Binary\nGenerator"
Ports [0, 1]
Position [85, 320, 160, 360]
ShowName off
DialogController "commDDGCreate"
DialogControllerArgs "DataTag2"
SourceBlock "commrandsrc2/Bernoulli Binary\nGenerator"
SourceType "Bernoulli Binary Generator"
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"
P "0.5"
seed "61"
Ts "(1e-6)*63"
frameBased on
sampPerFrame "1"
orient off
outDataType "double"
}
Block {
BlockType Constant
Name "Constant1"
Position [230, 505, 260, 535]
ShowName off
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 SubSystem
Name "EGC"
Ports [3, 1]
Position [890, 222, 965, 298]
BackgroundColor "lightBlue"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "EGC"
Location [2, 82, 1270, 753]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [200, 193, 230, 207]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "In2"
Position [200, 258, 230, 272]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "In3"
Position [200, 323, 230, 337]
Port "3"
IconDisplay "Port number"
}
Block {
BlockType Sum
Name "Add"
Ports [3, 1]
Position [425, 231, 460, 299]
ShowName off
Inputs "+++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [545, 258, 575, 272]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Add"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In3"
SrcPort 1
Points [135, 0; 0, -45]
DstBlock "Add"
DstPort 3
}
Line {
SrcBlock "In2"
SrcPort 1
DstBlock "Add"
DstPort 2
}
Line {
SrcBlock "In1"
SrcPort 1
Points [135, 0; 0, 45]
DstBlock "Add"
DstPort 1
}
}
}
Block {
BlockType Display
Name "EGCdisplay"
Ports [1]
Position [510, 27, 600, 93]
BackgroundColor "lightBlue"
Decimation "1"
Lockdown off
}
Block {
BlockType Reference
Name "Error Rate\nCalculation"
Ports [2, 1]
Position [400, 80, 480, 130]
Orientation "up"
NamePlacement "alternate"
ShowName off
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "0"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Port"
WsName "ErrorVec"
RsMode2 off
stop on
numErr "1000000"
maxBits "1e5"
}
Block {
BlockType Reference
Name "Error Rate\nCalculation1"
Ports [2, 1]
Position [760, 80, 840, 130]
Orientation "up"
NamePlacement "alternate"
ShowName off
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "0"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Port"
WsName "ErrorVec"
RsMode2 off
stop on
numErr "1000000"
maxBits "1e5"
}
Block {
BlockType SubSystem
Name "MRC"
Ports [6, 1]
Position [890, 323, 970, 437]
BackgroundColor "lightBlue"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "MRC"
Location [2, 82, 1270, 753]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [200, 163, 230, 177]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "In2"
Position [200, 243, 230, 257]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "In3"
Position [200, 318, 230, 332]
Port "3"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "In4"
Position [200, 198, 230, 212]
Port "4"
IconDisplay "Port number"
}
Block {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -