📄 xinyi.mdl
字号:
ConstantPart "0"
SampleTime "-1"
}
Block {
BlockType Math
Operator "exp"
OutputSignalType "auto"
SampleTime "-1"
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
BusObject "BusObject"
NonVirtualBus off
}
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 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 "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 Terminator
}
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 "xinyi2"
Location [2, 52, 1014, 717]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "101"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "AWGN\nChannel"
Ports [1, 1]
Position [934, 145, 976, 225]
Orientation "down"
NamePlacement "alternate"
SourceBlock "commchan2/AWGN\nChannel"
SourceType "AWGN Channel"
ShowPortLabels on
seed "1237"
noiseMode "Signal to noise ratio (Es/No)"
EbNodB "10"
EsNodB "10"
SNRdB "10"
bitsPerSym "1"
Ps "1"
Tsym "1"
variance "1"
}
Block {
BlockType Reference
Name "BCH Decoder"
Ports [1, 2]
Position [485, 330, 565, 370]
Orientation "left"
NamePlacement "alternate"
SourceBlock "commblkcod2/BCH Decoder"
SourceType "BCH Decoder"
ShowPortLabels on
n "15"
k "5"
showNumErr on
}
Block {
BlockType Reference
Name "BCH Encoder"
Ports [1, 1]
Position [555, 28, 635, 72]
SourceBlock "commblkcod2/BCH Encoder"
SourceType "BCH Encoder"
ShowPortLabels on
n "15"
k "5"
}
Block {
BlockType Reference
Name "Bernoulli Binary\nGenerator"
Ports [0, 1]
Position [255, 153, 335, 197]
FontName "Arial"
SourceBlock "commrandsrc2/Bernoulli Binary\nGenerator"
SourceType "Bernoulli Binary Generator"
ShowPortLabels on
P "0.5"
seed "61"
Ts "1"
frameBased off
sampPerFrame "1"
orient off
}
Block {
BlockType Display
Name "Display"
Ports [1]
Position [110, 435, 200, 465]
Format "short_e"
Decimation "1"
}
Block {
BlockType Reference
Name "Edge\nDetector"
Ports [1, 1]
Position [705, 420, 755, 460]
Orientation "left"
SourceBlock "dspswit3/Edge\nDetector"
SourceType "Edge Detector"
ShowPortLabels on
}
Block {
BlockType Reference
Name "Error Rate Calculation"
Ports [2, 1]
Position [100, 310, 185, 365]
Orientation "left"
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "0"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Port"
WsName "ErrorVec"
RsMode2 off
stop off
numErr "100"
maxBits "1e6"
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [2, 1]
Position [350, 22, 380, 53]
Operator "XOR"
AllPortsSameDT off
}
Block {
BlockType Logic
Name "Logical\nOperator1"
Ports [2, 1]
Position [475, 32, 505, 63]
Operator "XOR"
AllPortsSameDT off
}
Block {
BlockType Logic
Name "Logical\nOperator2"
Ports [2, 1]
Position [305, 332, 335, 363]
Orientation "left"
Operator "XOR"
AllPortsSameDT off
}
Block {
BlockType Reference
Name "M-PSK\nDemodulator\nBaseband"
Ports [1, 1]
Position [695, 315, 770, 365]
Orientation "left"
SourceBlock "commdigbbndpm2/M-PSK\nDemodulator\nBaseband"
SourceType "M-PSK Demodulator Baseband"
M "8"
OutType "Integer"
Dec "Binary"
Ph "pi/8"
numSamp "1"
}
Block {
BlockType Reference
Name "M-PSK\nModulator\nBaseband"
Ports [1, 1]
Position [675, 24, 750, 76]
SourceBlock "commdigbbndpm2/M-PSK\nModulator\nBaseband"
SourceType "M-PSK Modulator Baseband"
M "8"
InType "Integer"
Enc "Binary"
Ph "pi/8"
numSamp "1"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [620, 331, 625, 369]
Orientation "left"
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Reference
Name "PM\nDemodulator\nBaseband"
Ports [1, 1]
Position [830, 317, 905, 363]
Orientation "left"
SourceBlock "commanabbnd2/PM\nDemodulator\nBaseband"
SourceType "PM Demodulator Baseband"
ShowPortLabels on
Ph "0"
Kc "1"
num "[4.57 9.14 4.57]*.01"
den "[1 -1.3108 .4936]"
HzPerVolt "1"
ts "0.001"
}
Block {
BlockType Reference
Name "PM\nModulator\nBaseband"
Ports [1, 1]
Position [810, 27, 885, 73]
SourceBlock "commanabbnd2/PM\nModulator\nBaseband"
SourceType "PM Modulator Baseband"
ShowPortLabels on
Ph "0"
Kc "1"
}
Block {
BlockType Reference
Name "PN Sequence\nGenerator"
Ports [0, 1]
Position [245, 68, 325, 112]
SourceBlock "commseqgen2/PN Sequence\nGenerator"
SourceType "PN Sequence Generator"
poly "[1 1 0 1 1]"
ini_sta "[1 1 0 1]"
shift "0"
Ts "1"
frameBased off
sampPerFrame "1"
reset off
}
Block {
BlockType Reference
Name "PN Sequence\nGenerator1"
Ports [0, 1]
Position [265, 443, 345, 487]
SourceBlock "commseqgen2/PN Sequence\nGenerator"
SourceType "PN Sequence Generator"
poly "[1 1 0 1 1]"
ini_sta "[1 1 0 1]"
shift "0"
Ts "1"
frameBased off
sampPerFrame "1"
reset off
}
Block {
BlockType DiscretePulseGenerator
Name "Pulse\nGenerator"
Ports [0, 1]
Position [830, 423, 875, 457]
Orientation "left"
PulseType "Time based"
PulseWidth "50"
}
Block {
BlockType RandomNumber
Name "Random\nNumber"
Position [95, 15, 125, 45]
SampleTime "0"
}
Block {
BlockType Terminator
Name "Terminator"
Position [405, 390, 425, 410]
Orientation "left"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [375, 156, 410, 194]
}
Line {
SrcBlock "M-PSK\nModulator\nBaseband"
SrcPort 1
DstBlock "PM\nModulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "PM\nModulator\nBaseband"
SrcPort 1
Points [65, 0]
DstBlock "AWGN\nChannel"
DstPort 1
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
Points [0, 110]
DstBlock "PM\nDemodulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "PM\nDemodulator\nBaseband"
SrcPort 1
DstBlock "M-PSK\nDemodulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "Pulse\nGenerator"
SrcPort 1
DstBlock "Edge\nDetector"
DstPort 1
}
Line {
SrcBlock "Bernoulli Binary\nGenerator"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
Points [0, -120]
DstBlock "Logical\nOperator1"
DstPort 2
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
DstBlock "Logical\nOperator1"
DstPort 1
}
Line {
SrcBlock "Logical\nOperator1"
SrcPort 1
DstBlock "BCH Encoder"
DstPort 1
}
Line {
SrcBlock "BCH Encoder"
SrcPort 1
DstBlock "M-PSK\nModulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "PN Sequence\nGenerator1"
SrcPort 1
Points [10, 0; 0, -110]
DstBlock "Logical\nOperator2"
DstPort 2
}
Line {
SrcBlock "Logical\nOperator2"
SrcPort 1
DstBlock "Error Rate Calculation"
DstPort 2
}
Line {
SrcBlock "PN Sequence\nGenerator"
SrcPort 1
Points [0, -45]
DstBlock "Logical\nOperator"
DstPort 2
}
Line {
SrcBlock "Random\nNumber"
SrcPort 1
Points [95, 0]
Branch {
DstBlock "Logical\nOperator"
DstPort 1
}
Branch {
Points [0, 295]
DstBlock "Error Rate Calculation"
DstPort 1
}
}
Line {
SrcBlock "M-PSK\nDemodulator\nBaseband"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Edge\nDetector"
SrcPort 1
Points [-25, 0; 0, -80]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "BCH Decoder"
DstPort 1
}
Line {
SrcBlock "BCH Decoder"
SrcPort 2
Points [-25, 0; 0, 40]
DstBlock "Terminator"
DstPort 1
}
Line {
SrcBlock "BCH Decoder"
SrcPort 1
DstBlock "Logical\nOperator2"
DstPort 1
}
Line {
SrcBlock "Error Rate Calculation"
SrcPort 1
DstBlock "Display"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -