?? wcdmalib.mdl
字號:
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "WCDMA Common"
MaskDisplay "disp('WCDMA \\nCommon Blocks');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "WCDMA Common"
Location [244, 244, 739, 589]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType SubSystem
Name "BLER Calculation"
Ports [2, 1]
Position [385, 175, 465, 215]
ShowName off
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "BLER Calculation"
MaskPromptString "Transport Block Set Size:|TTI (in ms):|Numb"
"er of Bits Delay:"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVariables "trBlkSetSize=@1;tti=@2;numBitsDelay=@3;"
MaskInitialization "numTrBlksDelay = numBitsDelay./trBlkSetSize"
";\n[m,i] = min(numTrBlksDelay.* tti);\nminNumTrBlksDelay = numTrBlksDelay(i);"
"\n[m,i] = min(tti);\n"
MaskDisplay "disp('BLER\\nCalculation');\n"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "[244 100]|[20 40]|[488 200]"
MaskVariableAliases ",,"
System {
Name "BLER Calculation"
Location [234, 231, 1163, 670]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [35, 148, 65, 162]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "In2"
Position [15, 263, 45, 277]
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType SubSystem
Name "Combined BLER\nCalculation"
Ports [4, 1, 1]
Position [655, 84, 750, 181]
ShowPortLabels on
TreatAsAtomicUnit on
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskDisplay "disp('Combined\\nBLER\\nCalculation');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Combined BLER\nCalculation"
Location [371, 296, 1196, 555]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "NumErrors1"
Position [95, 103, 125, 117]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "NumErrors2"
Position [135, 133, 165, 147]
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "NumBits1"
Position [125, 178, 155, 192]
Port "3"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "NumBits2"
Position [170, 213, 200, 227]
Port "4"
LatchInput off
Interpolate on
}
Block {
BlockType EnablePort
Name "Enable"
Ports []
Position [300, 35, 320, 55]
StatesWhenEnabling "held"
ShowOutputPort off
}
Block {
BlockType Reference
Name "Matrix\nConcatenation"
Ports [2, 1]
Position [490, 97, 545, 188]
ShowName off
SourceBlock "simulink3/Signals\n& Systems/Matrix"
"\nConcatenation"
SourceType "Matrix Concatenation"
numInports "2"
catMethod "Vertical"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [395, 100, 440, 135]
Inputs "*/"
Multiplication "Element-wise(.*)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [210, 100, 230, 120]
ShowName off
IconShape "round"
Inputs "|++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [210, 175, 230, 195]
ShowName off
IconShape "round"
Inputs "|++"
SaturateOnIntegerOverflow on
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [250, 91, 285, 129]
ShowName off
SampleTime "tti(i)*(1e-3)"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold1"
Position [250, 166, 285, 204]
ShowName off
SampleTime "tti(i)*(1e-3)"
}
Block {
BlockType Outport
Name "Combined BLER"
Position [660, 138, 690, 152]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Matrix\nConcatenation"
DstPort 1
}
Line {
SrcBlock "NumErrors1"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "NumErrors2"
SrcPort 1
Points [50, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "NumBits1"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Matrix\nConcatenation"
SrcPort 1
DstBlock "Combined BLER"
DstPort 1
}
Line {
SrcBlock "NumBits2"
SrcPort 1
Points [15, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Zero-Order\nHold1"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold1"
SrcPort 1
Points [70, 0]
Branch {
Points [85, 0; 0, -20]
DstBlock "Matrix\nConcatenation"
DstPort 2
}
Branch {
Points [0, -60]
DstBlock "Product"
DstPort 2
}
}
}
}
Block {
BlockType Reference
Name "DSP\nConstant1"
Ports [0, 1]
Position [100, 114, 135, 146]
ShowName off
SourceBlock "dspsrcs3/DSP\nConstant"
SourceType "DSP Constant"
Value "0"
InterpretAs1D "off"
SampleMode "Discrete"
Ts "tti(1)*(1e-3)"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "DSP\nConstant2"
Ports [0, 1]
Position [95, 229, 130, 261]
ShowName off
SourceBlock "dspsrcs3/DSP\nConstant"
SourceType "DSP Constant"
Value "0"
InterpretAs1D "off"
SampleMode "Discrete"
Ts "tti(2)*(1e-3)"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "DSP\nConstant3"
Ports [0, 1]
Position [460, 29, 495, 61]
ShowName off
SourceBlock "dspsrcs3/DSP\nConstant"
SourceType "DSP Constant"
Value "1"
InterpretAs1D "off"
SampleMode "Discrete"
Ts "tti(i)*(1e-3)"
FramebasedOutput "off"
}
Block {
BlockType "S-Function"
Name "Error Rate Calculation1"
Ports [2, 1]
Position [195, 116, 280, 169]
ShowName off
FunctionName "scomerrrate2"
Parameters "N, st_delay, cp_mode, subframe, PMode, "
"WsName, RsMode2,stop,numErr,maxBits"
PortCounts "[]"
SFunctionModules "''"
MaskType "Error Rate Calculation"
MaskDescription "Compute the error rate of the received "
"data by comparing it to a delayed version of the transmitted data. The block "
"output is a three-element vector consisting of the error rate, followed by th"
"e number of errors detected and the total number of symbols compared. This ve"
"ctor can be sent to either the workspace or an output port.\n\nThe delays are"
" specified in number of samples, regardless of whether the input is a scalar "
"or a vector. The inputs to the 'Tx' and 'Rx' ports must be sample-based or fr"
"ame-based column vectors. \n\nThe 'Stop simulation' option stops the simulati"
"on upon detecting a target number of errors or a maximum number of symbols, w"
"hichever comes first."
MaskHelp "helpview(commbhelp)"
MaskPromptString "Receive delay:|Computation delay:|Compu"
"tation mode:|Selected samples from frame:|Output data:|Variable name:|Reset p"
"ort|Stop simulation|Target number of errors:|Maximum number of symbols:"
MaskStyleString "edit,edit,popup(Entire frame|Select sam"
"ples from mask|Select samples from port),edit,popup(Workspace|Port),edit,chec"
"kbox,checkbox,edit,edit"
MaskTunableValueString "off,off,off,off,off,off,off,on,on,on"
MaskCallbackString "||commblkerrrate(gcb,'CpMode');||commbl"
"kerrrate(gcb,'OutMode');|||commblkerrrate(gcb,'UpdateEnables');||"
MaskEnableString "on,on,on,off,on,off,on,on,off,off"
MaskVisibilityString "on,on,on,off,on,off,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on,on,on,on"
MaskVariables "N=@1;st_delay=@2;cp_mode=@3;subframe=@4"
";PMode=@5;WsName=&6;RsMode2=@7;stop=@8;numErr=@9;maxBits=@10;"
MaskInitialization "[s] = commblkerrrate(gcb,'init');\nif(P"
"Mode==1)\n if(isempty(WsName))\n error('Output variable name cannot"
" be empty.')\n end\n if(~isletter(WsName(1)))\n error('Output va"
"riable name must be a string.')\n end\nend\n% Check the # of errors, delay"
" to make sure they are not too large\n% Cannot be greater than 2^31-1 because"
" that is the largest value of int32\nif(numErr>(2^31-1)&(numErr ~= inf))\n "
"numErr = inf;\n warning('Value for maximum number of errors in Error Rate C"
"alculation block is too large - setting to Inf.')\nend\nif(maxBits>(2^31-1)&("
"maxBits ~= inf))\n maxBits = inf;\n warning(' Value for maximum number of s"
"ymbols in Error Rate Calculation block is too large - setting to Inf.')\nend"
"\n"
MaskDisplay "disp('Error Rate\\nCalculation');\nport"
"_label('input',s.i1,s.i1s);\nport_label('input',s.i2,s.i2s);\nport_label('inp"
"ut',s.i3,s.i3s);\nport_label('input',s.i4,s.i4s);"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0|numTrBlksDelay(1)|Entire frame|[]|Por"
"t|ErrorVec|off|off|100|1e6"
MaskVariableAliases ",,,,,,,,,"
}
Block {
BlockType "S-Function"
Name "Error Rate Calculation2"
Ports [2, 1]
Position [190, 231, 275, 284]
ShowName off
FunctionName "scomerrrate2"
Parameters "N, st_delay, cp_mode, subframe, PMode, "
"WsName, RsMode2,stop,numErr,maxBits"
PortCounts "[]"
SFunctionModules "''"
MaskType "Error Rate Calculation"
MaskDescription "Compute the error rate of the received "
"data by comparing it to a delayed version of the transmitted data. The block "
"output is a three-element vector consisting of the error rate, followed by th"
"e number of errors detected and the total number of symbols compared. This ve"
"ctor can be sent to either the workspace or an output port.\n\nThe delays are"
" specified in number of samples, regardless of whether the input is a scalar "
"or a vector. The inputs to the 'Tx' and 'Rx' ports must be sample-based or fr"
"ame-based column vectors. \n\nThe 'Stop simulation' option stops the simulati"
"on upon detecting a target number of errors or a maximum number of symbols, w"
"hichever comes first."
MaskHelp "helpview(commbhelp)"
MaskPromptString "Receive delay:|Computation delay:|Compu"
"tation mode:|Selected samples from frame:|Output data:|Variable name:|Reset p"
"ort|Stop simulation|Target number of errors:|Maximum number of symbols:"
MaskStyleString "edit,edit,popup(Entire frame|Select sam"
"ples from mask|Select samples from port),edit,popup(Workspace|Port),edit,chec"
"kbox,checkbox,edit,edit"
MaskTunableValueString "off,off,off,off,off,off,off,on,on,on"
MaskCallbackString "||commblkerrrate(gcb,'CpMode');||commbl"
"kerrrate(gcb,'OutMode');|||commblkerrrate(gcb,'UpdateEnables');||"
MaskEnableString "on,on,on,off,on,off,on,on,off,off"
MaskVisibilityString "on,on,on,off,on,off,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on,on,on,on"
MaskVariables "N=@1;st_delay=@2;cp_mode=@3;subframe=@4"
";PMode=@5;WsName=&6;RsMode2=@7;stop=@8;numErr=@9;maxBits=@10;"
MaskInitialization "[s] = commblkerrrate(gcb,'init');\nif(P"
"Mode==1)\n if(isempty(WsName))\n error('Output variable name cannot"
" be empty.')\n end\n if(~isletter(WsName(1)))\n error('Output va"
"riable name must be a string.')\n end\nend\n% Check the # of errors, delay"
" to make sure they are not too large\n% Cannot be greater than 2^31-1 because"
" that is the largest value of int32\nif(numErr>(2^31-1)&(numErr ~= inf))\n "
"numErr = inf;\n warning('Value for maximum number of errors in Error Rate C"
"alculation block is too large - setting to Inf.')\nend\nif(maxBits>(2^31-1)&("
"maxBits ~= inf))\n maxBits = inf;\n warning(' Value for maximum number of s"
"ymbols in Error Rate Calculation block is too large - setting to Inf.')\nend"
"\n"
MaskDisplay "disp('Error Rate\\nCalculation');\nport"
"_label('input',s.i1,s.i1s);\nport_label('input',s.i2,s.i2s);\nport_label('inp"
"ut',s.i3,s.i3s);\nport_label('input',s.i4,s.i4s);"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0|numTrBlksDelay(2)|Entire frame|[]|Por"
"t|ErrorVec|off|off|100|1e6"
MaskVariableAliases ",,,,,,,,,"
}
Block {
BlockType Reference
Name "Integer Delay"
Ports [1, 1]
Position [530, 27, 575, 63]
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -