📄 qpsk.mdl
字号:
SupportNonInlinedSFcns on
EnableShiftOperators on
ParenthesesLevel "Nominal"
PortableWordSizes off
ModelStepFunctionPrototypeControlCompliant off
AutosarCompliant off
ExtMode off
ExtModeStaticAlloc off
ExtModeTesting off
ExtModeStaticAllocSize 1000000
ExtModeTransport 0
ExtModeMexFile "ext_comm"
ExtModeIntrfLevel "Level1"
RTWCAPISignals off
RTWCAPIParams off
RTWCAPIStates off
GenerateASAP2 off
}
PropName "Components"
}
}
hdlcoderui.hdlcc {
$ObjectID 11
Description "HDL Coder custom configuration component"
Version "1.4.0"
Name "HDL Coder"
Array {
Type "Cell"
Dimension 1
Cell ""
PropName "HDLConfigFile"
}
HDLCActiveTab "0"
}
PropName "Components"
}
Name "Configuration"
CurrentDlgPage "Solver"
}
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 Ground
}
Block {
BlockType Inport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
OutMin "[]"
OutMax "[]"
DataType "auto"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
OutDataTypeStr "Inherit: auto"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType Outport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
OutMin "[]"
OutMax "[]"
DataType "auto"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
OutDataTypeStr "Inherit: auto"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
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 "[]"
SFunctionDeploymentMode off
}
Block {
BlockType SubSystem
ShowPortLabels "FromPortIcon"
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
TreatAsAtomicUnit off
CheckFcnCallInpInsideContextMsg 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 FrameConversion
InheritSamplingMode off
OutFrame "Frame-based"
}
Block {
BlockType Reshape
OutputDimensionality "1-D array"
OutputDimensions "[1,1]"
}
Block {
BlockType Constant
Value "1"
VectorParams1D on
SamplingMode "Sample based"
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "fixdt(1,16,0)"
ConRadixGroup "Use specified scaling"
OutScaling "[]"
OutDataTypeStr "Inherit: Inherit from 'Constant value'"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimization)"
LogicDataType "uint(8)"
OutDataTypeStr "Inherit: Logical (see Configuration Parameters: Optimization)"
ZeroCross on
SampleTime "-1"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
UseDisplayTextAsClickCallback off
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "qpsk"
Location [571, 204, 1384, 596]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "AWGN\nChannel"
Ports [1, 1]
Position [260, 96, 355, 154]
SourceBlock "commchan3/AWGN\nChannel"
SourceType "AWGN Channel"
ShowPortLabels "FromPortIcon"
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
seed "67"
noiseMode "Signal to noise ratio (Eb/No)"
EbNodB "xSNR"
EsNodB "10"
SNRdB "10"
bitsPerSym "1"
Ps "1"
Tsym "1"
variance "1"
}
Block {
BlockType Reference
Name "Bernoulli Binary\nGenerator"
Ports [0, 1]
Position [15, 103, 95, 147]
DialogController "commDDGCreate"
DialogControllerArgs "DataTag0"
FontName "Arial"
SourceBlock "commrandsrc2/Bernoulli Binary\nGenerator"
SourceType "Bernoulli Binary Generator"
ShowPortLabels "FromPortIcon"
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
P "0.5"
seed "xInitialSeed"
Ts "xSampleTime"
frameBased off
sampPerFrame "1"
orient off
outDataType "double"
}
Block {
BlockType Reference
Name "Bit to Integer\nConverter"
Ports [1, 1]
Position [210, 13, 290, 57]
SourceBlock "commutil2/Bit to Integer\nConverter"
SourceType "Bit to Integer Converter"
nbits "2"
bitOrder "MSB first"
signedOutputValues "Unsigned"
outDtype "Inherit via internal rule"
outDtypeSigned "Inherit via internal rule"
}
Block {
BlockType Reference
Name "Bit to Integer\nConverter1"
Ports [1, 1]
Position [515, 103, 595, 147]
SourceBlock "commutil2/Bit to Integer\nConverter"
SourceType "Bit to Integer Converter"
nbits "2"
bitOrder "MSB first"
signedOutputValues "Unsigned"
outDtype "Inherit via internal rule"
outDtypeSigned "Inherit via internal rule"
}
Block {
BlockType Reference
Name "Error Rate\nCalculation"
Ports [2]
Position [685, 22, 760, 73]
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "xReceiveDelay"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Workspace"
WsName "xErrorRate"
RsMode2 off
stop off
numErr "100"
maxBits "1e6"
}
Block {
BlockType Reference
Name "M-PSK\nDemodulator\nBaseband"
Ports [1, 1]
Position [395, 100, 470, 150]
DialogController "commDDGCreate"
DialogControllerArgs "DataTag1"
SourceBlock "commdigbbndpm3/M-PSK\nDemodulator\nBaseband"
SourceType "M-PSK Demodulator Baseband"
M "4"
Ph "xPhaseOffset"
Dec "Gray"
Mapping "[0:7]"
OutType "Bit"
DecType "Hard decision"
VarSource "Dialog"
Variance "1"
outDtype1 "Inherit via internal rule"
outDtype2 "Inherit via internal rule"
derotateFactorDTMode "Same word length as input"
derotateFactorWordLen "16"
}
Block {
BlockType Reference
Name "M-PSK\nModulator\nBaseband"
Ports [1, 1]
Position [140, 99, 215, 151]
SourceBlock "commdigbbndpm3/M-PSK\nModulator\nBaseband"
SourceType "M-PSK Modulator Baseband"
M "4"
InType "Bit"
Enc "Gray"
Mapping "[0:7]"
Ph "xPhaseOffset"
outDtype "double"
outWordLen "16"
outUDDataType "sfix(16)"
outFracLenMode "Best precision"
outFracLen "15"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [135, 219, 165, 251]
Floating off
Location [188, 390, 512, 629]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "0"
YMax "1"
SaveName "ScopeData2"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope4"
Ports [1]
Position [705, 249, 735, 281]
Floating off
Location [188, 390, 512, 629]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
SaveName "ScopeData1"
DataFormat "StructureWithTime"
SampleTime "0"
}
Line {
SrcBlock "Bernoulli Binary\nGenerator"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "M-PSK\nModulator\nBaseband"
DstPort 1
}
Branch {
Points [0, -5]
Branch {
Points [0, -85]
DstBlock "Bit to Integer\nConverter"
DstPort 1
}
Branch {
DstBlock "Scope1"
DstPort 1
}
}
}
Line {
SrcBlock "M-PSK\nModulator\nBaseband"
SrcPort 1
DstBlock "AWGN\nChannel"
DstPort 1
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
DstBlock "M-PSK\nDemodulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "Bit to Integer\nConverter"
SrcPort 1
DstBlock "Error Rate\nCalculation"
DstPort 1
}
Line {
SrcBlock "M-PSK\nDemodulator\nBaseband"
SrcPort 1
DstBlock "Bit to Integer\nConverter1"
DstPort 1
}
Line {
SrcBlock "Bit to Integer\nConverter1"
SrcPort 1
Points [35, 0]
Branch {
Points [0, -65]
DstBlock "Error Rate\nCalculation"
DstPort 2
}
Branch {
Points [0, 140]
DstBlock "Scope4"
DstPort 1
}
}
}
}
MatData {
NumRecords 2
DataRecord {
Tag DataTag1
Data " %)30 . < 8 ( 0 % \" $ ! 0 . 0 8 ( ! % \" $ / 0 0 #P $U04TM$96UO9'5L871O<@ "
}
DataRecord {
Tag DataTag0
Data " %)30 . > 8 ( 0 % \" $ ! 0 . 2 8 ( ! % \" $ 2 0 0 $@ $)E<FYO=6QL:4)I;F%R>4=E;@ "
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -