📄 conversion_code.mdl
字号:
UtilityFuncGeneration "Auto"
GenerateFullHeader on
GenerateSampleERTMain off
IsPILTarget off
ModelReferenceCompliant on
IncludeMdlTerminateFcn on
CombineOutputUpdateFcns off
SuppressErrorStatus off
IncludeFileDelimiter "Auto"
ERTCustomFileBanners off
SupportAbsoluteTime on
LogVarNameModifier "rt_"
MatFileLogging on
MultiInstanceERTCode off
SupportNonFinite on
SupportComplex on
PurelyIntegerCode off
SupportContinuousTime on
SupportNonInlinedSFcns on
ExtMode off
ExtModeStaticAlloc off
ExtModeTesting off
ExtModeStaticAllocSize 1000000
ExtModeTransport 0
ExtModeMexFile "ext_comm"
RTWCAPISignals off
RTWCAPIParams off
RTWCAPIStates off
GenerateASAP2 off
}
PropName "Components"
}
}
PropName "Components"
}
Name "Configuration"
SimulationMode "normal"
CurrentDlgPage "Diagnostics"
}
PropName "ConfigurationSets"
}
Simulink.ConfigSet {
$PropName "ActiveConfigurationSet"
$ObjectID 1
}
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Constant
Value "1"
VectorParams1D on
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
}
Block {
BlockType FrameConversion
OutFrame "Frame based"
}
Block {
BlockType Ground
}
Block {
BlockType Inport
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Outport
Port "1"
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 RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross on
SampleTime "-1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
}
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 "conversion_code"
Location [2, 70, 1438, 851]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "AWGN\nChannel"
Ports [1, 1]
Position [595, 209, 675, 251]
SourceBlock "commchan2/AWGN\nChannel"
SourceType "AWGN Channel"
ShowPortLabels on
seed "67"
noiseMode "Signal to noise ratio (Eb/No)"
EbNodB "SNR"
EsNodB "10"
SNRdB "10"
bitsPerSym "1"
Ps "1"
Tsym "1e-5"
variance "1"
}
Block {
BlockType Reference
Name "BPSK\nDemodulator\nBaseband"
Ports [1, 1]
Position [730, 206, 805, 254]
SourceBlock "commdigbbndpm2/BPSK\nDemodulator\nBaseband"
SourceType "BPSK Demodulator Baseband"
ShowPortLabels on
Ph "0"
numSamp "1"
}
Block {
BlockType Reference
Name "BPSK\nModulator\nBaseband"
Ports [1, 1]
Position [470, 206, 545, 254]
SourceBlock "commdigbbndpm2/BPSK\nModulator\nBaseband"
SourceType "BPSK Modulator Baseband"
ShowPortLabels on
Ph "0"
numSamp "1"
}
Block {
BlockType Reference
Name "Bernoulli Binary\nGenerator"
Ports [0, 1]
Position [20, 208, 100, 252]
FontName "Arial"
SourceBlock "commrandsrc2/Bernoulli Binary\nGenerator"
SourceType "Bernoulli Binary Generator"
ShowPortLabels on
P "0.5"
seed "61"
Ts "1e-5"
frameBased off
sampPerFrame "1"
orient off
}
Block {
BlockType Reference
Name "Buffer"
Ports [1, 1]
Position [485, 95, 535, 145]
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "20"
V "0"
ic "0"
}
Block {
BlockType Reference
Name "Buffer1"
Ports [1, 1]
Position [370, 205, 420, 255]
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "40"
V "0"
ic "0"
}
Block {
BlockType "S-Function"
Name "Conversion Encoder"
Ports [1, 1]
Position [160, 215, 220, 245]
FunctionName "encode"
}
Block {
BlockType Reference
Name "Error Rate\nCalculation"
Ports [2]
Position [1150, 191, 1225, 244]
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "0"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Workspace"
WsName "BitErrorRate"
RsMode2 off
stop off
numErr "100"
maxBits "1e6"
}
Block {
BlockType FrameConversion
Name "Frame Conversion"
Position [270, 210, 325, 250]
OutFrame "Frame based"
}
Block {
BlockType FrameConversion
Name "Frame Conversion1"
Position [855, 210, 910, 250]
OutFrame "Sample based"
}
Block {
BlockType FrameConversion
Name "Frame Conversion3"
Position [1040, 210, 1095, 250]
OutFrame "Frame based"
}
Block {
BlockType "S-Function"
Name "S-Function1"
Ports [1, 1]
Position [940, 215, 1000, 245]
FunctionName "decode"
}
Line {
SrcBlock "Bernoulli Binary\nGenerator"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Conversion Encoder"
DstPort 1
}
Branch {
Points [0, -110]
DstBlock "Buffer"
DstPort 1
}
}
Line {
SrcBlock "BPSK\nModulator\nBaseband"
SrcPort 1
DstBlock "AWGN\nChannel"
DstPort 1
}
Line {
SrcBlock "Conversion Encoder"
SrcPort 1
DstBlock "Frame Conversion"
DstPort 1
}
Line {
SrcBlock "Frame Conversion"
SrcPort 1
DstBlock "Buffer1"
DstPort 1
}
Line {
SrcBlock "BPSK\nDemodulator\nBaseband"
SrcPort 1
DstBlock "Frame Conversion1"
DstPort 1
}
Line {
SrcBlock "Frame Conversion1"
SrcPort 1
DstBlock "S-Function1"
DstPort 1
}
Line {
SrcBlock "S-Function1"
SrcPort 1
DstBlock "Frame Conversion3"
DstPort 1
}
Line {
SrcBlock "Buffer"
SrcPort 1
Points [570, 0; 0, 85]
DstBlock "Error Rate\nCalculation"
DstPort 1
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
DstBlock "BPSK\nDemodulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "Buffer1"
SrcPort 1
DstBlock "BPSK\nModulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "Frame Conversion3"
SrcPort 1
DstBlock "Error Rate\nCalculation"
DstPort 2
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -