www.pudn.com > wcdma_simulink.rar > koe_ch_auki.mdl


Model {
  Name			  "koe_ch_auki"
  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 10:42:35 1999"
  Creator		  "maarit"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%"
  LastModifiedBy	  "maarit"
  ModifiedDateFormat	  "%"
  LastModifiedDate	  "Tue Jun 22 10:49:58 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_ch_auki"
    Location		    [78, 203, 578, 463]
    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		      [115, 29, 310, 191]
      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);N=inpu"
"t_block_size;\n;bits_in_frame=sizes(2);nFrames=sizes(3);\nnSlot=sizes(5); chi"
"ps_in_slot=sizes(6);nCRC=crc(1);crc_poly=crc(2);\ncType=chCode(1);K=chCode(2)"
"; nTail=chCode(3);ch_poly=[chCode(4:6)];\nnPilot=control(1);TPC=control(2);TF"
"I=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		[365, 48, 1364, 770]
	Open			on
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Reference
	  Name			  "Add CRC2"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [200, 77, 290, 133]
	  ShowName		  off
	  FontName		  "helvetica"
	  SourceBlock		  "utra_lib/Channel coding block/dl_TX_channel"
"_coding/Add CRC2"
	  SourceType		  ""
	  N			  "N"
	  nCRC			  "nCRC"
	  crc_poly		  "crc_poly"
	  nFrames		  "nFrames"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [180, 146, 305, 174]
	  ShowName		  off
	  Value			  "input_block_size+nCRC"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant2"
	  Position		  [845, 510, 875, 540]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  Value			  "1"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Direct ber calculation"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [250, 234, 435, 336]
	  SourceBlock		  "utra_lib/Test functions/Direct ber calculat"
"ion"
	  SourceType		  ""
	  N			  "input_block_size"
	  nFrames		  "nFrames"
	}
	Block {
	  BlockType		  Display
	  Name			  "Display7"
	  Ports			  [1, 0, 0, 0, 0]
	  Position		  [467, 305, 573, 355]
	  Orientation		  "down"
	  NamePlacement		  "alternate"
	  Format		  "short"
	  Decimation		  "1"
	  Floating		  off
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Rate Matching"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [600, 104, 685, 156]
	  SourceBlock		  "utra_lib/Channel coding block/dl_TX_channel"
"_coding/Rate Matching"
	  SourceType		  ""
	  r_in			  "K*(N+nCRC)+nTail"
	  r_out			  "nFrames*bits_in_frame"
	  punk			  "0.2"
	  nFrames		  "nFrames"
	}
	Block {
	  BlockType		  ToWorkspace
	  Name			  "To Workspace23"
	  Position		  [600, 270, 660, 300]
	  ShowName		  off
	  VariableName		  "ber"
	  Buffer		  "inf"
	  Decimation		  "1"
	  SampleTime		  "nFrames"
	  SaveFormat		  "Matrix"
	}
	Block {
	  BlockType		  ToWorkspace
	  Name			  "To Workspace24"
	  Position		  [90, 555, 150, 585]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  ShowName		  off
	  VariableName		  "crc"
	  Buffer		  "inf"
	  Decimation		  "1"
	  SampleTime		  "nFrames"
	  SaveFormat		  "Matrix"
	}
	Block {
	  BlockType		  ToWorkspace
	  Name			  "To Workspace26"
	  Position		  [60, 440, 120, 470]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  ShowName		  off
	  VariableName		  "out"
	  Buffer		  "inf"
	  Decimation		  "1"
	  SampleTime		  "nFrames"
	  SaveFormat		  "Matrix"
	}
	Block {
	  BlockType		  Reference
	  Name			  "ch_coding"
	  Ports			  [2, 2, 0, 0, 0]
	  Position		  [355, 82, 495, 178]
	  ForegroundColor	  "blue"
	  SourceBlock		  "utra_lib/Channel coding block/dl_TX_channel"
"_coding/ch_coding"
	  SourceType		  "wcdma"
	  N_chcode		  "N+nCRC"
	  cType			  "cType"
	  K			  "K"
	  nTail			  "nTail"
	  poly			  "ch_poly"
	  nFrames		  "nFrames"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "ch_decoding"
	  Ports			  [2, 2, 0, 0, 0]
	  Position		  [455, 424, 595, 546]
	  Orientation		  "left"
	  ForegroundColor	  "blue"
	  NamePlacement		  "alternate"
	  FunctionName		  "s_chdecoding"
	  Parameters		  "N_chdecode,poly,cType,K,nTail,nFrames,sp0,s"
"p1"
	  PortCounts		  "[]"
	  SFunctionModules	  "''"
	  MaskType		  "wcdma"
	  MaskDescription	  "           CHANNEL CODING\n\nThe block perf"
"orms convolutional coding. The parameters need to correspondd to the paramete"
"rs given for the channel decoder.\n\nThe block initializationn is done in fil"
"e utra.m to make sure that all the blocks get same block size, scrambling cod"
"es etc. This block calls an s-function s_chcoding with arguments\n\n1) Size o"
"f the input vector is the block size, N.\n2) Generator polynomials for convol"
"utional coder \n     (initialization in coding_init.m)\n3) Coding type (1 = c"
"onvolution, 2 = turbo) \n4) Coding ratio\n5) Tail length\n"
	  MaskPromptString	  "Input datablock size|Coding Type (1= Convol"
"utional 2= turbo)|Coding Gain|Tail length|Generator Polynomials for decoding|"
"Number of frames|soft prob for 0|soft prob for 1"
	  MaskStyleString	  "edit,edit,edit,edit,edit,edit,edit,edit"
	  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		  "N_chdecode=@1;cType=@2;K=@3;nTail=@4;poly=@"
"5;nFrames=@6;sp0=@7;sp1=@8;"
	  MaskDisplay		  "disp('CHANNEL\\n\\nDECODING');\nport_label("
"'output',1,'bits');\nport_label('input',2,'flag');\nport_label('input',1,'cod"
"ed bits');\nport_label('output',2,'flag');"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  MaskValueString	  "(nCRC+N)*K+nTail|cType|K|nTail|ch_poly|nFra"
"mes|[1 0]|[ 0 1]"
	}
	Block {
	  BlockType		  Reference
	  Name			  "data source 01 ..10"
	  Ports			  [0, 1, 0, 0, 0]
	  Position		  [45, 70, 135, 130]
	  SourceBlock		  "utra_lib/Source blocks/data source 01 ..10"
	  SourceType		  "koe"
	  nFrames		  "nFrames"
	  N			  "input_block_size"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "rate_dematching"
	  Ports			  [2, 2, 0, 0, 0]
	  Position		  [675, 424, 795, 546]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  FunctionName		  "s_derate"
	  Parameters		  "dr_in,dr_out,punk,nFrames"
	  PortCounts		  "[]"
	  SFunctionModules	  "''"
	  MaskPromptString	  "Size of input block|Size of the output bloc"
"k|Max puncturation rate (DO NOT CHANGE)|Number of frames"
	  MaskStyleString	  "edit,edit,edit,edit"
	  MaskTunableValueString  "on,on,on,on"
	  MaskCallbackString	  "|||"
	  MaskEnableString	  "on,on,on,on"
	  MaskVisibilityString	  "on,on,on,on"
	  MaskVariables		  "dr_in=@1;dr_out=@2;punk=@3;nFrames=@4;"
	  MaskDisplay		  "disp('De ratematching')\nport_label('input'"
",2,'flag');\nport_label('output',2,'flag');"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  MaskValueString	  "nFrames*bits_in_frame|K*(N+nCRC)+nTail|0.2|"
"nFrames"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "remove CRC"
	  Ports			  [2, 2, 0, 0, 0]
	  Position		  [205, 425, 345, 545]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  FunctionName		  "s_crc_remove"
	  Parameters		  "nReCRC,nCRC,crc_poly,nFrames"
	  PortCounts		  "[]"
	  SFunctionModules	  "''"
	  MaskPromptString	  "Size of input Block|Number of CRC bits|Gene"
"rator polynomy for CRC|Number of frames in one block"
	  MaskStyleString	  "edit,edit,edit,edit"
	  MaskTunableValueString  "on,on,on,on"
	  MaskCallbackString	  "|||"
	  MaskEnableString	  "on,on,on,on"
	  MaskVisibilityString	  "on,on,on,on"
	  MaskVariables		  "nReCRC=@1;nCRC=@2;crc_poly=@3;nFrames=@4;"
	  MaskDisplay		  "disp('CRC\\n\\nCALCULATION');\nport_label('"
"input',1,'input bits');\nport_label('input',2,'flag');\nport_label('output',1"
",'bits');\nport_label('output',2,'crc');"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  MaskValueString	  "N+nCRC|nCRC|crc_poly|nFrames"
	}
	Block {
	  BlockType		  Mux
	  Name			  "tail_mux"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [550, 80, 555, 180]
	  ShowName		  off
	  FontName		  "helvetica"
	  FontSize		  12
	  Inputs		  "2"
	  DisplayOption		  "bar"
	}
	Line {
	  SrcBlock		  "Add CRC2"
	  SrcPort		  1
	  DstBlock		  "ch_coding"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "ch_coding"
	  SrcPort		  1
	  DstBlock		  "tail_mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "ch_coding"
	  SrcPort		  2
	  DstBlock		  "tail_mux"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "tail_mux"
	  SrcPort		  1
	  DstBlock		  "Rate Matching"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "rate_dematching"
	  SrcPort		  2
	  DstBlock		  "ch_decoding"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "rate_dematching"
	  SrcPort		  1
	  DstBlock		  "ch_decoding"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "ch_decoding"
	  SrcPort		  2
	  DstBlock		  "remove CRC"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "ch_decoding"
	  SrcPort		  1
	  DstBlock		  "remove CRC"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Rate Matching"
	  SrcPort		  1
	  Points		  [175, 0; 0, 325]
	  DstBlock		  "rate_dematching"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant2"
	  SrcPort		  1
	  Points		  [-30, 0]
	  DstBlock		  "rate_dematching"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Constant"
	  SrcPort		  1
	  Points		  [0, -5]
	  DstBlock		  "ch_coding"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "data source 01 ..10"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    Points		    [35, 0]
	    DstBlock		    "Add CRC2"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 160]
	    DstBlock		    "Direct ber calculation"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "remove CRC"
	  SrcPort		  2
	  Points		  [-35, 0]
	  DstBlock		  "To Workspace24"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "remove CRC"
	  SrcPort		  1
	  Points		  [-15, 0; 0, -5]
	  Branch {
	    Points		    [0, -140]
	    DstBlock		    "Direct ber calculation"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [-50, 0]
	    DstBlock		    "To Workspace26"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Direct ber calculation"
	  SrcPort		  1
	  Points		  [85, 0]
	  Branch {
	    DstBlock		    "To Workspace23"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 5]
	    DstBlock		    "Display7"
	    DstPort		    1
	  }
	}
      }
    }
  }
}