📄 bpsk.mdl
字号:
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 "BPSK"
Location [198, 197, 778, 490]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "Embedded\nMATLAB Function"
Ports [3, 1]
Position [290, 151, 360, 199]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Array {
Type "Handle"
Dimension 0
PropName "AvailSigsLoadSave"
}
MaskType "Stateflow"
MaskDescription "Embedded MATLAB block"
MaskDisplay "disp('BPSK');"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Embedded\nMATLAB Function"
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "bit"
Position [20, 101, 40, 119]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "no_shift"
Position [20, 136, 40, 154]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "shift"
Position [20, 171, 40, 189]
Port "3"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 180, 320, 220]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function BPSK 2"
Ports [3, 2]
Position [180, 100, 230, 180]
FunctionName "sf_sfun"
PortCounts "[3 2]"
Port {
PortNumber 2
Name "out"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 191, 480, 209]
}
Block {
BlockType Outport
Name "out"
Position [460, 101, 480, 119]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [0, 80]
DstBlock " Demux "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock "bit"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
Name "out"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "out"
DstPort 1
}
Line {
SrcBlock "no_shift"
SrcPort 1
Points [120, 0]
DstBlock " SFunction "
DstPort 2
}
Line {
SrcBlock "shift"
SrcPort 1
DstBlock " SFunction "
DstPort 3
}
}
}
Block {
BlockType DiscretePulseGenerator
Name "Pulse\nGenerator"
Ports [0, 1]
Position [75, 63, 120, 97]
PulseType "Time based"
Period "0.2"
PulseWidth "50"
SampleTime "1/20"
}
Block {
BlockType Scope
Name "Scope"
Ports [4]
Position [440, 79, 470, 111]
Location [112, 60, 946, 697]
Open off
NumInputPorts "4"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
}
TimeRange "1"
YMin "-0.5~-2~-2~-2"
YMax "1.5~2~2~2"
DataFormat "StructureWithTime"
}
Block {
BlockType Reference
Name "Sine Wave"
Ports [0, 1]
Position [80, 153, 125, 197]
SourceBlock "dspsrcs4/Sine Wave"
SourceType "Sine Wave"
Amplitude "1"
Frequency "10"
Phase "pi"
SampleMode "Discrete"
OutComplex "Real"
CompMethod "Trigonometric fcn"
TableSize "Speed"
SampleTime "1/2000"
SamplesPerFrame "1"
additionalParams off
allowOverrides on
dataType "double"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
ResetState "Restart at time zero"
}
Block {
BlockType Reference
Name "Sine Wave1"
Ports [0, 1]
Position [155, 223, 200, 267]
SourceBlock "dspsrcs4/Sine Wave"
SourceType "Sine Wave"
Amplitude "1"
Frequency "10"
Phase "0"
SampleMode "Discrete"
OutComplex "Real"
CompMethod "Trigonometric fcn"
TableSize "Speed"
SampleTime "1/2000"
SamplesPerFrame "1"
additionalParams off
allowOverrides on
dataType "double"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
ResetState "Restart at time zero"
}
Block {
BlockType SignalViewerScope
Name "Scope1"
Ports []
Position [20, 15, 60, 55]
IOType "viewer"
Location [188, 365, 512, 604]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
ShowDataMarkers off
DataFormat "Array"
MaxDataPoints "7500"
RefreshTime 0.035000
Disabled off
}
Line {
SrcBlock "Pulse\nGenerator"
SrcPort 1
Points [95, 0]
Branch {
Points [0, 80]
DstBlock "Embedded\nMATLAB Function"
DstPort 1
}
Branch {
Labels [1, 0]
DstBlock "Scope"
DstPort 1
}
}
Line {
Labels [0, 0]
SrcBlock "Sine Wave"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "Embedded\nMATLAB Function"
DstPort 2
}
Branch {
Points [0, -85]
DstBlock "Scope"
DstPort 2
}
}
Line {
SrcBlock "Sine Wave1"
SrcPort 1
Points [5, 0]
Branch {
Points [25, 0; 0, -55]
DstBlock "Embedded\nMATLAB Function"
DstPort 3
}
Branch {
Points [0, -145]
DstBlock "Scope"
DstPort 3
}
}
Line {
SrcBlock "Embedded\nMATLAB Function"
SrcPort 1
Points [30, 0; 0, -65]
DstBlock "Scope"
DstPort 4
}
}
}
# Finite State Machines
#
# Stateflow Version 6.0 (R14) dated Apr 30 2004, 06:19:14
#
#
Stateflow {
machine {
id 1
name "BPSK"
created "22-Feb-2009 22:53:26"
isLibrary 0
firstTarget 11
sfVersion 60014000.000006
}
chart {
id 2
name "Embedded\n"
"MATLAB Function"
windowPosition [225.45 348.75 200.25 189.75]
viewLimits [0 156.75 0 153.75]
screen [1 1 1024 768 1.333333333333333]
treeNode [0 3 0 0]
firstTransition 5
firstJunction 4
viewObj 2
machine 1
decomposition CLUSTER_CHART
type EML_CHART
firstData 6
chartFileNumber 2
disableImplicitCasting 1
eml {
name "BPSK"
}
}
state {
id 3
labelString "eML_blk_kernel()"
position [18 64.5 118 66]
fontSize 12
chart 2
treeNode [2 0 0 0]
superState SUBCHART
subviewer 2
type FUNC_STATE
decomposition CLUSTER_STATE
eml {
isEML 1
script "function out=BPSK(bit,no_shift,shift)\n"
"if bit==1\n"
" out=no_shift\n"
"else\n"
" out=shift\n"
"end"
editorLayout "100 M4x1[146 214 671 364]"
}
}
junction {
id 4
position [23.5747 49.5747 7]
chart 2
linkNode [2 0 0]
subviewer 2
type CONNECTIVE_JUNCTION
}
transition {
id 5
labelString "{eML_blk_kernel();}"
labelPosition [32.125 19.875 102.544 14.964]
fontSize 12
src {
intersection [0 0 1 0 23.5747 14.625 0 0]
}
dst {
id 4
intersection [7 0 -1 -1 23.5747 42.5747 0 0]
}
midPoint [23.5747 24.9468]
chart 2
linkNode [2 0 0]
dataLimits [21.175 25.975 14.625 42.575]
subviewer 2
drawStyle SMART
}
data {
id 6
name "bit"
linkNode [2 0 7]
scope INPUT_DATA
machine 1
dataType "inherited"
fixptType {
bias 0
slope 1
exponent 0
baseType SF_INT16_TYPE
lock 0
}
dlgFixptMode 0
props {
range {
minimum ""
maximum ""
}
array {
size "-1"
}
}
}
data {
id 7
name "out"
linkNode [2 6 8]
scope OUTPUT_DATA
machine 1
dataType "inherited"
fixptType {
bias 0
slope 1
exponent 0
baseType SF_INT16_TYPE
lock 0
}
dlgFixptMode 0
props {
range {
minimum ""
maximum ""
}
array {
size "-1"
}
}
}
data {
id 8
name "no_shift"
linkNode [2 7 9]
scope INPUT_DATA
machine 1
dataType "inherited"
fixptType {
bias 0
slope 1
exponent 0
baseType SF_INT16_TYPE
lock 0
}
dlgFixptMode 0
props {
range {
minimum ""
maximum ""
}
array {
size "-1"
}
}
}
data {
id 9
name "shift"
linkNode [2 8 0]
scope INPUT_DATA
machine 1
dataType "inherited"
fixptType {
bias 0
slope 1
exponent 0
baseType SF_INT16_TYPE
lock 0
}
dlgFixptMode 0
props {
range {
minimum ""
maximum ""
}
array {
size "-1"
}
}
}
instance {
id 10
name "Embedded\n"
"MATLAB Function"
machine 1
chart 2
}
target {
id 11
name "sfun"
description "Default Simulink S-Function Target."
machine 1
linkNode [1 0 0]
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -