📄 bluetooth_lib2.mdl
字号:
SrcPort 1
DstBlock "Ignore\none packet"
DstPort 1
}
Line {
SrcBlock "Curent time"
SrcPort 1
DstBlock "Fcn"
DstPort 1
}
Line {
Name "Total bits"
SrcBlock "BER"
SrcPort 1
DstBlock "Selector"
DstPort 1
}
Line {
Name "Bits/time"
Labels [0, 0]
SrcBlock "Product"
SrcPort 1
DstBlock "Data rate"
DstPort 1
}
Line {
SrcBlock "Fcn"
SrcPort 1
Points [160, 0; 0, -40]
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Ignore\none packet"
SrcPort 1
DstBlock "Product"
DstPort 1
}
}
}
Block {
BlockType Display
Name "Data BER Display\n(should be 0)"
Ports [1]
Position [545, 125, 630, 185]
Decimation "1"
}
Block {
BlockType Reference
Name "Fail if BER !=0"
Description "u < eps"
Ports [1]
Position [560, 37, 620, 83]
SourceBlock "simulink/Model\nVerification/Check "
"Static \nUpper Bound"
SourceType "Checks_SMax"
max "eps"
max_included off
enabled on
stopWhenAssertionFail on
export off
icon "graphic"
}
Block {
BlockType Reference
Name "Raw BER"
Ports [2, 1]
Position [210, 117, 295, 188]
ShowName off
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 "50"
maxBits "1e6"
Port {
PortNumber 1
Name "Error results"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [405, 48, 430, 72]
ShowName off
Elements "[1]"
InputPortWidth "3"
Port {
PortNumber 1
Name "BER"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Display
Name "Throughput (bps)"
Ports [1]
Position [550, 226, 635, 254]
Decimation "1"
}
Block {
BlockType ToWorkspace
Name "Throughput To Workspace"
Position [550, 304, 630, 336]
VariableName "Throughput1"
MaxDataPoints "1"
SampleTime "-1"
SaveFormat "Array"
}
Line {
Name "Error results"
Labels [0, 0]
SrcBlock "Raw BER"
SrcPort 1
Points [50, 0; 25, 0]
Branch {
Points [0, 75]
DstBlock "Calculate\nThroughput"
DstPort 1
}
Branch {
Points [0, 0]
Branch {
DstBlock "Data BER Display\n(should be 0)"
DstPort 1
}
Branch {
Points [0, -95]
DstBlock "Selector"
DstPort 1
}
}
}
Line {
SrcBlock "Tx"
SrcPort 1
DstBlock "Raw BER"
DstPort 1
}
Line {
SrcBlock "Rx"
SrcPort 1
DstBlock "Raw BER"
DstPort 2
}
Line {
SrcBlock "Calculate\nThroughput"
SrcPort 1
Points [25, 0]
Branch {
Points [0, 80]
DstBlock "Throughput To Workspace"
DstPort 1
}
Branch {
DstBlock "Throughput (bps)"
DstPort 1
}
}
Line {
SrcBlock "Time"
SrcPort 1
DstBlock "Calculate\nThroughput"
DstPort 2
}
Line {
Name "BER"
Labels [1, 0]
SrcBlock "Selector"
SrcPort 1
DstBlock "Fail if BER !=0"
DstPort 1
}
}
}
Block {
BlockType Clock
Name "Clock"
Position [520, 240, 540, 260]
Decimation "10"
}
Block {
BlockType Reference
Name "Data store"
Ports [3, 1]
Position [400, 145, 495, 285]
SourceBlock "dspbuff3/Queue"
SourceType "Queue"
depth "8"
trigger "Rising edge"
overflow "Dynamic reallocation"
pes "Warning"
eso off
fso off
nso off
clr off
clrOutport off
}
Block {
BlockType Reference
Name "Delay 1 packet"
Ports [1, 1]
Position [590, 164, 635, 196]
SourceBlock "dspsigops/Integer Delay"
SourceType "Integer Delay"
delay "160"
ic "0"
reset_popup "None"
Port {
PortNumber 1
Name "Previous Packet"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Reference
Name "Delay 1 packet1"
Ports [1, 1]
Position [235, 154, 280, 186]
NamePlacement "alternate"
SourceBlock "dspsigops/Integer Delay"
SourceType "Integer Delay"
delay "160"
ic "0"
reset_popup "None"
Port {
PortNumber 1
Name "Previous Packet"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Reference
Name "Integer Delay"
Ports [1, 1]
Position [250, 245, 275, 275]
ShowName off
SourceBlock "dspsigops/Integer Delay"
SourceType "Integer Delay"
delay "1"
ic "0"
reset_popup "None"
Port {
PortNumber 1
Name "Small delay\n to deal with\n missing "
"start edge"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Reference
Name "Integer Delay1"
Ports [1, 1]
Position [250, 200, 275, 230]
ShowName off
SourceBlock "dspsigops/Integer Delay"
SourceType "Integer Delay"
delay "1"
ic "0"
reset_popup "None"
Port {
PortNumber 1
Name "Small delay\n to deal with\n missing "
"start edge"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [595, 236, 610, 264]
ShowName off
SampleTime "Slot_Ts"
Port {
PortNumber 1
Name "Latch time"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Line {
SrcBlock "Data store"
SrcPort 1
DstBlock "ACL BER meter"
DstPort 2
}
Line {
SrcBlock "Tx Event "
SrcPort 1
DstBlock "Integer Delay1"
DstPort 1
}
Line {
SrcBlock "Rx Info Bits"
SrcPort 1
DstBlock "Delay 1 packet"
DstPort 1
}
Line {
SrcBlock "Tx Info Bits"
SrcPort 1
DstBlock "Delay 1 packet1"
DstPort 1
}
Line {
Name "Previous Packet"
Labels [0, 1]
SrcBlock "Delay 1 packet1"
SrcPort 1
DstBlock "Data store"
DstPort 1
}
Line {
Name "Small delay\n to deal with\n missing st"
"art edge"
Labels [2, 1]
SrcBlock "Integer Delay1"
SrcPort 1
Points [0, 0]
DstBlock "Data store"
DstPort 2
}
Line {
Name "Small delay\n to deal with\n missing st"
"art edge"
Labels [2, 1]
SrcBlock "Integer Delay"
SrcPort 1
Points [0, 0]
DstBlock "Data store"
DstPort 3
}
Line {
Name "Previous Packet"
Labels [1, 0]
SrcBlock "Delay 1 packet"
SrcPort 1
DstBlock "ACL BER meter"
DstPort 1
}
Line {
Name "Latch time"
Labels [0, 0]
SrcBlock "Zero-Order\nHold"
SrcPort 1
DstBlock "ACL BER meter"
DstPort 3
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
Name "Frame OK"
SrcBlock "Frame OK"
SrcPort 1
Points [0, 0; 25, 0]
Branch {
Points [0, 140]
DstBlock "Integer Delay"
DstPort 1
}
Branch {
Labels [1, 0]
Points [660, 0]
DstBlock "ACL BER meter"
DstPort enable
}
}
Annotation {
Name "This subsystem calculates the error rat"
"es and throughput for ACL packets.\nIt uses a Queue block to temporarily stor"
"e (push) packets from the transmitter\nand asynchronously retrieves them (pop"
") when an incoming packet is correctly detected."
Position [478, 364]
HorizontalAlignment "left"
BackgroundColor "yellow"
}
}
}
Block {
BlockType SubSystem
Name "Audio source and\nspeech coding"
Ports [0, 1, 1]
Position [375, 154, 450, 176]
TreatAsAtomicUnit on
System {
Name "Audio source and\nspeech coding"
Location [140, 169, 758, 502]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType EnablePort
Name "Enable"
Ports []
Position [270, 45, 290, 65]
}
Block {
BlockType Reference
Name "CVSD\nEncode"
Ports [1, 1]
Position [345, 142, 415, 198]
ShowName off
SourceBlock "bluetooth_lib2/CVSD\nEncode"
SourceType "CVSD Encoder"
min_step "10"
max_step "1280"
accum_decay "1-1/32"
step_decay "1-1/1024"
}
Block {
BlockType Reference
Name "From Wave\nFile"
Ports [0, 1]
Position [100, 144, 190, 196]
SourceBlock "dspwin32/From Wave\nFile"
SourceType "From Wave File"
FileName "Input1.wav"
SamplesPerFrame "1"
MinBufSize "256"
dType "Double"
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -