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

📄 pcmtest.mdl

📁 the simulink for pulse code modulation. design of a block diagram
💻 MDL
📖 第 1 页 / 共 2 页
字号:
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      Quantizer
      QuantizationInterval    "0.5"
      LinearizeAsGain	      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Scope
      ModelBased	      off
      TickLabels	      "OneTimeTick"
      ZoomMode		      "on"
      Grid		      "on"
      TimeRange		      "auto"
      YMin		      "-5"
      YMax		      "5"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      LimitDataPoints	      on
      MaxDataPoints	      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "-1"
    }
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      SFunctionModules	      "''"
      PortCounts	      "[]"
    }
    Block {
      BlockType		      Sin
      SineType		      "Time based"
      TimeSource	      "Use simulation time"
      Amplitude		      "1"
      Bias		      "0"
      Frequency		      "1"
      Phase		      "0"
      Samples		      "10"
      Offset		      "0"
      SampleTime	      "-1"
      VectorParams1D	      on
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      on
      Permissions	      "ReadWrite"
      PermitHierarchicalResolution "All"
      TreatAsAtomicUnit	      off
      SystemSampleTime	      "-1"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    Block {
      BlockType		      ToWorkspace
      VariableName	      "simulink_output"
      MaxDataPoints	      "1000"
      Decimation	      "1"
      SampleTime	      "0"
      FixptAsFi		      off
    }
    Block {
      BlockType		      TriggerPort
      TriggerType	      "rising"
      StatesWhenEnabling      "inherit"
      ShowOutputPort	      off
      OutputDataType	      "auto"
      SampleTimeType	      "triggered"
      SampleTime	      "1"
      ZeroCross		      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		    "PCMtest"
    Location		    [2, 78, 1278, 714]
    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		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Reference
      Name		      "Bit to Integer\nConverter"
      Ports		      [1, 1]
      Position		      [495, 198, 575, 242]
      SourceBlock	      "commutil2/Bit to Integer\nConverter"
      SourceType	      "Bit to Integer Converter"
      nbits		      "8"
      outDtype		      "Same as input"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "Encoder"
      Position		      [380, 411, 470, 439]
      List {
	ListType		RTWdata
	TLCFile			"extended_custcode"
	Location		"Subsystem Enable Function"
	Top			"/* Top Code */\n"
	Middle			"/*Middle Code */\n"
	Bottom			"/*Bottom Code*/\n"
	Unique			"Multiple"
	Key			""
      }
      VariableName	      "UniformEncoder"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      Scope
      Name		      "Input"
      Ports		      [1]
      Position		      [130, 269, 160, 301]
      Floating		      off
      Location		      [74, 131, 398, 370]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-1.5"
      YMax		      "1.5"
      SaveName		      "ScopeData5"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Input N PAM"
      Ports		      [1]
      Position		      [435, 44, 465, 76]
      Floating		      off
      Location		      [462, 409, 786, 648]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-1.5"
      YMax		      "1.5"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Input N PAM1"
      Ports		      [1]
      Position		      [870, 329, 900, 361]
      Floating		      off
      Location		      [81, 448, 405, 687]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-1.5"
      YMax		      "1.5"
      SaveName		      "ScopeData4"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Reference
      Name		      "Integer to Bit\nConverter1"
      Ports		      [1, 1]
      Position		      [370, 198, 450, 242]
      SourceBlock	      "commutil2/Integer to Bit\nConverter"
      SourceType	      "Integer to Bit Converter"
      nbits		      "8"
      outDtype		      "Same as input"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Ports		      [2, 1]
      Position		      [355, 116, 360, 154]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux1"
      Ports		      [2, 1]
      Position		      [820, 301, 825, 339]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      Scope
      Name		      "Output PAM"
      Ports		      [1]
      Position		      [845, 204, 875, 236]
      Floating		      off
      Location		      [469, 452, 793, 691]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-1.5"
      YMax		      "1.5"
      SaveName		      "ScopeData3"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "PAM"
      Ports		      [1]
      Position		      [280, 74, 310, 106]
      Floating		      off
      Location		      [173, 161, 497, 400]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-1.5"
      YMax		      "1.5"
      SaveName		      "ScopeData1"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "PCM"
      Ports		      [1]
      Position		      [560, 319, 590, 351]
      Floating		      off
      Location		      [363, 406, 687, 645]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-1.5"
      YMax		      "1.5"
      SaveName		      "ScopeData2"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "PCM Value"
      Position		      [515, 380, 575, 410]
      List {
	ListType		RTWdata
	TLCFile			"extended_custcode"
	Location		"Subsystem Enable Function"
	Top			"/* Top Code */\n"
	Middle			"/*Middle Code */\n"
	Bottom			"/*Bottom Code*/\n"
	Unique			"Multiple"
	Key			""
      }
      VariableName	      "PCM"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      Quantizer
      Name		      "Quantizer"
      Position		      [195, 130, 225, 160]
    }
    Block {
      BlockType		      Reference
      Name		      "Sample\nand Hold"
      Ports		      [1, 1, 0, 1]
      Position		      [105, 124, 155, 166]
      SourceBlock	      "dspswit2/Sample\nand Hold"
      SourceType	      "Sample and Hold"
      ShowPortLabels	      on
      SystemSampleTime	      "-1"
      FunctionWithSeparateData off
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      trig		      "Rising edge"
      initCond		      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wave"
      Ports		      [0, 1]
      Position		      [25, 130, 55, 160]
      SineType		      "Time based"
      Frequency		      "100*2*3.14"
      SampleTime	      "0"
    }
    Block {
      BlockType		      DiscretePulseGenerator
      Name		      "Trigger"
      Ports		      [0, 1]
      Position		      [85, 60, 115, 90]
    }
    Block {
      BlockType		      Reference
      Name		      "Uniform\nDecoder"
      Ports		      [1, 1]
      Position		      [600, 199, 670, 241]
      SourceBlock	      "dspquant2/Uniform\nDecoder"
      SourceType	      "Uniform Decoder"
      peak		      "1"
      bits		      "8"
      overflowMode	      "Saturate"
      otype		      "Double"
    }
    Block {
      BlockType		      Reference
      Name		      "Uniform\nEncoder"
      Ports		      [1, 1]
      Position		      [270, 199, 340, 241]
      SourceBlock	      "dspquant2/Uniform\nEncoder"
      SourceType	      "Uniform Encoder"
      peak		      "1"
      bits		      "8"
      otype		      "Unsigned integer"
    }
    Line {
      SrcBlock		      "Trigger"
      SrcPort		      1
      Points		      [10, 0]
      DstBlock		      "Sample\nand Hold"
      DstPort		      trigger
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      Points		      [35, 0; 0, -75]
      DstBlock		      "Input N PAM"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Sine Wave"
      SrcPort		      1
      Points		      [10, 0]
      Branch {
	DstBlock		"Sample\nand Hold"
	DstPort			1
      }
      Branch {
	Points			[0, -110; 265, 0; 0, 90]
	DstBlock		"Mux"
	DstPort			1
      }
      Branch {
	Points			[0, 140]
	Branch {
	  Points		  [0, 210; 675, 0; 0, -165]
	  DstBlock		  "Mux1"
	  DstPort		  2
	}
	Branch {
	  DstBlock		  "Input"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "Sample\nand Hold"
      SrcPort		      1
      DstBlock		      "Quantizer"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Quantizer"
      SrcPort		      1
      Points		      [25, 0]
      Branch {
	Points			[0, 0; 0, -55]
	DstBlock		"PAM"
	DstPort			1
      }
      Branch {
	Points			[5, 0]
	Branch {
	  DstBlock		  "Mux"
	  DstPort		  2
	}
	Branch {
	  Points		  [-5, 0]
	  DstBlock		  "Uniform\nEncoder"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "Uniform\nEncoder"
      SrcPort		      1
      Points		      [5, 0]
      Branch {
	DstBlock		"Integer to Bit\nConverter1"
	DstPort			1
      }
      Branch {
	Points			[0, 205]
	DstBlock		"Encoder"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Integer to Bit\nConverter1"
      SrcPort		      1
      Points		      [20, 0]
      Branch {
	DstBlock		"Bit to Integer\nConverter"
	DstPort			1
      }
      Branch {
	Points			[0, 115]
	Branch {
	  DstBlock		  "PCM"
	  DstPort		  1
	}
	Branch {
	  Points		  [0, 60]
	  DstBlock		  "PCM Value"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "Bit to Integer\nConverter"
      SrcPort		      1
      DstBlock		      "Uniform\nDecoder"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux1"
      SrcPort		      1
      Points		      [25, 0]
      DstBlock		      "Input N PAM1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Uniform\nDecoder"
      SrcPort		      1
      Points		      [70, 0]
      Branch {
	DstBlock		"Output PAM"
	DstPort			1
      }
      Branch {
	Points			[0, 90]
	DstBlock		"Mux1"
	DstPort			1
      }
    }
  }
}

⌨️ 快捷键说明

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