📄 msk.mdl
字号:
Inputs "2"
IconShape "rectangular"
AllPortsSameDT on
OutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
SampleTime "-1"
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
UseBusObject off
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType Outport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
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 RandomNumber
Mean "0"
Variance "1"
Seed "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType Reference
}
Block {
BlockType RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross 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 StateSpace
A "1"
B "1"
C "1"
D "1"
X0 "0"
AbsoluteTolerance "auto"
Realization "auto"
}
Block {
BlockType Step
Time "1"
Before "0"
After "1"
SampleTime "-1"
VectorParams1D on
ZeroCross 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 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 TransportDelay
DelayTime "1"
InitialOutput "0"
BufferSize "1024"
FixedBuffer off
TransDelayFeedthrough off
PadeOrder "0"
}
Block {
BlockType UnitDelay
X0 "0"
SampleTime "1"
StateMustResolveToSignalObject off
RTWStateStorageClass "Auto"
}
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 "msk"
Location [6, 190, 1018, 594]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.196850, 0.196850, 0.196850, 0.196850]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "Channel"
Ports [1, 1]
Position [465, 84, 545, 126]
SourceBlock "librnew/Channel"
SourceType "AWGN channel, fixed parameter"
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"
m "0"
variance "0.001"
s "12345"
}
Block {
BlockType SubSystem
Name "Error rate"
Ports [2]
Position [465, 215, 545, 255]
Orientation "down"
CopyFcn "sbiterr([],[],[],'CopyBlock')"
DeleteFcn "sbiterr([],[],[],'DeleteBlock')"
LoadFcn "sbiterr([],[],[],'LoadBlock')"
StartFcn "sbiterr([],[],[],'Start')"
StopFcn "sbiterr([],[],[],'Stop')"
NameChangeFcn "sbiterr([],[],[],'NameChange')"
ShowPortLabels off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "Symbol/bit error counter"
MaskDescription "Use the input data from the 1st port as the ref"
"erence signal to detect the number of errors and error rate of the 2nd signal"
"."
MaskHelp "The signal from the first port must be a scalar"
". The second input port can be a vector with a delay to the first port signal"
". The comparison happens only at the sampling point."
MaskPromptString "Bit per symbol:|Number of digits on display:|De"
"lay between 1st port and 2nd port:|Sample time (sec):"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskInitialization "K=@1;num_lin=@2;TDelay=@3;Sample=@4;"
MaskDisplay "disp('Error\\nmeter')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "1|10|2|1"
MaskTabNameString ",,,"
System {
Name "Error rate"
Location [347, 402, 949, 697]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.196850, 0.196850, 0.196850, 0.196850]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [75, 15, 95, 35]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "in_2"
Position [75, 135, 95, 155]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Constant
Name "Constant"
Position [130, 200, 150, 220]
Orientation "up"
ShowName off
Value "0"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Constant
Name "Constant1"
Position [135, 65, 155, 85]
Orientation "up"
ShowName off
Value "0"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [270, 51, 305, 84]
Inputs "2"
}
Block {
BlockType "S-Function"
Name "S-function"
Ports [1]
Position [335, 57, 400, 83]
FunctionName "sbiterr"
Parameters "num_lin, K, TDelay, Sample"
}
Block {
BlockType Switch
Name "Schalter1"
Position [160, 149, 190, 181]
ShowName off
Threshold "1"
}
Block {
BlockType Switch
Name "Schalter2"
Position [160, 19, 190, 51]
ShowName off
Threshold "1"
}
Block {
BlockType Step
Name "Step Input"
Position [75, 190, 95, 210]
Time "3"
SampleTime "1"
}
Block {
BlockType Step
Name "Step Input1"
Position [75, 60, 95, 80]
SampleTime "1"
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "S-function"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Schalter2"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "Schalter2"
DstPort 3
}
Line {
SrcBlock "Step Input1"
SrcPort 1
Points [20, 0; 0, -35]
DstBlock "Schalter2"
DstPort 2
}
Line {
SrcBlock "Schalter2"
SrcPort 1
Points [30, 0; 0, 25]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "in_2"
SrcPort 1
Points [20, 0; 0, 10]
DstBlock "Schalter1"
DstPort 1
}
Line {
SrcBlock "Step Input"
SrcPort 1
Points [20, 0; 0, -35]
DstBlock "Schalter1"
DstPort 2
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [0, -20]
DstBlock "Schalter1"
DstPort 3
}
Line {
SrcBlock "Schalter1"
SrcPort 1
Points [30, 0; 0, -90]
DstBlock "Mux"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Receiver"
Ports [1, 2]
Position [645, 59, 720, 146]
ShowPortLabels off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Receiver"
Location [10, 106, 1022, 436]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -