Model {
  Name			  "testscrm"
  Version		  4.00
  SampleTimeColors	  off
  LibraryLinkDisplay	  "none"
  WideLines		  off
  ShowLineDimensions	  off
  ShowPortDataTypes	  off
  RecordCoverage	  off
  CovPath		  "/"
  CovSaveName		  "covdata"
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  BlockNameDataTip	  off
  BlockParametersDataTip  on
  BlockDescriptionStringDataTip	off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  PreLoadFcn		  "N=3; M=4;"
  Created		  "Tue Oct 20 09:14:39 1998"
  Creator		  "tdelve"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "ysong"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Wed Aug 23 10:06:23 2000"
  ModelVersionFormat	  "1.%<AutoIncrement:6>"
  ConfigurationManager	  "none"
  SimParamPage		  "Solver"
  StartTime		  "0.0"
  StopTime		  "65"
  SolverMode		  "SingleTasking"
  Solver		  "VariableStepDiscrete"
  RelTol		  "1e-3"
  AbsTol		  "1e-6"
  Refine		  "1"
  MaxStep		  "auto"
  MinStep		  "auto"
  MaxNumMinSteps	  "-1"
  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		  "Array"
  LimitDataPoints	  off
  MaxDataPoints		  "1000"
  Decimation		  "1"
  AlgebraicLoopMsg	  "warning"
  MinStepSizeMsg	  "warning"
  UnconnectedInputMsg	  "warning"
  UnconnectedOutputMsg	  "warning"
  UnconnectedLineMsg	  "warning"
  InheritedTsInSrcMsg	  "warning"
  SingleTaskRateTransMsg  "none"
  MultiTaskRateTransMsg	  "error"
  IntegerOverflowMsg	  "warning"
  CheckForMatrixSingularity "none"
  UnnecessaryDatatypeConvMsg "none"
  Int32ToFloatConvMsg	  "warning"
  SignalLabelMismatchMsg  "none"
  LinearizationMsg	  "none"
  VectorMatrixConversionMsg "none"
  SfunCompatibilityCheckMsg "none"
  BlockPriorityViolationMsg "warning"
  ArrayBoundsChecking	  "none"
  ConsistencyChecking	  "none"
  ZeroCross		  on
  Profile		  off
  SimulationMode	  "normal"
  RTWSystemTargetFile	  "grt.tlc"
  RTWInlineParameters	  off
  RTWRetainRTWFile	  off
  RTWTemplateMakefile	  "grt_default_tmf"
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  TLCProfiler		  off
  TLCDebug		  off
  TLCCoverage		  off
  AccelSystemTargetFile	  "accel.tlc"
  AccelTemplateMakefile	  "accel_default_tmf"
  AccelMakeCommand	  "make_rtw"
  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
  ExtModeLogAll		  on
  OptimizeBlockIOStorage  on
  BufferReuse		  on
  ParameterPooling	  on
  BlockReductionOpt	  off
  BooleanDataType	  off
  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		    "testscrm"
    Location		    [21, 287, 910, 574]
    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		      Reference
      Name		      "Descrambler"
      Ports		      [2, 2]
      Position		      [585, 38, 665, 82]
      SourceBlock	      "comcdint/Descrambler"
      SourceType	      "Descrambler"
      M			      "2"
      poly		      "[0 -5 -6]"
      ini_sta		      "[1 1 0 1 0 1]"
    }
    Block {
      BlockType		      Reference
      Name		      "Pulses divide\nsample time"
      Ports		      [0, 1]
      Position		      [20, 28, 100, 72]
      ForegroundColor	      "blue"
      ShowName		      off
      SourceBlock	      "com_sour/Pulses divide\nsample time"
      SourceType	      "Pulse generator"
      samp_time		      "1"
      out_divid		      "1"
      offset		      "0"
    }
    Block {
      BlockType		      Reference
      Name		      "Scrambler"
      Ports		      [2, 2]
      Position		      [270, 38, 350, 82]
      SourceBlock	      "comcdint/Scrambler"
      SourceType	      "Scrambler"
      M			      "2"
      poly		      "[0 -5 -6]"
      ini_sta		      "[1 1 0 1 0 1]"
    }
    Block {
      BlockType		      Reference
      Name		      "Triggered read\nfrom wksp"
      Ports		      [1, 1]
      Position		      [145, 28, 225, 72]
      ShowName		      off
      SourceBlock	      "com_sour/Triggered read\nfrom wksp"
      SourceType	      "Read from workspace"
      var		      "zeros(100, 1)"
      thd		      ".1"
      cyclFlag		      "1"
      ini		      "0"
    }
    Block {
      BlockType		      Reference
      Name		      "Triggered write\nto wksp"
      Ports		      [2]
      Position		      [470, 58, 550, 102]
      ShowName		      off
      SourceBlock	      "com_sour/Triggered write\nto wksp"
      SourceType	      "Write to workspace"
      filename		      "'XX'"
      datatype		      "'data'"
      nump		      "0"
      max_rec		      "100"
      cut_type		      "0"
      threshold		      ".5"
    }
    Block {
      BlockType		      Reference
      Name		      "Triggered write\nto wksp1"
      Ports		      [2]
      Position		      [370, 58, 450, 102]
      ShowName		      off
      SourceBlock	      "com_sour/Triggered write\nto wksp"
      SourceType	      "Write to workspace"
      filename		      "'YY'"
      datatype		      "'data'"
      nump		      "0"
      max_rec		      "100"
      cut_type		      "0"
      threshold		      ".5"
    }
    Block {
      BlockType		      Reference
      Name		      "Triggered write\nto wksp2"
      Ports		      [2]
      Position		      [790, 58, 870, 102]
      ShowName		      off
      SourceBlock	      "com_sour/Triggered write\nto wksp"
      SourceType	      "Write to workspace"
      filename		      "'XXd'"
      datatype		      "'data'"
      nump		      "0"
      max_rec		      "100"
      cut_type		      "0"
      threshold		      ".5"
    }
    Block {
      BlockType		      Reference
      Name		      "Triggered write\nto wksp3"
      Ports		      [2]
      Position		      [685, 58, 765, 102]
      ShowName		      off
      SourceBlock	      "com_sour/Triggered write\nto wksp"
      SourceType	      "Write to workspace"
      filename		      "'YYd'"
      datatype		      "'data'"
      nump		      "0"
      max_rec		      "100"
      cut_type		      "0"
      threshold		      ".5"
    }
    Block {
      BlockType		      SubSystem
      Name		      "descramble"
      Ports		      []
      Position		      [564, 24, 878, 145]
      Orientation	      "left"
      ForegroundColor	      "gray"
      BackgroundColor	      "yellow"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp(' ')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"descramble"
	Location		[360, 145, 485, 217]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "plot block"
      Ports		      []
      Position		      [22, 113, 110, 157]
      BackgroundColor	      "cyan"
      ShowName		      off
      OpenFcn		      "if exist('XX'), lgthX=length(XX); plot([1:lgthX"
"], [1:lgthX]*0, 'o', [1:lgthX], XXd(1:lgthX), '+', [1:lgthX], XX, 'x',[0 0], "
"[-.2 1.2], 'k+');text(5,.7,'o--signal source','color','b');text(5,.55,'x--scr"
"ambled signal','color','g');text(5,.4,'+--descrambled signal','color','r');el"
"se,disp('You must run simulation before the plot');end;"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp('Plot result\\n(after simulation)')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"plot block"
	Location		[360, 145, 520, 290]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"cyan"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "scramble"
      Ports		      []
      Position		      [244, 24, 558, 145]
      Orientation	      "left"
      ForegroundColor	      "gray"
      BackgroundColor	      "yellow"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp(' ')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"scramble"
	Location		[360, 145, 485, 217]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "signal and sync pulse"
      Ports		      []
      Position		      [15, 23, 239, 89]
      Orientation	      "left"
      ForegroundColor	      "gray"
      BackgroundColor	      "yellow"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp(' ')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"signal and sync pulse"
	Location		[360, 145, 485, 217]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Line {
      SrcBlock		      "Pulses divide\nsample time"
      SrcPort		      1
      Points		      [20, 0]
      Branch {
	DstBlock		"Triggered read\nfrom wksp"
	DstPort			1
      }
      Branch {
	Points			[0, 75; 130, 0]
	Branch {
	  Points		  [95, 0]
	  Branch {
	    Points		    [0, -35]
	    DstBlock		    "Triggered write\nto wksp1"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [105, 0]
	    Branch {
	      DstBlock		      "Triggered write\nto wksp"
	      DstPort		      2
	    }
	    Branch {
	      Points		      [115, 0]
	      Branch {
		DstBlock		"Descrambler"
		DstPort			2
	      }
	      Branch {
		Points			[100, 0]
		Branch {
		  DstBlock		  "Triggered write\nto wksp3"
		  DstPort		  2
		}
		Branch {
		  Points		  [105, 0]
		  DstBlock		  "Triggered write\nto wksp2"
		  DstPort		  2
		}
	      }
	    }
	  }
	}
	Branch {
	  DstBlock		  "Scrambler"
	  DstPort		  2
	}
      }
    }
    Line {
      SrcBlock		      "Triggered read\nfrom wksp"
      SrcPort		      1
      DstBlock		      "Scrambler"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Scrambler"
      SrcPort		      2
      DstBlock		      "Triggered write\nto wksp1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Scrambler"
      SrcPort		      1
      Points		      [100, 0]
      Branch {
	DstBlock		"Triggered write\nto wksp"
	DstPort			1
      }
      Branch {
	DstBlock		"Descrambler"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Descrambler"
      SrcPort		      2
      DstBlock		      "Triggered write\nto wksp3"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Descrambler"
      SrcPort		      1
      Points		      [105, 0]
      DstBlock		      "Triggered write\nto wksp2"
      DstPort		      1
    }
    Annotation {
      Position		      [418, 175]
      Text		      "The parameters of this example is taken from Ex"
"ample 5.6 of David R. Smith \"Digital Transmission Systems\" 2nd edition"
    }
    Annotation {
      Position		      [402, 192]
      Text		      "This example shows that even if the transmitted"
" message is all zeros, the scrambled message (XX) is not all zero. "
    }
    Annotation {
      Position		      [318, 211]
      Text		      "After descramble, the original message is recov"
"ered XXd is an all zero vector."
    }
    Annotation {
      Position		      [430, 267]
      Text		      "Warning: This model is obsolete and may be remo"
"ved in the future."
      FontName		      "Arial"
      FontSize		      12
    }
  }
}
