www.pudn.com > wcdma_simulink.rar > koe_interleaver_right_size.mdl
Model {
Name "koe_interleaver_right_size"
Version 3.00
SimParamPage "Solver"
SampleTimeColors off
InvariantConstants off
WideVectorLines off
ShowLineWidths on
ShowPortDataTypes off
StartTime "0.0"
StopTime "10.0"
SolverMode "Auto"
Solver "ode45"
RelTol "1e-3"
AbsTol "auto"
Refine "1"
MaxStep "auto"
InitialStep "auto"
FixedStep "auto"
MaxOrder 5
OutputOption "RefineOutputTimes"
OutputTimes "[]"
LoadExternalInput off
ExternalInput "[t, u]"
SaveTime on
TimeSaveName "tout"
SaveState off
StateSaveName "xout"
SaveOutput on
OutputSaveName "yout"
LoadInitialState off
InitialState "xInitial"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Matrix"
LimitMaxRows off
MaxRows "1000"
Decimation "1"
AlgebraicLoopMsg "warning"
MinStepSizeMsg "warning"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
InheritedTsInSrcMsg "warning"
IntegerOverflowMsg "warning"
UnnecessaryDatatypeConvMsg "none"
Int32ToFloatConvMsg "warning"
SignalLabelMismatchMsg "none"
ConsistencyChecking "off"
ZeroCross on
SimulationMode "normal"
BlockDataTips on
BlockParametersDataTip on
BlockAttributesDataTip off
BlockPortWidthsDataTip off
BlockDescriptionStringDataTip off
BlockMaskParametersDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
OptimizeBlockIOStorage on
BufferReuse on
BooleanDataType off
RTWSystemTargetFile "grt.tlc"
RTWInlineParameters off
RTWRetainRTWFile off
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "oneshot"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off
ExtModeArmWhenConnect off
Created "Tue Jun 22 09:00:43 1999"
Creator "maarit"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%"
LastModifiedBy "maarit"
ModifiedDateFormat "%"
LastModifiedDate "Tue Jun 22 09:15:57 1999"
ModelVersionFormat "1.%"
ConfigurationManager "none"
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "koe_interleaver_right_size"
Location [70, 200, 570, 460]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "dl_empty1"
Ports [0, 0, 0, 0, 0]
Position [133, 80, 332, 241]
Orientation "left"
ShowPortLabels on
MaskPromptString "TX channel Type|Channel coding |Coding ratio "
" |Spreading code length|Inter frame interleaver |Number of frames for int"
"er frame interleaver|Number of columns for inter frame interleaver |Intra fra"
"me interleaver (on or off)"
MaskStyleString "popup(Dedicated Transport channel|Primary commo"
"n control|Secondary common control (FACH or PCH)),popup(Convolutional coding|"
"Turbo),popup(2|3),popup(4|8|16|32|64|128|256),popup(block interleaver|multist"
"age interleaver),edit,edit,checkbox"
MaskTunableValueString "on,on,on,on,on,on,on,on"
MaskCallbackString "|||||||"
MaskEnableString "on,on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on,on,on"
MaskVariables "tx_ch=@1;cType=@2;Kindex=@3;nC=@4;Inter_int_mod"
"e=@5;nFrames=@6;cols=@7;Intra_int_flag=@8;"
MaskInitialization "nCode=2^(nC+1);\n % if you want to specify"
" which code is used define ncode=[nCode index]\n[sizes,crc,chCode,C,control]="
"dl_start(nCode,cType,Kindex,nFrames,tx_ch);\ninput_block_size=sizes(1);;bits_"
"in_frame=sizes(2);\nnSlot=sizes(5); chips_in_slot=sizes(6);nCRC=crc(1);crc_po"
"ly=crc(2);\ncType=chCode(1);K=chCode(2); nTail=chCode(3);ch_poly=[chCode(4:6)"
"];\nnPilot=control(1);TPC=control(2);TFI=control(3);"
MaskDisplay "disp('EMPTY SUBSYSTEM MASK\\n\\nDOWNLINK\\n\\nT"
"ransportChannel\\n\\n\\n\\n\\n1 - Decicated transport \nchannel\\n2 - Primary"
" common control channel\\n3 - Secondary common control channel')\ndisp(tx_ch)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Dedicated Transport channel|Convolutional codin"
"g|2|256|block interleaver|1|1|off"
System {
Name "dl_empty1"
Location [435, 33, 1548, 868]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Reference
Name "Buffer"
Ports [2, 2, 0, 0, 0]
Position [455, 152, 545, 223]
SourceBlock "utra_lib/Modulation blocks/Buffer"
SourceType ""
nIn "bits_in_frame/nSlot"
nOut "bits_in_frame"
nSlot "nSlot"
}
Block {
BlockType Constant
Name "Constant12"
Position [420, 352, 450, 388]
ShowName off
Value "1"
}
Block {
BlockType Reference
Name "Delayed ber calculation"
Ports [2, 1, 0, 0, 0]
Position [460, 585, 660, 685]
Orientation "down"
NamePlacement "alternate"
SourceBlock "utra_lib/Test functions/Delayed ber calcula"
"tion"
SourceType ""
N "nFrames*bits_in_frame"
nFrames "nFrames"
}
Block {
BlockType Reference
Name "Direct ber calculation"
Ports [2, 1, 0, 0, 0]
Position [172, 565, 358, 665]
Orientation "down"
NamePlacement "alternate"
SourceBlock "utra_lib/Test functions/Direct ber calculat"
"ion"
SourceType ""
N "nFrames*bits_in_frame"
nFrames "nFrames"
}
Block {
BlockType Display
Name "Display4"
Ports [1, 0, 0, 0, 0]
Position [855, 97, 955, 793]
Format "short"
Decimation "1"
Floating off
SampleTime "-1"
}
Block {
BlockType Display
Name "Display5"
Ports [1, 0, 0, 0, 0]
Position [755, 107, 855, 803]
Format "short"
Decimation "1"
Floating off
SampleTime "-1"
}
Block {
BlockType Display
Name "Display6"
Ports [1, 0, 0, 0, 0]
Position [605, 706, 710, 754]
Format "short"
Decimation "1"
Floating off
SampleTime "-1"
}
Block {
BlockType Display
Name "Display7"
Ports [1, 0, 0, 0, 0]
Position [290, 686, 395, 734]
Format "short"
Decimation "1"
Floating off
SampleTime "-1"
}
Block {
BlockType Width
Name "Width"
Position [395, 210, 425, 240]
}
Block {
BlockType Reference
Name "data source 01 ..10"
Ports [0, 1, 0, 0, 0]
Position [45, 160, 135, 220]
SourceBlock "utra_lib/Source blocks/data source 01 ..10"
SourceType "koe"
nFrames "nFrames"
N "nFrames*bits_in_frame"
}
Block {
BlockType SubSystem
Name "dl_RX_demodulation"
Ports [4, 2, 0, 0, 0]
Position [40, 650, 220, 810]
Orientation "left"
NamePlacement "alternate"
ShowPortLabels on
MaskPromptString "Control bits|sizes vector|code|Inter frame "
"interleaver mode|Number of columns for interleaver and rows for deinterleaver"
"|Intra frame interleaver (on of off)"
MaskStyleString "edit,edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on,on"
MaskCallbackString "|||||"
MaskEnableString "on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on"
MaskVariables "control=@1;sizes=@2;C=@3;Inter_int_mode=@4;"
"cols=@5;Intra_int_flag=@6;"
MaskInitialization "bits_in_frame=sizes(2);nFrames=sizes(3);nSl"
"ot=sizes(5);chips_in_slot=sizes(6);\nnPilot=control(1);TPC=control(2);TFI=con"
"trol(3);\nnCode=length(C);"
MaskDisplay "disp('RAKE RECEIVER\\nDEMODULATION\\nREMOVI"
"NG CONTROL BITS\\nINTERLEAVING\\nDownlink')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "control|sizes|C|Inter_int_mode|cols|Intra_i"
"nt_flag"
System {
Name "dl_RX_demodulation"
Location [100, 641, 892, 921]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Inport
Name "I"
Position [705, 95, 735, 105]
Orientation "left"
NamePlacement "alternate"
Port "1"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType Inport
Name "I - length"
Position [705, 130, 735, 140]
Orientation "left"
NamePlacement "alternate"
Port "2"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType Inport
Name "Q"
Position [705, 165, 735, 175]
Orientation "left"
NamePlacement "alternate"
Port "3"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType Inport
Name "Q - length"
Position [705, 200, 735, 210]
Orientation "left"
NamePlacement "alternate"
Port "4"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType "S-Function"
Name "demodulation"
Ports [4, 2, 0, 0, 0]
Position [480, 78, 645, 227]
Orientation "left"
ForegroundColor "blue"
NamePlacement "alternate"
FontName "helvetica"
FunctionName "s_dl_demod_buffer"
Parameters "nBuff_in,nBuff_out,nControl,nSlot"
PortCounts "[]"
SFunctionModules "''"
MaskDescription "Input sample time is one slot. \nOutput"
" sample time is one frame.\n"
MaskPromptString "Input size|Output size|Number of Slots "
"in a frame|Number of control chips to be removed"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskVariables "nBuff_in=@1;nBuff_out=@2;nSlot=@3;nCont"
"rol=@4;"
MaskInitialization "%nBuff=bits_in_frame/nSlot+nControl;"
MaskDisplay "disp('DISCRET\\nDEMODULATION \\n\\nREMO"
"VING OF\\nCONTROL BITS\\n\\nBUFFERING') \nport_label('input',1,'I');\nport_la"
"bel('input',3,'Q');\nport_label('output',2,'flag');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "bits_in_frame/nSlot + TPC+TFI|bits_in_f"
"rame|nSlot|TPC+TFI"
}
Block {
BlockType "S-Function"
Name "inter_deinterleaving"
Ports [2, 2, 0, 0, 0]
Position [95, 75, 235, 230]
Orientation "left"
ForegroundColor "blue"
NamePlacement "alternate"
FunctionName "s_deinterleaver"
Parameters "bits_in_frame,cols,nFrames,Int_mode"
PortCounts "[]"
SFunctionModules "''"
MaskPromptString "Inter frame interleaver mode|Bits in fr"
"ame|Number of frames |Number of columns (for Block interleaver)"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskVariables "Int_mode=@1;bits_in_frame=@2;nFrames=@3"
";cols=@4;"
MaskDisplay "disp('INTER FRAME\\nDEINTERLEAVER\\n\\n"
"\\n1 - Block interleaver\\n2 - Multistage interleaver');\ndisp(Int_mode)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Inter_int_mode|bits_in_frame|nFrames|co"
"ls"
}
Block {
BlockType "S-Function"
Name "intra_deinterleaving"
Ports [2, 2, 0, 0, 0]
Position [290, 75, 445, 230]
Orientation "left"
ForegroundColor "blue"
NamePlacement "alternate"
FunctionName "s_intra_deinterleaver"
Parameters "bits_in_frame,Int_mode,nFrames"
PortCounts "[]"
SFunctionModules "''"
MaskPromptString "Intra frame interleaver mode|Bits in fr"
"ame|Number of frames "
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskVariables "Int_mode=@1;bits_in_frame=@2;nFrames=@3"
";"
MaskDisplay "disp('INTRA FRAME\\nDEINTERLEAVER\\n\\n"
"\\n1 - off \\n2 - onr');\ndisp(Int_mode)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Intra_int_flag|bits_in_frame|nFrames"
}
Block {
BlockType Outport
Name "data bits"
Position [15, 110, 45, 120]
Orientation "left"
NamePlacement "alternate"
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "flag"
Position [15, 185, 45, 195]
Orientation "left"
NamePlacement "alternate"
Port "2"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "inter_deinterleaving"
SrcPort 2
DstBlock "flag"
DstPort 1
}
Line {
SrcBlock "inter_deinterleaving"
SrcPort 1
DstBlock "data bits"
DstPort 1
}
Line {
SrcBlock "intra_deinterleaving"
SrcPort 1
DstBlock "inter_deinterleaving"
DstPort 1
}
Line {
SrcBlock "intra_deinterleaving"
SrcPort 2
DstBlock "inter_deinterleaving"
DstPort 2
}
Line {
SrcBlock "I"
SrcPort 1
DstBlock "demodulation"
DstPort 1
}
Line {
SrcBlock "I - length"
SrcPort 1
DstBlock "demodulation"
DstPort 2
}
Line {
SrcBlock "Q"
SrcPort 1
DstBlock "demodulation"
DstPort 3
}
Line {
SrcBlock "Q - length"
SrcPort 1
DstBlock "demodulation"
DstPort 4
}
Line {
SrcBlock "demodulation"
SrcPort 1
DstBlock "intra_deinterleaving"
DstPort 1
}
Line {
SrcBlock "demodulation"
SrcPort 2
DstBlock "intra_deinterleaving"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "dl_TX_modulation"
Ports [1, 2, 0, 0, 0]
Position [195, 15, 385, 135]
ShowPortLabels on
MaskPromptString "Control bits|size vector|code|Inter frame i"
"nterleaver mode|Number of columns for interleaver and rows for deinterleaver|"
"Intra frame interleaver (on of off)"
MaskStyleString "edit,edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on,on"
MaskCallbackString "|||||"
MaskEnableString "on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on"
MaskVariables "control=@1;sizes=@2;C=@3;Inter_int_mode=@4;"
"cols=@5;Intra_int_flag=@6;"
MaskInitialization "bits_in_frame=sizes(2);nFrames=sizes(3);nSl"
"ot=sizes(5);\nnPilot=control(1);TPC=control(2);TFI=control(3);"
MaskDisplay "disp('INTERLEAVING\\nADDING CONTROL BITS\\n"
"DICRETE MODULATION\\nSPREADING\\nDownlink')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "control|sizes|C|Inter_int_mode|cols|Intra_i"
"nt_flag"
System {
Name "dl_TX_modulation"
Location [395, 547, 1231, 901]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Inport
Name "bits"
Position [25, 193, 55, 207]
Port "1"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType SubSystem
Name " add control"
Ports [0, 1, 0, 0, 0]
Position [280, 22, 395, 98]
FontName "helvetica"
FontSize 12
ShowPortLabels on
MaskPromptString "Number of Pilot bits|Number of Power Co"
"ntrol bits|Number of TFI bits"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskVariables "nPilot=@1;nPower=@2;nTFI=@3;"
MaskInitialization "nBits=nPilot+nPower+nTFI;"
MaskDisplay "disp('Add control bits:\\nPilot\\nPower"
" Control\\nTFI');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "nPilot|TPC|TFI"
System {
Name " add control"
Location [530, 245, 896, 452]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Constant
Name "control bits"
Position [50, 55, 140, 85]
Value "0*(1:nBits)"
}
Block {
BlockType Outport
Name "Out1"
Position [190, 63, 220, 77]
ShowName off
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "control bits"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Mux
Name "control_mux"
Ports [2, 1, 0, 0, 0]
Position [495, 103, 500, 232]
ShowName off
FontName "helvetica"
FontSize 12
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType "S-Function"
Name "inter_interleaving"
Ports [1, 1, 0, 0, 0]
Position [90, 150, 235, 250]
ForegroundColor "blue"
FunctionName "s_interleaver"
Parameters "bits_in_frame,cols,nFrames,Int_mode"
PortCounts "[]"
SFunctionModules "''"
MaskDescription " INTRA FRAME INTERLEAVER\n\nThi"
"s block performs the intra frame interleaver if the the Intra_int_flag is set"
" on in the upper level in the block parameter box of the subsystem. \n\nBlock"
" interleaving is called with s-function s_interleaving. The parameters for th"
"is function are inherited from subsystem parameter box and it's initializatio"
"n. see dl_start.m"
MaskPromptString "Inter frame interleaver mode|Bits in fr"
"ame|Number of frames |Number of columns (for Block interleaver)"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskVariables "Int_mode=@1;bits_in_frame=@2;nFrames=@3"
";cols=@4;"
MaskInitialization "N_inter_int = bits_in_frame; %input blo"
"ck size for interleaver"
MaskDisplay "disp('INTER FRAME\\nINTERLEAVER\\n\\n\\"
"n1 - Block interleaver\\n2 - Multistage interleaver');\ndisp(Int_mode)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Inter_int_mode|bits_in_frame|nFrames|co"
"ls"
}
Block {
BlockType "S-Function"
Name "intra_interleaving"
Ports [1, 1, 0, 0, 0]
Position [280, 138, 430, 262]
ForegroundColor "blue"
FunctionName "s_intra_interleaver"
Parameters "bits_in_frame,Int_mode,nFrames,nSlots"
PortCounts "[]"
SFunctionModules "''"
MaskDescription " INTRA FRAME INTERLEAVER\n\nThi"
"s block performs the intra frame interleaver if the the Intra_int_flag is set"
" on in the upper level in the block parameter box of the subsystem. \n\nBlock"
" interleaving is called with s-function s_interleaving. The parameters for th"
"is function are inherited from subsystem parameter box and it's initializatio"
"n. see dl_start.m"
MaskPromptString "Intra frame interleaver mode|Bits in fr"
"ame|Number of frames |Number of Slots in a frame"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskVariables "Int_mode=@1;bits_in_frame=@2;nFrames=@3"
";nSlots=@4;"
MaskDisplay "disp('INTRA FRAME\\nINTERLEAVER\\n\\n\\"
"n1 - off \\n2 - onr');\ndisp(Int_mode)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Intra_int_flag|bits_in_frame|nFrames|nS"
"lot"
}
Block {
BlockType "S-Function"
Name "modulation"
Ports [1, 2, 0, 0, 0]
Position [575, 138, 670, 202]
ForegroundColor "blue"
FunctionName "s_dl_discmod"
Parameters "Ndisc,C,length(C),nSlot"
PortCounts "[]"
SFunctionModules "''"
MaskDescription " DISCRETE MODULATION\n\nThe blo"
"ck performs discrete modulation to I and Q and spreading for downlink channel"
"s.\n\nThe block initialization is done in file utra.m to make sure that all t"
"he blocks get same block size (N), spreading code etc. This block calls the s"
"-function s_dl_discmod with arguments:\n\n1) nInputs -- the length of input v"
"ector \n = N * K (coding ratio) \n\n2) C -- the spreading c"
"ode"
MaskPromptString "sizes|code|Number of slots in frame"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskVariables "Ndisc=@1;C=@2;nSlot=@3;"
MaskDisplay "disp('DISCRETE\\n\\nMODULATION')\nport_"
"label('output',1,'I');\nport_label('output',2,'Q');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "bits_in_frame/nSlot+sum(control)|C|nSlo"
"t"
}
Block {
BlockType Outport
Name "I"
Position [730, 148, 760, 162]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "Q"
Position [735, 178, 765, 192]
Port "2"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "modulation"
SrcPort 2
DstBlock "Q"
DstPort 1
}
Line {
SrcBlock "modulation"
SrcPort 1
DstBlock "I"
DstPort 1
}
Line {
SrcBlock "control_mux"
SrcPort 1
DstBlock "modulation"
DstPort 1
}
Line {
SrcBlock "inter_interleaving"
SrcPort 1
DstBlock "intra_interleaving"
DstPort 1
}
Line {
SrcBlock "intra_interleaving"
SrcPort 1
DstBlock "control_mux"
DstPort 2
}
Line {
SrcBlock " add control"
SrcPort 1
Points [80, 0]
DstBlock "control_mux"
DstPort 1
}
Line {
SrcBlock "bits"
SrcPort 1
DstBlock "inter_interleaving"
DstPort 1
}
}
}
Block {
BlockType "S-Function"
Name "inter_deinterleaving"
Ports [2, 2, 0, 0, 0]
Position [490, 304, 635, 391]
ForegroundColor "blue"
FunctionName "s_deinterleaver"
Parameters "bits_in_frame,cols,nFrames,Int_mode"
PortCounts "[]"
SFunctionModules "''"
MaskPromptString "Inter frame interleaver mode|Bits in frame|"
"Number of frames |Number of columns (for Block interleaver)"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskVariables "Int_mode=@1;bits_in_frame=@2;nFrames=@3;col"
"s=@4;"
MaskDisplay "disp('INTER FRAME\\nDEINTERLEAVER\\n\\n\\n1"
" - Block interleaver\\n2 - Multistage interleaver');\ndisp(Int_mode)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Inter_int_mode|bits_in_frame|nFrames|cols"
}
Block {
BlockType "S-Function"
Name "inter_interleaving"
Ports [1, 1, 0, 0, 0]
Position [195, 310, 340, 410]
ForegroundColor "blue"
FunctionName "s_interleaver"
Parameters "bits_in_frame,cols,nFrames,Int_mode"
PortCounts "[]"
SFunctionModules "''"
MaskDescription " INTRA FRAME INTERLEAVER\n\nThis bl"
"ock performs the intra frame interleaver if the the Intra_int_flag is set on "
"in the upper level in the block parameter box of the subsystem. \n\nBlock int"
"erleaving is called with s-function s_interleaving. The parameters for this f"
"unction are inherited from subsystem parameter box and it's initialization. s"
"ee dl_start.m"
MaskPromptString "Inter frame interleaver mode|Bits in frame|"
"Number of frames |Number of columns (for Block interleaver)"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskVariables "Int_mode=@1;bits_in_frame=@2;nFrames=@3;col"
"s=@4;"
MaskInitialization "N_inter_int = bits_in_frame; %input block s"
"ize for interleaver"
MaskDisplay "disp('INTER FRAME\\nINTERLEAVER\\n\\n\\n1 -"
" Block interleaver\\n2 - Multistage interleaver');\ndisp(Int_mode)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Inter_int_mode|bits_in_frame|nFrames|cols"
}
Block {
BlockType "S-Function"
Name "intra_deinterleaving"
Ports [2, 2, 0, 0, 0]
Position [580, 145, 725, 245]
ForegroundColor "blue"
FunctionName "s_intra_deinterleaver"
Parameters "bits_in_frame,Int_mode,nFrames"
PortCounts "[]"
SFunctionModules "''"
MaskPromptString "Intra frame interleaver mode|Bits in frame|"
"Number of frames "
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskVariables "Int_mode=@1;bits_in_frame=@2;nFrames=@3;"
MaskDisplay "disp('INTRA FRAME\\nDEINTERLEAVER\\n\\n\\n1"
" - off \\n2 - onr');\ndisp(Int_mode)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Intra_int_flag|bits_in_frame|nFrames"
}
Block {
BlockType "S-Function"
Name "intra_interleaving"
Ports [1, 1, 0, 0, 0]
Position [205, 133, 355, 257]
ForegroundColor "blue"
FunctionName "s_intra_interleaver"
Parameters "bits_in_frame,Int_mode,nFrames,nSlots"
PortCounts "[]"
SFunctionModules "''"
MaskDescription " INTRA FRAME INTERLEAVER\n\nThis bl"
"ock performs the intra frame interleaver if the the Intra_int_flag is set on "
"in the upper level in the block parameter box of the subsystem. \n\nBlock int"
"erleaving is called with s-function s_interleaving. The parameters for this f"
"unction are inherited from subsystem parameter box and it's initialization. s"
"ee dl_start.m"
MaskPromptString "Intra frame interleaver mode|Bits in frame|"
"Number of frames |Number of Slots in a frame"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskVariables "Int_mode=@1;bits_in_frame=@2;nFrames=@3;nSl"
"ots=@4;"
MaskDisplay "disp('INTRA FRAME\\nINTERLEAVER\\n\\n\\n1 -"
" off \\n2 - onr');\ndisp(Int_mode)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Intra_int_flag|bits_in_frame|nFrames|nSlot"
}
Line {
SrcBlock "Buffer"
SrcPort 2
Points [15, 0]
DstBlock "intra_deinterleaving"
DstPort 2
}
Line {
SrcBlock "Width"
SrcPort 1
Points [10, 0]
DstBlock "Buffer"
DstPort 2
}
Line {
SrcBlock "Buffer"
SrcPort 1
DstBlock "intra_deinterleaving"
DstPort 1
}
Line {
SrcBlock "intra_interleaving"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Width"
DstPort 1
}
Branch {
Points [60, 0]
DstBlock "Buffer"
DstPort 1
}
}
Line {
SrcBlock "inter_interleaving"
SrcPort 1
Points [30, 0; 0, -35]
DstBlock "inter_deinterleaving"
DstPort 1
}
Line {
SrcBlock "Constant12"
SrcPort 1
DstBlock "inter_deinterleaving"
DstPort 2
}
Line {
SrcBlock "data source 01 ..10"
SrcPort 1
Points [15, 0]
Branch {
Points [0, 160; 20, 0]
Branch {
Points [5, 0]
DstBlock "inter_interleaving"
DstPort 1
}
Branch {
Points [0, 185; 45, 0]
Branch {
DstBlock "Direct ber calculation"
DstPort 1
}
Branch {
Points [290, 0]
DstBlock "Delayed ber calculation"
DstPort 1
}
}
}
Branch {
Points [35, 0]
DstBlock "intra_interleaving"
DstPort 1
}
Branch {
Points [0, -115]
DstBlock "dl_TX_modulation"
DstPort 1
}
}
Line {
SrcBlock "inter_deinterleaving"
SrcPort 1
Points [20, 0]
Branch {
Points [80, 0]
DstBlock "Display5"
DstPort 1
}
Branch {
Points [0, 225]
DstBlock "Direct ber calculation"
DstPort 2
}
}
Line {
SrcBlock "intra_deinterleaving"
SrcPort 1
Points [15, 0]
Branch {
Points [95, 0]
DstBlock "Display4"
DstPort 1
}
Branch {
Points [0, 400]
DstBlock "Delayed ber calculation"
DstPort 2
}
}
Line {
SrcBlock "Delayed ber calculation"
SrcPort 1
Points [0, 40]
DstBlock "Display6"
DstPort 1
}
Line {
SrcBlock "Direct ber calculation"
SrcPort 1
Points [0, 40]
DstBlock "Display7"
DstPort 1
}
}
}
}
}