📄 turbo_code.mdl
字号:
Multiplication "Element-wise(K.*u)"
ParamMin "[]"
ParamMax "[]"
ParameterDataTypeMode "Same as input"
ParameterDataType "fixdt(1,16,0)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "[]"
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
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 "[]"
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 "[]"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as first input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Selector
NumberOfDimensions "1"
IndexMode "One-based"
InputPortWidth "-1"
SampleTime "-1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType SubSystem
ShowPortLabels "FromPortIcon"
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
TreatAsAtomicUnit 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 Sum
IconShape "rectangular"
Inputs "++"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as first input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType ToWorkspace
VariableName "simulink_output"
MaxDataPoints "1000"
Decimation "1"
SampleTime "0"
FixptAsFi off
}
Block {
BlockType Terminator
}
Block {
BlockType ZeroOrderHold
SampleTime "1"
}
Block {
BlockType FrameConversion
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 "[]"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType DiscretePulseGenerator
PulseType "Sample based"
TimeSource "Use simulation time"
Amplitude "1"
Period "2"
PulseWidth "1"
PhaseDelay "0"
SampleTime "1"
VectorParams1D on
}
Block {
BlockType RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimization)"
LogicDataType "uint(8)"
ZeroCross on
SampleTime "-1"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
UseDisplayTextAsClickCallback off
}
LineDefaults {
FontName "Arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "turbo_code"
Location [2, 74, 998, 706]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "[0.800000, 0.909804, 0.811765]"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "121"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "AWGN\nChannel"
Ports [1, 1]
Position [509, 255, 581, 325]
Orientation "down"
NamePlacement "alternate"
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 "Variance from mask"
EbNodB "2"
EsNodB "10"
SNRdB "10"
bitsPerSym "1"
Ps "1"
Tsym "1"
variance "Variance"
}
Block {
BlockType Reference
Name "Bernoulli Binary\nGenerator"
Ports [0, 1]
Position [90, 138, 170, 182]
DialogController "commDDGCreate"
DialogControllerArgs "DataTag0"
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 "61"
Ts "1"
frameBased on
sampPerFrame "Len"
orient off
outDataType "boolean"
}
Block {
BlockType Display
Name "Display"
Ports [1]
Position [355, 227, 435, 353]
Decimation "1"
Lockdown off
}
Block {
BlockType SubSystem
Name "Global Parameters"
Ports []
Position [674, 131, 799, 192]
BackgroundColor "yellow"
DropShadow on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskType "Global Parameters"
MaskDescription "Load global parameters in MATLAB workspace. "
MaskPromptString "Eb/No in dB:|Block size:|Number of iterations:|Seed:"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "turbo_code_setup;|turbo_code_setup|turbo_code_setup;|turbo_code_setup;"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskVariables "EbNodB=@1;Len=@2;Iter=@3;Seed=@4;"
MaskInitialization "turbo_code_setup;"
MaskDisplay "disp(['Eb/No ' num2str(EbNodB,'%3.1f') 'dB' \nsprintf('\\n') 'Block size ' num2str(Len,'%7.0f') \nsprintf('\\n') 'Iterations ' num2str(Iter,'%3.0f') \nsprintf('\\n') 'Seed ' num2str(Seed,'%7.0f')])\n"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "1.7|128*1|5|54123"
MaskTabNameString ",,,"
System {
Name "Global Parameters"
Location [140, 175, 293, 343]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
}
}
Block {
BlockType SubSystem
Name "Multiple Error Rate Calculation1"
Ports [2, 1]
Position [225, 258, 320, 322]
ShowName off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskDisplay "disp('Multiple\\nIteration\\nError Rate\\nCalculation')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Multiple Error Rate Calculation1"
Location [2, 74, 1014, 722]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [35, 43, 65, 57]
ShowName off
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "In2"
Position [35, 93, 65, 107]
ShowName off
Port "2"
IconDisplay "Port number"
DataType "boolean"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Reference
Name "Buffer"
Ports [1, 1]
Position [505, 75, 555, 125]
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "Iter"
V "0"
ic "0"
}
Block {
BlockType Constant
Name "Constant"
Position [245, 135, 275, 165]
ShowName off
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Reference
Name "Error Rate Calculation1"
Ports [3, 1]
Position [300, 27, 395, 173]
ShowName off
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "0"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Port"
WsName "ErrorVec1"
RsMode2 on
stop off
numErr "100"
maxBits "1e6"
}
Block {
BlockType FrameConversion
Name "Frame Status Conversion"
Position [595, 87, 640, 113]
ShowName off
OutFrame "Sample based"
}
Block {
BlockType Gain
Name "Gain"
Position [800, 95, 830, 125]
Gain "1/Len"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Reference
Name "Mean"
Ports [2, 1]
Position [705, 90, 760, 130]
DialogController "dspDDGCreate"
DialogControllerArgs "DataTag1"
SourceBlock "dspstat3/Mean"
SourceType "Mean"
run on
reset_popup "Non-zero sample"
additionalParams off
allowOverrides on
outputMode "Same as accumulator"
outputWordLength "32"
outputFracLength "30"
accumMode "Same as input"
accumWordLength "32"
accumFracLength "30"
roundingMode "Floor"
overflowMode off
LockScale off
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [430, 89, 475, 111]
ShowName off
InputPortWidth "3"
IndexOptions "Index vector (dialog)"
Indices "2"
OutputSizes "1"
}
Block {
BlockType Reference
Name "Signal From\nWorkspace"
Ports [0, 1]
Position [585, 163, 640, 197]
ShowName off
SourceBlock "dspsrcs4/Signal From\nWorkspace"
SourceType "Signal From Workspace"
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"
X "[1 1]"
Ts "Iter"
nsamps "1"
OutputAfterFinalValue "Setting to zero"
ignoreOrWarnInputAndFrameLengths off
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [885, 220, 945, 250]
VariableName "simout"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [135, 32, 170, 68]
ShowName off
}
Block {
BlockType Outport
Name "Out1"
Position [880, 103, 910, 117]
ShowName off
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
SrcBlock "Error Rate Calculation1"
SrcPort 1
DstBlock "Selector"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -