⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nco.mdl

📁 一個有關於數值控制震盪器(NCO)的檔案,用Matlab的Simulink開啟即可.
💻 MDL
📖 第 1 页 / 共 5 页
字号:
      SampleTime	      "0"
    }
    Block {
      BlockType		      Reference
      Name		      "Spectrum\nScope"
      Ports		      [1]
      Position		      [1010, 275, 1045, 325]
      DialogController	      "dspdialog.SpectrumScope"
      DialogControllerArgs    "DataTag0"
      SourceBlock	      "dspsnks4/Spectrum\nScope"
      SourceType	      "Spectrum Scope"
      ShowPortLabels	      off
      SystemSampleTime	      "-1"
      FunctionWithSeparateData off
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      ScopeProperties	      on
      Domain		      "Frequency"
      HorizSpan		      "1"
      UseBuffer		      on
      BufferSize	      "2^14"
      Overlap		      "0"
      inpFftLenInherit	      on
      FFTlength		      "2^16"
      numAvg		      "5"
      DisplayProperties	      off
      AxisGrid		      on
      Memory		      off
      FrameNumber	      on
      AxisLegend	      off
      AxisZoom		      off
      OpenScopeAtSimStart     on
      OpenScopeImmediately    off
      FigPos		      "[460 313 560 420]"
      AxisProperties	      off
      XUnits		      "Hertz"
      XRange		      "[0...Fs/2]"
      InheritXIncr	      on
      XIncr		      "1.0"
      XLabel		      "Samples"
      YUnits		      "dB"
      YMin		      "-145.235454392048"
      YMax		      "43.7894800960686"
      YLabel		      "Magnitude-squared, dB"
      LineProperties	      off
      wintypeSpecScope	      "Bartlett"
      RsSpecScope	      "50"
      betaSpecScope	      "5"
      winsampSpecScope	      "Periodic"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Subsystem"
      Ports		      [0, 1]
      Position		      [15, 168, 70, 212]
      ShowName		      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      MaskHideContents	      off
      MaskPromptString	      "Desired Frequency (Hz) :"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskCallbackString      "if str2num(get_param(gcb, 'Freq'))>25e6\n  erro"
"r('Desired frequency must be smaller than half the sampling rate');\nend\n   "
" "
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "Freq=@1;"
      MaskDisplay	      "disp(Freq);\ndisp('\\n\\nHz');"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "2e6"
      System {
	Name			"Subsystem"
	Location		[99, 499, 771, 710]
	Open			on
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"213"
	Block {
	  BlockType		  Constant
	  Name			  " "
	  Position		  [25, 25, 55, 55]
	  Value			  "Freq"
	  VectorParams1D	  on
	  SamplingMode		  "Sample based"
	  OutDataTypeMode	  "double"
	  OutDataType		  "ufix(32)"
	  ConRadixGroup		  "Use specified scaling"
	  OutScaling		  "0"
	  SampleTime		  "T"
	  FramePeriod		  "inf"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Embedded\nMATLAB Function"
	  Ports			  [1, 1]
	  Position		  [130, 13, 200, 67]
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  MaskHideContents	  off
	  MaskType		  "Stateflow"
	  MaskDescription	  "Embedded MATLAB block"
	  MaskDisplay		  "disp('fcn');"
	  MaskSelfModifiable	  on
	  MaskIconFrame		  on
	  MaskIconOpaque	  off
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  System {
	    Name		    "Embedded\nMATLAB Function"
	    Location		    [257, 457, 812, 717]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Freq"
	      Position		      [20, 101, 40, 119]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Demux
	      Name		      " Demux "
	      Ports		      [1, 1]
	      Position		      [270, 160, 320, 200]
	      Outputs		      "1"
	    }
	    Block {
	      BlockType		      "S-Function"
	      Name		      " SFunction "
	      Tag		      "Stateflow S-Function NCO 3"
	      Ports		      [1, 2]
	      Position		      [180, 100, 230, 160]
	      FunctionName	      "sf_sfun"
	      Parameters	      "N,T"
	      PortCounts	      "[1 2]"
	      Port {
		PortNumber		2
		Name			"y"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Terminator
	      Name		      " Terminator "
	      Position		      [460, 171, 480, 189]
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "y"
	      Position		      [460, 101, 480, 119]
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Line {
	      SrcBlock		      " SFunction "
	      SrcPort		      1
	      Points		      [0, 65]
	      DstBlock		      " Demux "
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      " Demux "
	      SrcPort		      1
	      DstBlock		      " Terminator "
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Freq"
	      SrcPort		      1
	      DstBlock		      " SFunction "
	      DstPort		      1
	    }
	    Line {
	      Name		      "y"
	      Labels		      [0, 0]
	      SrcBlock		      " SFunction "
	      SrcPort		      2
	      DstBlock		      "y"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [280, 33, 310, 47]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  " "
	  SrcPort		  1
	  DstBlock		  "Embedded\nMATLAB Function"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Embedded\nMATLAB Function"
	  SrcPort		  1
	  DstBlock		  "Out1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Sum
      Name		      "Sum1"
      Ports		      [2, 1]
      Position		      [605, 275, 625, 295]
      Orientation	      "down"
      NamePlacement	      "alternate"
      ShowName		      off
      IconShape		      "round"
      Inputs		      "+|-"
      InputSameDT	      off
      OutDataTypeMode	      "uint32"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Sum
      Name		      "Sum2"
      Ports		      [2, 1]
      Position		      [490, 190, 510, 210]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|++"
      InputSameDT	      off
      OutDataTypeMode	      "uint32"
      OutDataType	      "sfix(33)"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Sum
      Name		      "Sum4"
      Ports		      [2, 1]
      Position		      [310, 190, 330, 210]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|++"
      InputSameDT	      off
      OutDataTypeMode	      "uint32"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      UnitDelay
      Name		      "Unit Delay"
      Position		      [135, 233, 170, 267]
      Orientation	      "left"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Scope
      Name		      "Floating\nScope"
      Ports		      []
      Position		      [185, 14, 215, 46]
      IOType		      "viewer"
      Floating		      on
      Location		      [129, 315, 453, 554]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      SaveName		      "ScopeData2"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      SignalViewerScope
      Name		      "Scope2"
      Ports		      []
      Position		      [20, 15, 60, 55]
      IOType		      "viewer"
      Location		      [188, 365, 512, 604]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      ShowDataMarkers	      off
      ShowLegends	      off
      DataFormat	      "Array"
      MaxDataPoints	      "7500"
      RefreshTime	      0.035000
      Disabled		      off
    }
    Block {
      BlockType		      SignalViewerScope
      Name		      "Scope3"
      Ports		      []
      Position		      [20, 15, 60, 55]
      IOType		      "viewer"
      Location		      [188, 365, 512, 604]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      ShowDataMarkers	      off
      ShowLegends	      off
      SaveName		      "ScopeData1"
      DataFormat	      "Array"
      MaxDataPoints	      "7500"
      RefreshTime	      0.035000
      Disabled		      off
    }
    Block {
      BlockType		      SignalViewerScope
      Name		      "Scope4"
      Ports		      []
      Position		      [20, 15, 60, 55]
      IOType		      "viewer"
      Location		      [188, 365, 512, 604]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      ShowDataMarkers	      off
      ShowLegends	      off
      SaveName		      "ScopeData2"
      DataFormat	      "Array"
      MaxDataPoints	      "7500"
      RefreshTime	      0.035000
      Disabled		      off
    }
    Block {
      BlockType		      SignalViewerScope
      Name		      "Scope5"
      Ports		      []
      Position		      [20, 15, 60, 55]
      IOType		      "viewer"
      Location		      [59, 70, 383, 309]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      ShowDataMarkers	      off
      ShowLegends	      off
      SaveName		      "ScopeData3"
      DataFormat	      "Array"
      MaxDataPoints	      "7500"
      RefreshTime	      0.035000
      Disabled		      off
    }
    Line {
      Name		      "counter"
      Labels		      [0, 0]
      SrcBlock		      "Add"
      SrcPort		      1
      Points		      [40, 0]
      Branch {
	Points			[0, 50]
	DstBlock		"Unit Delay"
	DstPort			1
      }
      Branch {
	DstBlock		"Sum4"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Unit Delay"
      SrcPort		      1
      Points		      [-20, 0; 0, -45]
      DstBlock		      "Add"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Subsystem"
      SrcPort		      1
      DstBlock		      "Add"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Look Up Table"
      SrcPort		      1
      DstBlock		      "Scope"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Look Up Table"
      SrcPort		      2
      Points		      [20, 0]
      Branch {
	DstBlock		"Scope"
	DstPort			2
      }
      Branch {
	Points			[0, 90]
	DstBlock		"Spectrum\nScope"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Extract Bits"
      SrcPort		      1
      Points		      [0, 0; 35, 0]
      Branch {
	DstBlock		"Look Up Table"
	DstPort			1
      }
      Branch {
	DstBlock		"Gain"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      " 1"
      SrcPort		      1
      Points		      [-30, 0]
      DstBlock		      "Manual Switch2"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Phase Dithering"
      SrcPort		      1
      DstBlock		      "Manual Switch2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Manual Switch2"
      SrcPort		      1
      Points		      [0, -75]
      DstBlock		      "Sum4"
      DstPort		      2
    }
    Line {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -