📄 ethernet.mdl
字号:
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Port {
PortNumber 1
Name "Node 3 TX Activity"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
System {
Name "Line activity\ndetect4"
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 Mux
Name "Mux"
Ports [3, 1]
Position [205, 117, 210, 163]
ShowName off
Inputs "3"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [3, 1]
Position [205, 217, 210, 263]
ShowName off
Inputs "3"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux2"
Ports [3, 1]
Position [205, 317, 210, 363]
ShowName off
Inputs "3"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux3"
Ports [3, 1]
Position [205, 417, 210, 463]
ShowName off
Inputs "3"
DisplayOption "bar"
}
Block {
BlockType SubSystem
Name "Node0"
Ports [1, 4]
Position [80, 101, 160, 164]
FontName "MS Sans Serif"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Node0"
Location [36, 97, 979, 714]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "82"
Block {
BlockType Inport
Name "rx"
Position [590, 423, 620, 437]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType SubSystem
Name "CSMA/CD media access control"
Ports [1, 7, 0, 1]
Position [190, 217, 390, 453]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Array {
Type "Handle"
Dimension 0
PropName "AvailSigsLoadSave"
}
MaskType "Stateflow"
MaskDescription "Stateflow diagram"
MaskDisplay "plot(sf('Private','sfblk','xIcon'),sf('Priv"
"ate','sfblk','yIcon'));text(0.5,0,sf('Private', 'sfblk', 'tIcon'),'Horizontal"
"Al','Center','VerticalAl','Bottom');"
MaskSelfModifiable on
MaskIconFrame off
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "CSMA/CD media access control"
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "line_state"
Position [20, 101, 40, 119]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType TriggerPort
Name " input events "
Ports [0, 1]
Position [20, 136, 40, 154]
TriggerType "either"
ShowOutputPort on
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 350, 320, 390]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function ethernet 1"
Ports [2, 8]
Position [180, 105, 230, 285]
FunctionName "sf_sfun"
PortCounts "[2 8]"
Port {
PortNumber 2
Name "transmit"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
Port {
PortNumber 3
Name "receive"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
Port {
PortNumber 4
Name "t_max"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
Port {
PortNumber 5
Name "set_timer"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
Port {
PortNumber 6
Name "tx_pop_queue"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
Port {
PortNumber 7
Name "rx_pkt_out"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
Port {
PortNumber 8
Name "tx_pkt_dropped"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 361, 480, 379]
}
Block {
BlockType Outport
Name "transmit"
Position [460, 101, 480, 119]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "receive"
Position [460, 136, 480, 154]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "t_max"
Position [460, 171, 480, 189]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "set_timer"
Position [460, 206, 480, 224]
Port "4"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "tx_pop_queue"
Position [460, 246, 480, 264]
Port "5"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "rx_pkt_out"
Position [460, 281, 480, 299]
Port "6"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "tx_pkt_dropped"
Position [460, 316, 480, 334]
Port "7"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [0, 245]
DstBlock " Demux "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock "line_state"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
SrcBlock " input events "
SrcPort 1
Points [120, 0]
DstBlock " SFunction "
DstPort 2
}
Line {
Name "transmit"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "transmit"
DstPort 1
}
Line {
Name "receive"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 3
DstBlock "receive"
DstPort 1
}
Line {
Name "t_max"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 4
DstBlock "t_max"
DstPort 1
}
Line {
Name "set_timer"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 5
DstBlock "set_timer"
DstPort 1
}
Line {
Name "tx_pop_queue"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 6
DstBlock "tx_pop_queue"
DstPort 1
}
Line {
Name "rx_pkt_out"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 7
DstBlock "rx_pkt_out"
DstPort 1
}
Line {
Name "tx_pkt_dropped"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 8
DstBlock "tx_pkt_dropped"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Collision detect"
Ports [2, 1, 1]
Position [855, 560, 930, 620]
FontName "MS Sans Serif"
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Collision detect"
Location [466, 431, 881, 578]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Rx"
Position [25, 42, 55, 58]
FontName "MS Sans Serif"
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "Tx"
Position [25, 82, 55, 98]
FontName "MS Sans Serif"
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType EnablePort
Name "Enable"
Ports []
Position [175, 15, 195, 35]
StatesWhenEnabling "reset"
}
Block {
BlockType Reference
Name "Integer Delay"
Ports [1, 1]
Position [80, 72, 120, 108]
ShowName off
SourceBlock "dspobslib/Integer Delay"
SourceType "Integer Delay"
delay "0"
ic "0"
reset_popup "None"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [160, 67, 190, 98]
ShowName off
Operator "~="
}
Block {
BlockType Outport
Name "collision"
Position [280, 78, 310, 92]
FontName "MS Sans Serif"
IconDisplay "Port number"
BusOutputAsStruct off
OutputWhenDisabled "reset"
InitialOutput "0"
}
Line {
SrcBlock "Integer Delay"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "Rx"
SrcPort 1
Points [85, 0]
DstBlock "Relational\nOperator"
DstPort 1
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
DstBlock "collision"
DstPort 1
}
Line {
SrcBlock "Tx"
SrcPort 1
DstBlock "Integer Delay"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Counter"
Ports [1, 1]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -