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

📄 ethernet.mdl

📁 CSMA / CD simulation code, Gigabit Ethernet previous versions used to compete for a unified approach
💻 MDL
📖 第 1 页 / 共 5 页
字号:
		Location		[244, 561, 418, 648]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "line"
		  Position		  [25, 18, 55, 32]
		  Port			  "1"
		  IconDisplay		  "Port number"
		  LatchInput		  off
		}
		Block {
		  BlockType		  Constant
		  Name			  "Constant"
		  Position		  [35, 58, 60, 82]
		  ShowName		  off
		  Value			  "0"
		}
		Block {
		  BlockType		  RelationalOperator
		  Name			  "Relational\nOperator"
		  Position		  [80, 27, 110, 58]
		  ShowName		  off
		  Operator		  "~="
		}
		Block {
		  BlockType		  Outport
		  Name			  "line_state"
		  Position		  [135, 38, 165, 52]
		  IconDisplay		  "Port number"
		  BusOutputAsStruct	  off
		}
		Line {
		  SrcBlock		  "Constant"
		  SrcPort		  1
		  DstBlock		  "Relational\nOperator"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "line"
		  SrcPort		  1
		  Points		  [0, 10]
		  DstBlock		  "Relational\nOperator"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Relational\nOperator"
		  SrcPort		  1
		  DstBlock		  "line_state"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator"
	      Ports		      [1, 1]
	      Position		      [165, 209, 195, 241]
	      ShowName		      off
	      Operator		      "NOT"
	    }
	    Block {
	      BlockType		      "S-Function"
	      Name		      "S-Function\n(buffer packet)"
	      Ports		      [2, 1]
	      Position		      [175, 110, 265, 170]
	      FunctionName	      "sf_rx"
	      Parameters	      "bufsize"
	      MaskPromptString	      "Buffer Size:"
	      MaskStyleString	      "edit"
	      MaskTunableValueString  "on"
	      MaskEnableString	      "on"
	      MaskVisibilityString    "on"
	      MaskToolTipString	      "on"
	      MaskVariables	      "bufsize=@1;"
	      MaskDisplay	      "port_label('input',1,'input');\nport_la"
"bel('input',2,'ctrl');\nport_label('output',1,'pkt');"
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	      MaskValueString	      "520"
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "pkt_end_detect"
	      Ports		      [1, 1, 1]
	      Position		      [160, 364, 260, 426]
	      FontName		      "MS Sans Serif"
	      TreatAsAtomicUnit	      on
	      MinAlgLoopOccurrences   off
	      RTWSystemCode	      "Auto"
	      System {
		Name			"pkt_end_detect"
		Location		[444, 311, 913, 495]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "rx_line"
		  Position		  [25, 68, 55, 82]
		  FontName		  "MS Sans Serif"
		  Port			  "1"
		  IconDisplay		  "Port number"
		  LatchInput		  off
		}
		Block {
		  BlockType		  EnablePort
		  Name			  "Enable"
		  Ports			  []
		  Position		  [165, 15, 185, 35]
		  StatesWhenEnabling	  "reset"
		}
		Block {
		  BlockType		  RelationalOperator
		  Name			  "Relational\nOperator"
		  Position		  [245, 67, 275, 98]
		  ShowName		  off
		  Operator		  "=="
		}
		Block {
		  BlockType		  Reference
		  Name			  "postamble"
		  Ports			  [0, 1]
		  Position		  [60, 129, 150, 161]
		  SourceBlock		  "dspsrcs2/Discrete\nConstant"
		  SourceType		  "Discrete Constant"
		  ShowPortLabels	  on
		  Value			  "-1"
		  Ts			  "1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "rx_pkt_end"
		  Position		  [370, 78, 400, 92]
		  FontName		  "MS Sans Serif"
		  IconDisplay		  "Port number"
		  BusOutputAsStruct	  off
		  OutputWhenDisabled	  "reset"
		  InitialOutput		  "0"
		}
		Line {
		  SrcBlock		  "Relational\nOperator"
		  SrcPort		  1
		  DstBlock		  "rx_pkt_end"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "rx_line"
		  SrcPort		  1
		  DstBlock		  "Relational\nOperator"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "postamble"
		  SrcPort		  1
		  Points		  [75, 0]
		  DstBlock		  "Relational\nOperator"
		  DstPort		  2
		}
	      }
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "rx ID check"
	      Ports		      [2, 1, 1]
	      Position		      [155, 249, 265, 316]
	      FontName		      "MS Sans Serif"
	      TreatAsAtomicUnit	      on
	      MinAlgLoopOccurrences   off
	      RTWSystemCode	      "Auto"
	      System {
		Name			"rx ID check"
		Location		[694, 240, 916, 387]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "rx_line"
		  Position		  [25, 48, 55, 62]
		  FontName		  "MS Sans Serif"
		  Port			  "1"
		  IconDisplay		  "Port number"
		  LatchInput		  off
		}
		Block {
		  BlockType		  Inport
		  Name			  "myID"
		  Position		  [25, 83, 55, 97]
		  FontName		  "MS Sans Serif"
		  Port			  "2"
		  IconDisplay		  "Port number"
		  LatchInput		  off
		}
		Block {
		  BlockType		  EnablePort
		  Name			  "Enable"
		  Ports			  []
		  Position		  [100, 15, 120, 35]
		  StatesWhenEnabling	  "reset"
		}
		Block {
		  BlockType		  RelationalOperator
		  Name			  "Relational\nOperator"
		  Position		  [80, 62, 110, 93]
		  ShowName		  off
		  Operator		  "=="
		}
		Block {
		  BlockType		  Outport
		  Name			  "pkt_incoming"
		  Position		  [135, 73, 165, 87]
		  FontName		  "MS Sans Serif"
		  IconDisplay		  "Port number"
		  BusOutputAsStruct	  off
		  OutputWhenDisabled	  "reset"
		  InitialOutput		  "0"
		}
		Line {
		  SrcBlock		  "rx_line"
		  SrcPort		  1
		  Points		  [0, 15]
		  DstBlock		  "Relational\nOperator"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Relational\nOperator"
		  SrcPort		  1
		  DstBlock		  "pkt_incoming"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "myID"
		  SrcPort		  1
		  Points		  [0, -5]
		  DstBlock		  "Relational\nOperator"
		  DstPort		  2
		}
	      }
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "line_state"
	      Position		      [370, 493, 400, 507]
	      FontName		      "MS Sans Serif"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "rx_pkt_incoming"
	      Position		      [370, 278, 400, 292]
	      FontName		      "MS Sans Serif"
	      Port		      "2"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "rx_pkt_end"
	      Position		      [370, 388, 400, 402]
	      FontName		      "MS Sans Serif"
	      Port		      "3"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "payload"
	      Position		      [370, 133, 400, 147]
	      FontName		      "MS Sans Serif"
	      FontSize		      8
	      Port		      "4"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Line {
	      SrcBlock		      "Logical\nOperator"
	      SrcPort		      1
	      Points		      [10, 0]
	      DstBlock		      "rx ID check"
	      DstPort		      enable
	    }
	    Line {
	      SrcBlock		      "input from rx"
	      SrcPort		      1
	      Points		      [40, 0]
	      Branch {
		Points			[0, 140]
		Branch {
		  Points		  [0, 130]
		  Branch {
		    DstBlock		    "pkt_end_detect"
		    DstPort		    1
		  }
		  Branch {
		    Points		    [0, 105]
		    DstBlock		    "Line activity\ndetect"
		    DstPort		    1
		  }
		}
		Branch {
		  DstBlock		  "rx ID check"
		  DstPort		  1
		}
	      }
	      Branch {
		DstBlock		"S-Function\n(buffer packet)"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Line activity\ndetect"
	      SrcPort		      1
	      DstBlock		      "line_state"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "receive"
	      SrcPort		      1
	      Points		      [55, 0; 0, 70]
	      Branch {
		Points			[0, 70]
		Branch {
		  Labels		  [1, 0]
		  Points		  [0, 115; 85, 0]
		  DstBlock		  "pkt_end_detect"
		  DstPort		  enable
		}
		Branch {
		  DstBlock		  "Logical\nOperator"
		  DstPort		  1
		}
	      }
	      Branch {
		DstBlock		"S-Function\n(buffer packet)"
		DstPort			2
	      }
	    }
	    Line {
	      SrcBlock		      "rx ID check"
	      SrcPort		      1
	      DstBlock		      "rx_pkt_incoming"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "pkt_end_detect"
	      SrcPort		      1
	      DstBlock		      "rx_pkt_end"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "myID"
	      SrcPort		      1
	      Points		      [20, 0; 0, 135]
	      DstBlock		      "rx ID check"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "S-Function\n(buffer packet)"
	      SrcPort		      1
	      DstBlock		      "payload"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "TX"
	  Ports			  [5, 3]
	  Position		  [805, 55, 940, 225]
	  FontName		  "Arial"
	  FontSize		  12
	  TreatAsAtomicUnit	  off
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  System {
	    Name		    "TX"
	    Location		    [97, 156, 942, 529]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "transmit"
	      Position		      [335, 38, 365, 52]
	      Port		      "1"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "pop_queue"
	      Position		      [175, 248, 205, 262]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "push_queue"
	      Position		      [175, 188, 205, 202]
	      Port		      "3"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "destID"
	      Position		      [20, 103, 50, 117]
	      Port		      "4"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "payload"
	      Position		      [20, 148, 50, 162]
	      Port		      "5"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Integer Delay1"
	      Ports		      [1, 1]
	      Position		      [530, 279, 565, 311]
	      Orientation	      "left"
	      ShowName		      off
	      SourceBlock	      "dspbdsp2/Integer Delay"
	      SourceType	      "Integer Delay"
	      ShowPortLabels	      on
	      delay		      "1"
	      ic		      "0"
	      frame		      off
	      df		      on
	      numChans		      "1"
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator1"
	      Ports		      [2, 1]
	      Position		      [530, 226, 560, 259]
	      ShowName		      off
	      Operator		      "XOR"
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator3"
	      Ports		      [2, 1]
	      Position		      [470, 216, 500, 249]
	      ShowName		      off
	      Operator		      "NOR"
	    }
	    Block {
	      BlockType		      Mux
	      Name		      "Mux"
	      Ports		      [4, 1]
	      Position		      [140, 39, 145, 226]
	      ShowName		      off
	      DisplayOption	      "bar"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Queue"
	      Ports		      [3, 2]
	      Position		      [235, 107, 355, 283]
	      SourceBlock	      "dspbuff3/Queue"
	      SourceType	      "Queue"
	      depth		      "12"
	      trigger		      "Either edge"
	      overflow		      "Dynamic reallocation"
	      pes		      "Ignore"
	      eso		 

⌨️ 快捷键说明

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