📄 cdma2k_lib.mdl
字号:
DstPort 2
}
Line {
Name "Chips\nCode"
Labels [1, 1]
SrcBlock "cPNseq"
SrcPort 1
DstBlock "Math\nFunction"
DstPort 1
}
Line {
Name "Ticks\nSignal"
Labels [1, 1]
SrcBlock "cIn"
SrcPort 1
DstBlock "Downsample"
DstPort 1
}
Line {
Name "Correlation"
Labels [0, 0]
SrcBlock "Product2"
SrcPort 1
Points [65, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, 55]
DstBlock "Width1"
DstPort 1
}
}
Line {
Name "Chip\nSignal"
Labels [1, 1]
SrcBlock "Downsample"
SrcPort 1
DstBlock "Product2"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Product4"
DstPort 1
}
Line {
SrcBlock "Width1"
SrcPort 1
Points [20, 0; 0, -40]
DstBlock "Product4"
DstPort 2
}
Line {
SrcBlock "Product4"
SrcPort 1
DstBlock "cOutBits"
DstPort 1
}
Annotation {
Name "Chip Correlator"
Position [18, 22]
HorizontalAlignment "left"
DropShadow on
FontName "Arial"
FontSize 12
FontWeight "bold"
}
}
}
Block {
BlockType SubSystem
Name "Long Code\nDeScrambling"
Ports [3, 1]
Position [45, 260, 140, 310]
TreatAsAtomicUnit off
System {
Name "Long Code\nDeScrambling"
Location [51, 137, 938, 458]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "InData"
Position [420, 148, 450, 162]
}
Block {
BlockType Inport
Name "Long Code"
Position [25, 233, 55, 247]
Port "2"
}
Block {
BlockType Inport
Name "En"
Position [25, 268, 55, 282]
Port "3"
}
Block {
BlockType Reference
Name "DSP\nConstant1"
Ports [0, 1]
Position [585, 90, 675, 110]
NamePlacement "alternate"
ShowName off
AttributesFormatString "\\n\\n\\n\\n"
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "longCodeScrOff"
SampleMode "Discrete"
discreteOutput "Sample-based"
continuousOutput "Sample-based"
sampTime "symbolTime*scrBitRepetition"
framePeriod "symbolTime*scrBitRepetition"
additionalParams "off"
dataType "Inherit from 'Constant value'"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "off"
Ts "symbolTime*scrBitRepetition"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "Delay"
Ports [2, 1]
Position [195, 235, 230, 290]
ShowName off
AttributesFormatString "\\n"
SourceBlock "dspsigops/Integer Delay"
SourceType "Integer Delay"
delay "1"
ic "0"
reset_popup "Rising edge"
}
Block {
BlockType Reference
Name "Matrix\nConcatenation"
Ports [2, 1]
Position [260, 219, 315, 261]
ShowName off
SourceBlock "simulink/Math\nOperations/Matrix\nConca"
"tenation"
SourceType "Matrix Concatenation"
numInports "2"
catMethod "Vertical"
}
Block {
BlockType Reference
Name "Multiport\nSelector"
Ports [1, 2]
Position [90, 218, 170, 262]
ShowName off
AttributesFormatString "\\n"
SourceBlock "dspindex/Multiport\nSelector"
SourceType "Multiport Selector"
rowsOrCols "Rows"
idxCellArray "{ 1,64*scrBitRepetition}"
idxErrMode "Clip Index"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [625, 146, 670, 179]
ShowName off
InputSameDT off
}
Block {
BlockType Reference
Name "Scrambling Bit\nRepetition"
Ports [1, 1]
Position [355, 222, 465, 258]
SourceBlock "dspsigops/Repeat"
SourceType "Repeat"
N "scrBitRepetition"
ic "0"
mode "Maintain input frame rate"
}
Block {
BlockType Switch
Name "Switch1"
Position [730, 54, 760, 146]
ShowName off
Criteria "u2 > Threshold"
Threshold "0.5"
InputSameDT off
}
Block {
BlockType Reference
Name "Unipolar to\nBipolar\nConverter1"
Ports [1, 1]
Position [490, 216, 570, 264]
ShowName off
SourceBlock "commutil2/Unipolar to\nBipolar\nConvert"
"er"
SourceType "Unipolar to Bipolar Converter"
M "2"
polarity "Negative"
}
Block {
BlockType Outport
Name "OutData"
Position [830, 93, 860, 107]
}
Line {
SrcBlock "Long Code"
SrcPort 1
DstBlock "Multiport\nSelector"
DstPort 1
}
Line {
SrcBlock "Multiport\nSelector"
SrcPort 1
DstBlock "Matrix\nConcatenation"
DstPort 1
}
Line {
SrcBlock "Multiport\nSelector"
SrcPort 2
DstBlock "Delay"
DstPort 1
}
Line {
SrcBlock "Delay"
SrcPort 1
Points [0, -15]
DstBlock "Matrix\nConcatenation"
DstPort 2
}
Line {
SrcBlock "Matrix\nConcatenation"
SrcPort 1
DstBlock "Scrambling Bit\nRepetition"
DstPort 1
}
Line {
SrcBlock "Scrambling Bit\nRepetition"
SrcPort 1
DstBlock "Unipolar to\nBipolar\nConverter1"
DstPort 1
}
Line {
SrcBlock "Unipolar to\nBipolar\nConverter1"
SrcPort 1
Points [35, 0]
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "InData"
SrcPort 1
Points [95, 0]
Branch {
DstBlock "Product"
DstPort 1
}
Branch {
Points [0, -85]
DstBlock "Switch1"
DstPort 1
}
}
Line {
SrcBlock "DSP\nConstant1"
SrcPort 1
DstBlock "Switch1"
DstPort 2
}
Line {
SrcBlock "Product"
SrcPort 1
Points [5, 0; 0, -35]
DstBlock "Switch1"
DstPort 3
}
Line {
SrcBlock "Switch1"
SrcPort 1
DstBlock "OutData"
DstPort 1
}
Line {
SrcBlock "En"
SrcPort 1
DstBlock "Delay"
DstPort 2
}
Annotation {
Name "I and Q Scrambling Bit Extractor"
Position [216, 205]
}
Annotation {
Name "Long Code DeScrambling"
Position [28, 32]
HorizontalAlignment "left"
DropShadow on
FontName "Arial"
FontSize 12
FontWeight "bold"
}
Annotation {
Name "Performs Data Descrambling for Forward "
"Traffic Channel as described in TIA/EIA/IS-2000.2.A 3.1.3.1.9"
Position [191, 33]
HorizontalAlignment "left"
FontName "Arial"
}
}
}
Block {
BlockType SubSystem
Name "Long Code DeScrambling\nPower Control Extra"
"cting"
Ports [2, 2]
Position [550, 255, 640, 350]
NamePlacement "alternate"
TreatAsAtomicUnit off
MaskType "Long Code DeScrambling"
MaskDescription "Performs Long Code DeScrambling and Power C"
"ontrol Extraction for Forward Traffic Channel."
MaskHelp "Performs Long Code DeScrambling and Power C"
"ontrol Extraction for Forward Traffic Channel."
MaskPromptString "Radio Configuration:|Number of Samples per "
"Frame:|Length of frame in multiples of 20 ms (n):|Long Code Scrambling|Gated "
"Trasmission Rate:|Transmit Diversity Mode:|Public Long Code Mask:"
MaskStyleString "popup(Radio Configuration 3),edit,popup(1|2"
"|4),popup(On|Off),popup(Non Power Control|1|1/2|1/4),popup(Non-TD),edit"
MaskTunableValueString "on,on,on,on,on,on,on"
MaskCallbackString "||||||"
MaskEnableString "off,off,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,"
MaskVariables "radConfig=@1;numSamp=@2;nFrameMask=@3;longC"
"ScrMask=@4;gateRateMask=@5;TxDivMode=@6;plcMask=@7;"
MaskInitialization "%-- Initialize parameters for Long Code Scr"
"ambling, Power Control\n%-- and Signal Point Mapping\nswitch(get_param(gcb,'r"
"adConfig'))\n case 'Radio Configuration 3'\n Eb_PCCh = "
"1;\n numPuncturedSymbols = 4;\n % other cases\nend"
" \n\n%-- Transmit Diversity Mode\nswitch(TxDivMode) \n case 1, % "
"Non-Transmit Diversity\n decPattern = [47 46 45 44]+1; \n scrBi"
"tRepetition = 1; \n case {2,3} % Transmit Diversity: OTD, STS\n "
"decPattern = [47 46 45]+1; \n scrBitRepetition = 2;\nend \n\n%-"
"- Transmission Gating Rate\nswitch(gateRateMask) \n case 1 % No"
" Power Control\n powerControlOff = 0;\n gateRat"
"e = 1;\n PCGroupInit = 0; \n case 2\n"
" powerControlOff = 1;\n gateRate = 1;\n PCGroupI"
"nit = 0;\n case 3\n powerControlOff = 1;\n gateRate "
"= 1/2;\n PCGroupInit = 0;\n case 4\n powerControlOff"
" = 1;\n gateRate = 1/4;\n PCGroupInit = 1;\nend\n\n%-- Long Cod"
"e Scrambling\nif(longCScrMask == 1)\n longCodeScrOff = 0; % On\nelse\n"
" longCodeScrOff = 1; % Off\nend\n\nnumSymbPCGroup = numSamp/((str2num("
"get_param(gcb,'nFrameMask')))*16);\nsymbolTime = 64/1.2288e6;\n"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Radio Configuration 3|768|1|Off|1/4|Non-TD|"
"[1 1 0 0 0 plcm_37]"
System {
Name "Long Code DeScrambling\nPower Control Ext"
"racting"
Location [7, 104, 1012, 500]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "EnSignal"
Position [20, 283, 50, 297]
ForegroundColor "red"
}
Block {
BlockType Inport
Name "InData"
Position [200, 73, 230, 87]
Port "2"
}
Block {
BlockType Reference
Name "Buffer"
Ports [1, 1]
Position [900, 162, 940, 198]
NamePlacement "alternate"
ShowName off
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "numSamp"
V "0"
ic "0"
}
Block {
BlockType Reference
Name "DSP\nConstant1"
Ports [0, 1]
Position [570, 285, 650, 305]
ShowName off
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "numSamp"
SampleMode "Discrete"
discreteOutput "Sample-based"
continuousOutput "Sample-based"
sampTime "20e-3/16"
framePeriod "20e-3/16"
additionalParams "off"
dataType "Inherit from 'Constant value'"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "off"
Ts "20e-3/16"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "DSP\nConstant10"
Ports [0, 1]
Position [15, 210, 55, 230]
ShowName off
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "1"
SampleMode "Discrete"
discreteOutput "Sample-based"
continuousOutput "Sample-based"
sampTime "64/1.2288e6"
framePeriod "64/1.2288e6"
additionalParams "off"
dataType "Inherit from 'Constant value'"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "off"
Ts "64/1.2288e6"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "DSP\nConstant9"
Ports [0, 1]
Position [400, 310, 480, 330]
ShowName off
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "numSamp/16"
SampleMode "Discrete"
discreteOutput "Sample-based"
continuousOutput "Sample-based"
sampTime "64/1.2288e6"
framePeriod "64/1.2288e6"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -