Library {
  Name			  "sl_helperblocks"
  Version		  6.1
  MdlSubVersion		  0
  SavedCharacterEncoding  "US-ASCII"
  SaveDefaultBlockParams  on
  LibraryLinkDisplay	  "none"
  ShowLoopsOnError	  on
  IgnoreBidirectionalLines off
  CovSaveName		  "covdata"
  CovMetricSettings	  "dw"
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  covSaveCumulativeToWorkspaceVar on
  CovSaveSingleToWorkspaceVar on
  CovCumulativeReport	  off
  CovReportOnPause	  on
  ScopeRefreshTime	  0.035000
  OverrideScopeRefreshTime on
  DisableAllScopes	  off
  BlockNameDataTip	  off
  BlockParametersDataTip  on
  BlockDescriptionStringDataTip	off
  ToolBar		  off
  StatusBar		  off
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  Created		  "Fri Jun 19 12:50:28 1998"
  Creator		  "andyb"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "schim"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Tue Nov  2 16:36:20 2004"
  ModelVersionFormat	  "1.%<AutoIncrement:27>"
  ConfigurationManager	  "none"
  LinearizationMsg	  "none"
  Profile		  off
  ParamWorkspaceSource	  "MATLABWorkspace"
  ExtModeBatchMode	  off
  ExtModeEnableFloating	  on
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "normal"
  ExtModeTrigPort	  "1"
  ExtModeTrigElement	  "any"
  ExtModeTrigDuration	  1000
  ExtModeTrigDurationFloating "auto"
  ExtModeTrigHoldOff	  0
  ExtModeTrigDelay	  0
  ExtModeTrigDirection	  "rising"
  ExtModeTrigLevel	  0
  ExtModeArchiveMode	  "off"
  ExtModeAutoIncOneShot	  off
  ExtModeIncDirWhenArm	  off
  ExtModeAddSuffixToVar	  off
  ExtModeWriteAllDataToWs off
  ExtModeArmWhenConnect	  on
  ExtModeSkipDownloadWhenConnect off
  ExtModeLogAll		  on
  ExtModeAutoUpdateStatusClock off
  StrictBusMsg		  "None"
  ProdHWDeviceType	  "32-bit Generic"
  ShowModelReferenceBlockVersion off
  ShowModelReferenceBlockIO off
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  BlockParameterDefaults {
    Block {
      BlockType		      Constant
      Value		      "1"
      VectorParams1D	      on
      OutDataTypeMode	      "Inherit from 'Constant value'"
      OutDataType	      "sfix(16)"
      ConRadixGroup	      "Use specified scaling"
      OutScaling	      "2^0"
      SampleTime	      "inf"
    }
    Block {
      BlockType		      DataTypeConversion
      OutDataTypeMode	      "Inherit via back propagation"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      ConvertRealWorld	      "Real World Value (RWV)"
      RndMeth		      "Zero"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Inport
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      Interpolate	      on
    }
    Block {
      BlockType		      Logic
      Operator		      "AND"
      Inputs		      "2"
      AllPortsSameDT	      on
      OutDataTypeMode	      "Logical (see Configuration Parameters: Optimiza"
"tion)"
      LogicDataType	      "uint(8)"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Lookup
      InputValues	      "[-4:5]"
      OutputValues	      " rand(1,10)-0.5"
      LookUpMeth	      "Interpolation-Extrapolation"
      OutDataTypeMode	      "Same as input"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
      LUTDesignTableMode      "Redesign Table"
      LUTDesignDataSource     "Block Dialog"
      LUTDesignFunctionName   "sqrt(x)"
      LUTDesignUseExistingBP  on
      LUTDesignRelError	      "0.01"
      LUTDesignAbsError	      "1e-6"
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      Reference
    }
    Block {
      BlockType		      RelationalOperator
      Operator		      ">="
      InputSameDT	      on
      LogicOutDataTypeMode    "Logical (see Configuration Parameters: Optimiza"
"tion)"
      LogicDataType	      "uint(8)"
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      on
      Permissions	      "ReadWrite"
      PermitHierarchicalResolution "All"
      SystemSampleTime	      "-1"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    Block {
      BlockType		      Sum
      IconShape		      "rectangular"
      Inputs		      "++"
      InputSameDT	      on
      OutDataTypeMode	      "Same as first input"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Switch
      Criteria		      "u2 >= Threshold"
      Threshold		      "0"
      InputSameDT	      on
      OutDataTypeMode	      "Inherit via internal rule"
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      ZeroCross		      on
      SampleTime	      "-1"
    }
  }
  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		    "sl_helperblocks"
    Location		    [72, 125, 383, 230]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      SubSystem
      Name		      "Cosine"
      Ports		      [1, 1]
      Position		      [135, 24, 190, 66]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskType		      "Cosine"
      MaskDescription	      "Implement a Cosine function in Fixed-Point usin"
"g a lookup table approach that exploits quarter wave symmetry.  The output fr"
"action length equals output word length minus 2.\n\nThe most efficient implem"
"entation is obtained when the number of data points is a power of 2 plus 1.  "
"For example, (2^5)+1."
      MaskPromptString	      "Number of data points for lookup table:|Output "
"word length:"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskCallbackString      "|"
      MaskEnableString	      "on,on"
      MaskVisibilityString    "on,on"
      MaskToolTipString	      "on,on"
      MaskVarAliasString      ","
      MaskVariables	      "NumDataPoints=@1;OutputWordLength=@2;"
      MaskInitialization      "XData = linspace(0,0.25,NumDataPoints);\n%\n% u"
"sing sin for the data is not a mistake.\n% parameter pooling will cause the d"
"ata for similar sines and cosines to\n% be shared.  This can save significant"
" amounts of ROM.\n%\nYData = sin(2*pi*XData);\nOutputFracLength = OutputWordL"
"ength-2;"
      MaskDisplay	      "disp('cos(2*pi*u)')"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "normalized"
      MaskValueString	      "NumDataPoints|OutputWordLength"
      MaskTabNameString	      ","
      System {
	Name			"Cosine"
	Location		[533, 294, 1101, 511]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [15, 28, 45, 42]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  SignalType		  "real"
	  LatchInput		  off
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Handle Quarter Symetery Cosine"
	  Ports			  [2, 2]
	  Position		  [150, 16, 410, 94]
	  FontName		  "Arial"
	  TreatAsAtomicUnit	  off
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  MaskType		  "Fixed-Point-Private Quandrant Processing Si"
"ne"
	  MaskDescription	  "This is a PRIVATE helper block not intended"
" for direct use by customers.\nThis block manages the four possible quandrant"
"s that the input signal can be in.  Combining this block with a look up table"
" allows the Sine function to be implemented with 75% less table data.  Only d"
"ata from the first quandrant is needed. "
	  MaskIconFrame		  on
	  MaskIconOpaque	  off
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "normalized"
	  System {
	    Name		    "Handle Quarter Symetery Cosine"
	    Location		    [258, 400, 1202, 913]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Raw Angle"
	      Position		      [15, 53, 45, 67]
	      Port		      "1"
	      IconDisplay	      "Port number"
	      SignalType	      "real"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Output From Lookup Table"
	      Position		      [490, 438, 520, 452]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      SignalType	      "real"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "1st or 4th Quad"
	      Ports		      [2, 1]
	      Position		      [350, 395, 390, 435]
	      Operator		      "OR"
	      AllPortsSameDT	      off
	      OutDataTypeMode	      "Specify via dialog"
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Amp25"
	      Ports		      [2, 1]
	      Position		      [435, 130, 475, 170]
	      Inputs		      "+-"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      OutDataType	      "uint(8)"
	      OutScaling	      "1"
	      LockScale		      on
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Amp75"
	      Ports		      [2, 1]
	      Position		      [435, 225, 475, 265]
	      Inputs		      "+-"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      OutDataType	      "uint(8)"
	      OutScaling	      "1"
	      LockScale		      on
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "CastU16En16"
	      Position		      [135, 40, 195, 80]
	      ForegroundColor	      "red"
	      ShowName		      off
	      OutDataTypeMode	      "Specify via dialog"
	      OutDataType	      "ufix(OutputWordLength)"
	      OutScaling	      "2^-OutputWordLength"
	      LockScale		      on
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "GTEp75"
	      Position		      [270, 280, 310, 320]
	      InputSameDT	      off
	      LogicOutDataTypeMode    "Specify via dialog"
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "LTEp25"
	      Position		      [270, 100, 310, 140]
	      Operator		      "<="
	      InputSameDT	      off
	      LogicOutDataTypeMode    "Specify via dialog"
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "LTEp50"
	      Position		      [270, 190, 310, 230]
	      Operator		      "<="
	      InputSameDT	      off
	      LogicOutDataTypeMode    "Specify via dialog"
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Negate"
	      Ports		      [1, 1]
	      Position		      [645, 425, 685, 465]
	      SourceBlock	      "simulink/Math\nOperations/Unary Minus"
	      SourceType	      "Unary Minus"
	      DoSatur		      "off"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Point25"
	      Position		      [110, 114, 150, 146]
	      ForegroundColor	      "green"
	      Value		      "0.25"
	      OutDataTypeMode	      "Specify via dialog"
	      OutDataType	      "ufix(OutputWordLength)"
	      OutScaling	      "2^-OutputWordLength"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Point50"
	      Position		      [110, 204, 150, 236]
	      Value		      "0.5"
	      OutDataTypeMode	      "Specify via dialog"
	      OutDataType	      "ufix(OutputWordLength) "
	      OutScaling	      "2^-OutputWordLength"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Point75"
	      Position		      [110, 294, 150, 326]
	      ForegroundColor	      "blue"
	      Value		      "0.75"
	      OutDataTypeMode	      "Specify via dialog"
	      OutDataType	      "ufix(OutputWordLength) "
	      OutScaling	      "2^-OutputWordLength"
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "QuadHandle1a"
	      Position		      [535, 13, 580, 177]
	      Criteria		      "u2 ~= 0"
	      InputSameDT	      off
	      SaturateOnIntegerOverflow	off
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "QuadHandle1b"
	      Position		      [535, 218, 580, 382]
	      Criteria		      "u2 ~= 0"
	      InputSameDT	      off
	      SaturateOnIntegerOverflow	off
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "QuadHandle2"
	      Position		      [705, 128, 750, 292]
	      Criteria		      "u2 ~= 0"
	      InputSameDT	      off
	      SaturateOnIntegerOverflow	off
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "SignCorrected"
	      Position		      [730, 371, 775, 459]
	      Threshold		      "1"
	      InputSameDT	      off
	      SaturateOnIntegerOverflow	off
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "p25mA"
	      Ports		      [2, 1]
	      Position		      [435, 20, 475, 60]
	      Inputs		      "+-"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      OutDataType	      "uint(8)"
	      OutScaling	      "1"
	      LockScale		      on
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "p75mA"
	      Ports		      [2, 1]
	      Position		      [440, 335, 480, 375]
	      Inputs		      "+-"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      OutDataType	      "uint(8)"
	      OutScaling	      "1"
	      LockScale		      on
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Cosine"
	      Position		      [870, 408, 900, 422]
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Input To Lookup Table"
	      Position		      [845, 203, 875, 217]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Line {
	      SrcBlock		      "Raw Angle"
	      SrcPort		      1
	      DstBlock		      "CastU16En16"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Point25"
	      SrcPort		      1
	      Points		      [0, 0; 90, 0]
	      Branch {
		DstBlock		"LTEp25"
		DstPort			2
	      }
	      Branch {
		Points			[0, -100; 150, 0]
		Branch {
		  DstBlock		  "p25mA"
		  DstPort		  1
		}
		Branch {
		  Points		  [0, 130]
		  DstBlock		  "Amp25"
		  DstPort		  2
		}
	      }
	    }
	    Line {
	      SrcBlock		      "Output From Lookup Table"
	      SrcPort		      1
	      Points		      [0, 0; 85, 0]
	      Branch {
		DstBlock		"Negate"
		DstPort			1
	      }
	      Branch {
		Points			[0, -60]
		DstBlock		"SignCorrected"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "SignCorrected"
	      SrcPort		      1
	      DstBlock		      "Cosine"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Negate"
	      SrcPort		      1
	      DstBlock		      "SignCorrected"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "CastU16En16"
	      SrcPort		      1
	      Points		      [0, 0; 35, 0]
	      Branch {
		Points			[0, 45]
		Branch {
		  Points		  [0, 5]
		  DstBlock		  "LTEp25"
		  DstPort		  1
		}
		Branch {
		  Points		  [0, 95]
		  Branch {
		    DstBlock		    "LTEp50"
		    DstPort		    1
		  }
		  Branch {
		    Points		    [0, 90]
		    DstBlock		    "GTEp75"
		    DstPort		    1
		  }
		}
	      }
	      Branch {
		Points			[0, -10; 175, 0]
		Branch {
		  DstBlock		  "p25mA"
		  DstPort		  2
		}
		Branch {
		  Points		  [0, 90]
		  Branch {
		    DstBlock		    "Amp25"
		    DstPort		    1
		  }
		  Branch {
		    Points		    [0, 95]
		    Branch {
		    DstBlock		    "Amp75"
		    DstPort		    1
		    }
		    Branch {
		    Points		    [0, 130]
		    DstBlock		    "p75mA"
		    DstPort		    2
		    }
		  }
		}
	      }
	    }
	    Line {
	      Labels		      [2, 0]
	      SrcBlock		      "Point75"
	      SrcPort		      1
	      Points		      [0, 0; 90, 0]
	      Branch {
		DstBlock		"GTEp75"
		DstPort			2
	      }
	      Branch {
		Points			[0, -55; 95, 0]
		Branch {
		  DstBlock		  "Amp75"
		  DstPort		  2
		}
		Branch {
		  Points		  [0, 90]
		  DstBlock		  "p75mA"
		  DstPort		  1
		}
	      }
	    }
	    Line {
	      SrcBlock		      "p25mA"
	      SrcPort		      1
	      DstBlock		      "QuadHandle1a"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Point50"
	      SrcPort		      1
	      DstBlock		      "LTEp50"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Amp25"
	      SrcPort		      1
	      DstBlock		      "QuadHandle1a"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "LTEp50"
	      SrcPort		      1
	      DstBlock		      "QuadHandle2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "LTEp25"
	      SrcPort		      1
	      Points		      [5, 0]
	      Branch {
		Points			[0, -25]
		DstBlock		"QuadHandle1a"
		DstPort			2
	      }
	      Branch {
		Points			[0, 285]
		DstBlock		"1st or 4th Quad"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Amp75"
	      SrcPort		      1
	      DstBlock		      "QuadHandle1b"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "p75mA"
	      SrcPort		      1
	      DstBlock		      "QuadHandle1b"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "GTEp75"
	      SrcPort		      1
	      Points		      [15, 0]
	      Branch {
		DstBlock		"QuadHandle1b"
		DstPort			2
	      }
	      Branch {
		Points			[0, 125]
		DstBlock		"1st or 4th Quad"
		DstPort			2
	      }
	    }
	    Line {
	      SrcBlock		      "QuadHandle1a"
	      SrcPort		      1
	      Points		      [105, 0]
	      DstBlock		      "QuadHandle2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "QuadHandle1b"
	      SrcPort		      1
	      Points		      [105, 0]
	      DstBlock		      "QuadHandle2"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "QuadHandle2"
	      SrcPort		      1
	      DstBlock		      "Input To Lookup Table"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "1st or 4th Quad"
	      SrcPort		      1
	      DstBlock		      "SignCorrected"
	      DstPort		      2
	    }
	  }
	}
	Block {
	  BlockType		  Lookup
	  Name			  "Look-Up\nTable"
	  Position		  [255, 130, 295, 170]
	  Orientation		  "left"
	  DialogController	  "Simulink.DDGSource"
	  InputValues		  "XData"
	  OutputValues		  "YData"
	  LookUpMeth		  "Interpolation-Use End Values"
	  OutDataTypeMode	  "Specify via dialog"
	  OutDataType		  "sfix(OutputWordLength)"
	  OutScaling		  "2^-OutputFracLength"
	  LockScale		  on
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Outport
	  Name			  "y"
	  Position		  [520, 28, 550, 42]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "Handle Quarter Symetery Cosine"
	  SrcPort		  1
	  DstBlock		  "y"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  DstBlock		  "Handle Quarter Symetery Cosine"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Look-Up\nTable"
	  SrcPort		  1
	  Points		  [-115, 0]
	  DstBlock		  "Handle Quarter Symetery Cosine"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Handle Quarter Symetery Cosine"
	  SrcPort		  2
	  Points		  [0, 75]
	  DstBlock		  "Look-Up\nTable"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Sine"
      Ports		      [1, 1]
      Position		      [35, 24, 90, 66]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskType		      "Sine"
      MaskDescription	      "Implement a Sine function in Fixed-Point using "
"a lookup table approach that exploits quarter wave symmetry.  The output frac"
"tion length equals output word length minus 2.\n\nThe most efficient implemen"
"tation is obtained when the number of data points is a power of 2 plus 1.  Fo"
"r example, (2^5)+1."
      MaskPromptString	      "Number of data points for lookup table:|Output "
"word length:"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskCallbackString      "|"
      MaskEnableString	      "on,on"
      MaskVisibilityString    "on,on"
      MaskToolTipString	      "on,on"
      MaskVarAliasString      ","
      MaskVariables	      "NumDataPoints=@1;OutputWordLength=@2;"
      MaskInitialization      "XData = linspace(0,0.25,NumDataPoints);\nYData "
"= sin(2*pi*XData);\nOutputFracLength = OutputWordLength-2;"
      MaskDisplay	      "disp('sin(2*pi*u)')"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "normalized"
      MaskValueString	      "NumDataPoints|OutputWordLength"
      MaskTabNameString	      ","
      System {
	Name			"Sine"
	Location		[517, 128, 1085, 345]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [15, 28, 45, 42]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  SignalType		  "real"
	  LatchInput		  off
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Handle Quarter Symetery Sine"
	  Ports			  [2, 2]
	  Position		  [150, 16, 410, 94]
	  FontName		  "Arial"
	  TreatAsAtomicUnit	  off
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  MaskType		  "Fixed-Point-Private Quandrant Processing Si"
"ne"
	  MaskDescription	  "This is a PRIVATE helper block not intended"
" for direct use by customers.\nThis block manages the four possible quandrant"
"s that the input signal can be in.  Combining this block with a look up table"
" allows the Sine function to be implemented with 75% less table data.  Only d"
"ata from the first quandrant is needed. "
	  MaskIconFrame		  on
	  MaskIconOpaque	  off
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "normalized"
	  System {
	    Name		    "Handle Quarter Symetery Sine"
	    Location		    [470, 361, 1434, 763]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Raw Angle"
	      Position		      [15, 78, 45, 92]
	      Port		      "1"
	      IconDisplay	      "Port number"
	      SignalType	      "real"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Output From Lookup Table"
	      Position		      [425, 318, 455, 332]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      SignalType	      "real"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Amp50"
	      Ports		      [2, 1]
	      Position		      [345, 130, 385, 170]
	      Inputs		      "+-"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      OutDataType	      "uint(8)"
	      OutScaling	      "1"
	      LockScale		      on
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "CastU16En16"
	      Position		      [135, 65, 195, 105]
	      ShowName		      off
	      OutDataTypeMode	      "Specify via dialog"
	      OutDataType	      "ufix(OutputWordLength)"
	      OutScaling	      "2^-OutputWordLength"
	      LockScale		      on
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "LTEp25"
	      Position		      [615, 105, 655, 145]
	      Operator		      "<="
	      InputSameDT	      off
	      LogicOutDataTypeMode    "Specify via dialog"
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "LTEp50"
	      Position		      [345, 75, 385, 115]
	      Operator		      "<="
	      InputSameDT	      off
	      LogicOutDataTypeMode    "Specify via dialog"
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Negate"
	      Ports		      [1, 1]
	      Position		      [615, 305, 655, 345]
	      SourceBlock	      "simulink/Math\nOperations/Unary Minus"
	      SourceType	      "Unary Minus"
	      DoSatur		      "off"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Point25"
	      Position		      [520, 119, 560, 151]
	      Value		      "0.25"
	      OutDataTypeMode	      "Specify via dialog"
	      OutDataType	      "ufix(OutputWordLength)"
	      OutScaling	      "2^-OutputWordLength"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Point50"
	      Position		      [140, 144, 180, 176]
	      Value		      "0.5"
	      OutDataTypeMode	      "Specify via dialog"
	      OutDataType	      "ufix(OutputWordLength) "
	      OutScaling	      "2^-OutputWordLength"
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "QuadHandle1"
	      Position		      [430, 13, 475, 177]
	      Criteria		      "u2 ~= 0"
	      InputSameDT	      off
	      SaturateOnIntegerOverflow	off
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "QuadHandle2"
	      Position		      [700, 18, 745, 232]
	      Criteria		      "u2 ~= 0"
	      InputSameDT	      off
	      SaturateOnIntegerOverflow	off
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "SignCorrected"
	      Position		      [700, 251, 745, 339]
	      Threshold		      "1"
	      InputSameDT	      off
	      SaturateOnIntegerOverflow	off
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "p50mA"
	      Ports		      [2, 1]
	      Position		      [615, 175, 655, 215]
	      Inputs		      "+-"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      OutDataType	      "uint(8)"
	      OutScaling	      "1"
	      LockScale		      on
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Sine"
	      Position		      [860, 288, 890, 302]
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Input To Lookup Table"
	      Position		      [870, 118, 900, 132]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Line {
	      Labels		      [2, 0]
	      SrcBlock		      "Point50"
	      SrcPort		      1
	      Points		      [25, 0; 0, -5]
	      Branch {
		Points			[0, 5]
		Branch {
		  Points		  [0, 40; 390, 0]
		  DstBlock		  "p50mA"
		  DstPort		  1
		}
		Branch {
		  DstBlock		  "Amp50"
		  DstPort		  2
		}
	      }
	      Branch {
		Points			[0, -50]
		DstBlock		"LTEp50"
		DstPort			2
	      }
	    }
	    Line {
	      SrcBlock		      "p50mA"
	      SrcPort		      1
	      DstBlock		      "QuadHandle2"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Negate"
	      SrcPort		      1
	      DstBlock		      "SignCorrected"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Amp50"
	      SrcPort		      1
	      DstBlock		      "QuadHandle1"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "SignCorrected"
	      SrcPort		      1
	      DstBlock		      "Sine"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Output From Lookup Table"
	      SrcPort		      1
	      Points		      [0, 0; 120, 0]
	      Branch {
		Points			[0, -60]
		DstBlock		"SignCorrected"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Negate"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "CastU16En16"
	      SrcPort		      1
	      Points		      [0, 0; 25, 0]
	      Branch {
		Points			[0, 55]
		DstBlock		"Amp50"
		DstPort			1
	      }
	      Branch {
		Points			[0, -45]
		DstBlock		"QuadHandle1"
		DstPort			1
	      }
	      Branch {
		DstBlock		"LTEp50"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "QuadHandle2"
	      SrcPort		      1
	      DstBlock		      "Input To Lookup Table"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "LTEp25"
	      SrcPort		      1
	      DstBlock		      "QuadHandle2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Point25"
	      SrcPort		      1
	      DstBlock		      "LTEp25"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "QuadHandle1"
	      SrcPort		      1
	      Points		      [0, 0; 5, 0]
	      Branch {
		Points			[0, 110]
		DstBlock		"p50mA"
		DstPort			2
	      }
	      Branch {
		Points			[0, -40]
		DstBlock		"QuadHandle2"
		DstPort			1
	      }
	      Branch {
		Points			[115, 0]
		DstBlock		"LTEp25"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "LTEp50"
	      SrcPort		      1
	      Points		      [0, 0; 15, 0]
	      Branch {
		Points			[0, 200]
		DstBlock		"SignCorrected"
		DstPort			2
	      }
	      Branch {
		DstBlock		"QuadHandle1"
		DstPort			2
	      }
	    }
	    Line {
	      SrcBlock		      "Raw Angle"
	      SrcPort		      1
	      DstBlock		      "CastU16En16"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Lookup
	  Name			  "Look-Up\nTable"
	  Position		  [250, 130, 290, 170]
	  Orientation		  "left"
	  DialogController	  "Simulink.DDGSource"
	  InputValues		  "XData"
	  OutputValues		  "YData"
	  LookUpMeth		  "Interpolation-Use End Values"
	  OutDataTypeMode	  "Specify via dialog"
	  OutDataType		  "sfix(OutputWordLength)"
	  OutScaling		  "2^-OutputFracLength"
	  LockScale		  on
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Outport
	  Name			  "y"
	  Position		  [520, 28, 550, 42]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "Handle Quarter Symetery Sine"
	  SrcPort		  2
	  Points		  [0, 75]
	  DstBlock		  "Look-Up\nTable"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Look-Up\nTable"
	  SrcPort		  1
	  Points		  [-110, 0]
	  DstBlock		  "Handle Quarter Symetery Sine"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  DstBlock		  "Handle Quarter Symetery Sine"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Handle Quarter Symetery Sine"
	  SrcPort		  1
	  DstBlock		  "y"
	  DstPort		  1
	}
      }
    }
  }
}
