📄 ethernet.mdl
字号:
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Rounding
Operator "floor"
SampleTime "-1"
}
Block {
BlockType Saturate
UpperLimit "0.5"
LowerLimit "-0.5"
LinearizeAsGain on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Scope
Floating off
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 "0"
}
Block {
BlockType "S-Function"
FunctionName "system"
PortCounts "[]"
SFunctionModules "''"
}
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"
}
Block {
BlockType Terminator
}
Block {
BlockType TriggerPort
TriggerType "rising"
StatesWhenEnabling "inherit"
ShowOutputPort off
OutputDataType "auto"
SampleTimeType "triggered"
SampleTime "1"
ZeroCross on
}
Block {
BlockType UniformRandomNumber
Minimum "-1"
Maximum "1"
Seed "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType ZeroOrderHold
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 "ethernet"
Location [46, 95, 567, 610]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 212
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Display
Name "Display"
Ports [1]
Position [280, 109, 360, 171]
ShowName off
Decimation "1"
}
Block {
BlockType Display
Name "Display1"
Ports [1]
Position [280, 209, 360, 271]
ShowName off
Decimation "1"
}
Block {
BlockType Display
Name "Display2"
Ports [1]
Position [280, 309, 360, 371]
ShowName off
Decimation "1"
}
Block {
BlockType Display
Name "Display3"
Ports [1]
Position [280, 409, 360, 471]
ShowName off
Decimation "1"
}
Block {
BlockType From
Name "From"
Position [370, 412, 420, 428]
ShowName off
DialogController "Simulink.DDGSource"
CloseFcn "tagdialog Close"
GotoTag "node0"
}
Block {
BlockType From
Name "From1"
Position [370, 427, 420, 443]
ShowName off
DialogController "Simulink.DDGSource"
CloseFcn "tagdialog Close"
GotoTag "node1"
}
Block {
BlockType From
Name "From2"
Position [370, 442, 420, 458]
ShowName off
DialogController "Simulink.DDGSource"
CloseFcn "tagdialog Close"
GotoTag "node2"
}
Block {
BlockType From
Name "From3"
Position [370, 457, 420, 473]
ShowName off
DialogController "Simulink.DDGSource"
CloseFcn "tagdialog Close"
GotoTag "node3"
}
Block {
BlockType Goto
Name "Goto"
Position [400, 87, 450, 103]
ShowName off
DialogController "Simulink.DDGSource"
GotoTag "node0"
TagVisibility "local"
}
Block {
BlockType Goto
Name "Goto1"
Position [400, 188, 450, 202]
ShowName off
DialogController "Simulink.DDGSource"
GotoTag "node1"
TagVisibility "local"
}
Block {
BlockType Goto
Name "Goto2"
Position [400, 288, 450, 302]
ShowName off
DialogController "Simulink.DDGSource"
GotoTag "node2"
TagVisibility "local"
}
Block {
BlockType Goto
Name "Goto3"
Position [395, 388, 450, 402]
ShowName off
DialogController "Simulink.DDGSource"
GotoTag "node3"
TagVisibility "local"
}
Block {
BlockType SubSystem
Name "Line activity\ndetect1"
Ports [1, 1]
Position [205, 87, 275, 103]
ShowName off
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Port {
PortNumber 1
Name "Node 0 TX Activity "
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
System {
Name "Line activity\ndetect1"
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 "Relational\nOperator"
SrcPort 1
DstBlock "line_state"
DstPort 1
}
Line {
SrcBlock "line"
SrcPort 1
Points [0, 10]
DstBlock "Relational\nOperator"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Line activity\ndetect2"
Ports [1, 1]
Position [205, 187, 275, 203]
ShowName off
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Port {
PortNumber 1
Name "Node 1 TX Activity"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
System {
Name "Line activity\ndetect2"
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 SubSystem
Name "Line activity\ndetect3"
Ports [1, 1]
Position [205, 287, 275, 303]
ShowName off
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Port {
PortNumber 1
Name "Node 2 TX Activity"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
System {
Name "Line activity\ndetect3"
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 "Relational\nOperator"
SrcPort 1
DstBlock "line_state"
DstPort 1
}
Line {
SrcBlock "line"
SrcPort 1
Points [0, 10]
DstBlock "Relational\nOperator"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Line activity\ndetect4"
Ports [1, 1]
Position [205, 387, 275, 403]
ShowName off
TreatAsAtomicUnit off
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -