5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-lte-mi-error-model.h
1// Copyright (c) 2019 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#ifndef NR_MI_ERROR_MODEL_H
6#define NR_MI_ERROR_MODEL_H
7
8#include "nr-error-model.h"
9
10namespace ns3
11{
12
20{
25
31 : NrErrorModelOutput(tbler)
32 {
33 }
34
39 {
40 }
41
42 double m_mi{0.0};
43 double m_miTotal{0.0};
44 uint32_t m_infoBits{0};
45 uint32_t m_codeBits{0};
46};
47
59{
60 public:
65 static TypeId GetTypeId();
66
71
75 ~NrLteMiErrorModel() override;
76
90 Ptr<NrErrorModelOutput> GetTbDecodificationStats(const SpectrumValue& sinr,
91 const std::vector<int>& map,
92 uint32_t size,
93 uint8_t mcs,
94 const NrErrorModelHistory& history) override;
95
99 double GetSpectralEfficiencyForCqi(uint8_t cqi) override;
103 double GetSpectralEfficiencyForMcs(uint8_t mcs) const override;
107 uint32_t GetPayloadSize(uint32_t usefulSC,
108 uint8_t mcs,
109 uint8_t rank,
110 uint32_t rbNum,
111 Mode mode) const override;
115 uint32_t GetMaxCbSize(uint32_t tbSize, uint8_t mcs) const override;
116 uint8_t GetMaxMcs() const override;
117
118 private:
132 virtual Ptr<NrErrorModelOutput> GetTbBitDecodificationStats(const SpectrumValue& sinr,
133 const std::vector<int>& map,
134 uint32_t size,
135 uint8_t mcs,
136 const NrErrorModelHistory& history);
137
147 static double Mib(const SpectrumValue& sinr, const std::vector<int>& map, uint8_t mcs);
148
158 static double MappingMiBler(double mib, uint8_t ecrId, uint32_t cbSize);
159};
160
161} // namespace ns3
162
163#endif /* NR_MI_ERROR_MODEL_H */
Interface for calculating the error probability for a transport block.
std::vector< Ptr< NrErrorModelOutput > > NrErrorModelHistory
Vector of previous output.
Mode
Indicate the mode (UL or DL)
~NrLteMiErrorModel() override
~NrLteMiErrorModel
double GetSpectralEfficiencyForMcs(uint8_t mcs) const override
Get the SE for a given MCS, following the MCSs in LTE.
static TypeId GetTypeId()
GetTypeId.
uint32_t GetMaxCbSize(uint32_t tbSize, uint8_t mcs) const override
Get the maximum code block size, as per LTE.
uint8_t GetMaxMcs() const override
Get the maximum MCS.
double GetSpectralEfficiencyForCqi(uint8_t cqi) override
Get the SE for a given CQI, following the CQIs in LTE.
uint32_t GetPayloadSize(uint32_t usefulSC, uint8_t mcs, uint8_t rank, uint32_t rbNum, Mode mode) const override
Get the payload size, following the MCSs in LTE.
Ptr< NrErrorModelOutput > GetTbDecodificationStats(const SpectrumValue &sinr, const std::vector< int > &map, uint32_t size, uint8_t mcs, const NrErrorModelHistory &history) override
Get an output for the decodification error probability of a given transport block,...
NrLteMiErrorModel()
NrLteMiErrorModel constructor.
Store the output of an NRErrorModel.
The NrLteMiErrorModelOutput struct Error model output returned by the class NrLteMiErrorModel.
uint32_t m_infoBits
number of info bits
~NrLteMiErrorModelOutput() override
~NrLteMiErrorModelOutput
NrLteMiErrorModelOutput(double tbler)
NrLteMiErrorModelOutput constructor with tbler parameter.
double m_mi
Mutual Information.
double m_miTotal
Accumulated Mutual Information.
NrLteMiErrorModelOutput()=delete
NrLteMiErrorModelOutput default constructor (deleted)
uint32_t m_codeBits
number of code bits