📄 cdma2k_lib.mdl
字号:
}
Line {
SrcBlock "Convolutional\nEncoder"
SrcPort 1
DstBlock "Output"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Interleaver"
Ports [1, 1]
Position [465, 80, 565, 140]
TreatAsAtomicUnit off
MaskPromptString "Radio Configuration|Bit Rate|Frame Length|F"
"rame Duration"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskVariables "xRC=@1;xBitRate=@2;xFrameLength=@3;xFrameDu"
"ration=@4;"
MaskInitialization "MSInterleaverInitialization"
MaskDisplay "disp('Interleaver\\n\\n(cdma 2000 MS)')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "mRC|mBitRate|mFrameLength|mFrameDuration"
System {
Name "Interleaver"
Location [-27, 285, 761, 566]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "Input"
Position [25, 43, 55, 57]
}
Block {
BlockType Reference
Name "General Block\nInterleaver"
Ports [1, 1]
Position [350, 23, 430, 77]
SourceBlock "commblkintrlv2/General Block\nInterleav"
"er"
SourceType "General Block Interleaver"
elements "int_table"
}
Block {
BlockType Reference
Name "Puncture"
Ports [1, 1]
Position [225, 28, 305, 72]
SourceBlock "commsequence2/Puncture"
SourceType "Puncture"
punctureVector "xPunctureVector"
}
Block {
BlockType Reference
Name "Repeat"
Ports [1, 1]
Position [100, 27, 195, 73]
SourceBlock "dspsigops/Repeat"
SourceType "Repeat"
N "xRepetitionCount"
ic "0"
mode "Maintain input frame rate"
}
Block {
BlockType Outport
Name "Output"
Position [465, 43, 495, 57]
}
Line {
SrcBlock "Input"
SrcPort 1
DstBlock "Repeat"
DstPort 1
}
Line {
SrcBlock "Repeat"
SrcPort 1
DstBlock "Puncture"
DstPort 1
}
Line {
SrcBlock "Puncture"
SrcPort 1
DstBlock "General Block\nInterleaver"
DstPort 1
}
Line {
SrcBlock "General Block\nInterleaver"
SrcPort 1
DstBlock "Output"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Orthogonal Spreading"
Ports [2, 1]
Position [595, 33, 740, 117]
TreatAsAtomicUnit off
MaskPromptString "Radio Configuration|Bit Rate|Frame Length|F"
"rame Duration|Channel Type"
MaskStyleString "edit,edit,edit,edit,popup(Reverse Fundament"
"al Channel|Reverse Supplementary Channel 1|Reverse Supplementary Channel 2|Re"
"verse Dedicated Control Channel|Reverse Common Control Channel|Reverse Pilot "
"Channel|Enhanced Access Channel)"
MaskTunableValueString "on,on,on,on,on"
MaskCallbackString "||||"
MaskEnableString "on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on"
MaskToolTipString "on,on,on,on,on"
MaskVarAliasString ",,,,"
MaskVariables "xRC=@1;xBitRate=@2;xFrameLength=@3;xFrameDu"
"ration=@4;xChannelType=@5;"
MaskInitialization "MSOrthogonalSpreadingInitialization"
MaskDisplay "port_label('output',1,'Modulation Symbols')"
";\nport_label('input',1,'Relative Gain');\nport_label('input',2,'Frame Data')"
";"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "mRC|mBitRate|mFrameLength|mFrameDuration|Re"
"verse Fundamental Channel"
System {
Name "Orthogonal Spreading"
Location [22, 141, 752, 407]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "Relative Gain"
Position [25, 28, 55, 42]
}
Block {
BlockType Inport
Name "Input"
Position [25, 108, 55, 122]
Port "2"
}
Block {
BlockType Reference
Name "Hadamard\nCode Generator"
Ports [0, 1]
Position [275, 188, 380, 242]
SourceBlock "commseqgen2/Hadamard\nCode Generator"
SourceType "Hadamard Code Generator"
length "xWalshCodeLength"
index "xWalshCodeIndex"
ts "1/1228800"
frameBased "off"
sampPerFrame "1"
}
Block {
BlockType Product
Name "Power Control"
Ports [2, 1]
Position [575, 36, 625, 174]
}
Block {
BlockType Reference
Name "Repeat"
Ports [1, 1]
Position [100, 93, 180, 137]
SourceBlock "dspsigops/Repeat"
SourceType "Repeat"
N "xRepetitionCount"
ic "0"
mode "Maintain input frame rate"
}
Block {
BlockType Product
Name "Spread"
Ports [2, 1]
Position [470, 90, 525, 185]
}
Block {
BlockType Reference
Name "Unbuffer"
Ports [1, 1]
Position [225, 91, 275, 139]
SourceBlock "dspbuff3/Unbuffer"
SourceType "Unbuffer"
ic "0"
}
Block {
BlockType Reference
Name "Unipolar to\nBipolar\nConverter"
Ports [1, 1]
Position [330, 91, 410, 139]
SourceBlock "commutil2/Unipolar to\nBipolar\nConvert"
"er"
SourceType "Unipolar to Bipolar Converter"
M "2"
polarity "Negative"
}
Block {
BlockType Outport
Name "Output"
Position [675, 98, 705, 112]
}
Line {
SrcBlock "Input"
SrcPort 1
DstBlock "Repeat"
DstPort 1
}
Line {
SrcBlock "Repeat"
SrcPort 1
DstBlock "Unbuffer"
DstPort 1
}
Line {
SrcBlock "Unbuffer"
SrcPort 1
DstBlock "Unipolar to\nBipolar\nConverter"
DstPort 1
}
Line {
SrcBlock "Unipolar to\nBipolar\nConverter"
SrcPort 1
DstBlock "Spread"
DstPort 1
}
Line {
SrcBlock "Hadamard\nCode Generator"
SrcPort 1
Points [35, 0; 0, -55]
DstBlock "Spread"
DstPort 2
}
Line {
SrcBlock "Spread"
SrcPort 1
DstBlock "Power Control"
DstPort 2
}
Line {
SrcBlock "Relative Gain"
SrcPort 1
Points [470, 0; 0, 35]
DstBlock "Power Control"
DstPort 1
}
Line {
SrcBlock "Power Control"
SrcPort 1
DstBlock "Output"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "Frame Data"
Position [770, 68, 800, 82]
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "CRC"
DstPort 1
}
Line {
SrcBlock "CRC"
SrcPort 1
DstBlock "Encoder"
DstPort 1
}
Line {
SrcBlock "Encoder"
SrcPort 1
DstBlock "Interleaver"
DstPort 1
}
Line {
SrcBlock "Orthogonal Spreading"
SrcPort 1
DstBlock "Frame Data"
DstPort 1
}
Line {
SrcBlock "Relative Gain"
SrcPort 1
Points [20, 0; 0, 30]
DstBlock "Orthogonal Spreading"
DstPort 1
}
Line {
SrcBlock "Interleaver"
SrcPort 1
Points [10, 0]
DstBlock "Orthogonal Spreading"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Interleaver"
Ports [1, 1]
Position [465, 120, 565, 180]
TreatAsAtomicUnit off
MaskPromptString "Radio Configuration|Bit Rate|Frame Length|Frame"
" Duration"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskVariables "xRC=@1;xBitRate=@2;xFrameLength=@3;xFrameDurati"
"on=@4;"
MaskInitialization "MSInterleaverInitialization"
MaskDisplay "disp('Interleaver\\n\\n(cdma 2000 MS)')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "mRC|mBitRate|mFrameLength|mFrameDuration"
System {
Name "Interleaver"
Location [-101, 233, 687, 514]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "Input"
Position [25, 43, 55, 57]
}
Block {
BlockType Reference
Name "General Block\nInterleaver"
Ports [1, 1]
Position [350, 23, 430, 77]
SourceBlock "commblkintrlv2/General Block\nInterleaver"
SourceType "General Block Interleaver"
elements "int_table"
}
Block {
BlockType Reference
Name "Puncture"
Ports [1, 1]
Position [225, 28, 305, 72]
SourceBlock "commsequence2/Puncture"
SourceType "Puncture"
punctureVector "xPunctureVector"
}
Block {
BlockType Reference
Name "Repeat"
Ports [1, 1]
Position [100, 27, 195, 73]
SourceBlock "dspsigops/Repeat"
SourceType "Repeat"
N "xRepetitionCount"
ic "0"
mode "Maintain input frame rate"
}
Block {
BlockType Outport
Name "Output"
Position [465, 43, 495, 57]
}
Line {
SrcBlock "Input"
SrcPort 1
DstBlock "Repeat"
DstPort 1
}
Line {
SrcBlock "Repeat"
SrcPort 1
DstBlock "Puncture"
DstPort 1
}
Line {
SrcBlock "Puncture"
SrcPort 1
DstBlock "General Block\nInterleaver"
DstPort 1
}
Line {
SrcBlock "General Block\nInterleaver"
SrcPort 1
DstBlock "Output"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Model Initialization"
Ports []
Position [400, 353, 570, 417]
AttributesFormatString "%<chModel>"
TreatAsAtomicUnit off
MaskType "Model Initialization cdma 2000 MS"
MaskPromptString "Radio Configuration|Bit Rate|Frame Length|Frame"
" Duration|Channel Model|EcN0 (in dB):|Maximum Doppler Frequency shift (in Hz)"
":|Multipath Profile - Delay Vector (s):|Multipath Profile - Gain Vector (dB):"
MaskStyleString "edit,edit,edit,edit,popup(No Channel|AWGN Chann"
"el|Multipath Fading Channel),edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on,on,on,on,on"
MaskCallbackString "||||idx = strmatch('EcN0',get_param(gcb,'MaskNa"
"mes'));\nidx2 = strmatch('dopplerFreq',get_param(gcb,'MaskNames'));\nidx3 = s"
"trmatch('delayVector',get_param(gcb,'MaskNames'));\nidx4 = strmatch('gainVect"
"or',get_param(gcb,'MaskNames'));\n\nen = get_param(gcb,'MaskEnables');\nvis ="
" get_param(gcb,'MaskVisibilities');\n\nif(strcmp(get_param(gcb,'chModel'),'No"
" Channel'))\n en{idx} = 'off';\n [vis{[idx2 idx3 idx4]}] = deal"
"('off');\nelseif (strcmp(get_param(gcb,'chModel'),'AWGN Channel'))\n e"
"n{idx} = 'on';\n [vis{[idx2 idx3 idx4]}] = deal('off');\nelse\n"
" en{idx} = 'on';\n [vis{[idx2 idx3 idx4]}] = deal('on');\n\nend"
"\n\nset_param(gcb,'MaskEnables',en,'MaskVisibilities',vis );\nset_param([bdro"
"ot '/Channel Model/Channel1'],'BlockChoice',get_param(gcb,'chModel'));\n\ncle"
"ar idx;\nclear idx2;\nclear idx3;\nclear idx4;\nclear en;\nclear vis;||||"
MaskEnableString "on,on,on,on,on,off,on,on,on"
MaskVisibilityString "on,on,on,on,on,on,off,off,off"
MaskToolTipString "on,on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,,"
MaskVariables "xRC=@1;xBitRate=@2;xFrameLength=@3;xFrameDurati"
"on=@4;chModel=@5;EcN0=@6;dopplerFreq=@7;delayVector=@8;gainVector=@9;"
MaskInitialization "assignin('base','mRC',xRC);\nassignin('base','m"
"FrameDuration',xFrameDuration);\nassignin('base','mBitRate',xBitRate);\nassig"
"nin('base','mFrameLength',xFrameLength);\n\nassignin('base','EcN0',EcN0);\n\n"
"fingerEnables = length(delayVector);\nfingerEnables = [ones(1,fingerEnables) "
"zeros(1,4-fingerEnables)];\nfingerPhasesTicks = [delayVector zeros(1,4-length"
"(delayVector))];\nfingerPhasesTicks = round(fingerPhasesTicks*1.2288e6*4);\n"
"\n%-- Multipath Fading\nassignin('base','dopplerFreq',dopplerFreq);\nassignin"
"('base','delayVector',delayVector);\nassignin('base','fingerEnables',fingerEn"
"ables);\nassignin('base','fingerPhasesTicks',fingerPhasesTicks);\nassignin('b"
"ase','gainVector',gainVecto
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -