![]() |
5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
|
The UE PHY class. More...
#include "nr-ue-phy.h"
Public Types | |
typedef void(* | CqiFeedbackTracedCallback) (uint16_t, uint8_t, uint8_t, uint8_t) |
typedef void(* | DlCtrlSinrTracedCallback) (uint16_t, uint16_t, double, uint16_t) |
typedef void(* | DlDataSinrTracedCallback) (uint16_t, uint16_t, double, uint16_t) |
typedef void(* | PowerSpectralDensityTracedCallback) (const SfnSf &sfnSf, Ptr< const SpectrumValue > v, const Time &time, uint16_t rnti, uint64_t imsi, uint16_t bwpId, uint16_t cellId) |
TracedCallback signature for power trace source. | |
typedef void(* | RsrpRsrqTracedCallback) (uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool isServingCell, uint8_t componentCarrierId) |
typedef void(* | RxedUePhyCtrlMsgsTracedCallback) (const SfnSf sfnSf, const uint16_t nodeId, const uint16_t rnti, const uint8_t bwpId, Ptr< NrControlMessage > ptr) |
typedef void(* | RxedUePhyDlDciTracedCallback) (const SfnSf sfnSf, const uint16_t nodeId, const uint16_t rnti, const uint8_t bwpId, uint8_t harqId, uint32_t K1Delay) |
typedef void(* | TxedUePhyCtrlMsgsTracedCallback) (const SfnSf sfnSf, const uint16_t nodeId, const uint16_t rnti, const uint8_t bwpId, Ptr< NrControlMessage >) |
typedef void(* | TxedUePhyHarqFeedbackTracedCallback) (const SfnSf sfnSf, const uint16_t nodeId, const uint16_t rnti, const uint8_t bwpId, uint8_t harqId, uint32_t K1Delay) |
Public Member Functions | |
NrUePhy () | |
NrUePhy default constructor. | |
~NrUePhy () override | |
~NrUePhy | |
void | CalcAvgIntCovMat (NrCovMat *avgIntCovMat, const NrCovMat &newCovMat) const |
Calculates the moving average of the interference covariance matrix. | |
NrPmSearch::PmiUpdate | CheckUpdatePmi () |
Check if updates to wideband and/or subband PMI are necessary. This function is used to limit the frequency of PMI updates because computational complexity of PMI feedback can be very high, and because PMI feedback requires PUSCH/PUCCH resources. | |
uint8_t | ComputeCqi (const SpectrumValue &sinr) |
Compute the CQI based on the SINR. | |
void | CsiImEnded (const std::vector< MimoSignalChunk > &csiImSignalChunks) |
Function is called when CSI-IM finishes, and this function triggers the update of the interference covariance matrix by using the spectrum channel matrix information from the last CSI-RS, and the interference information from this CSI-IM signal. | |
void | CsiRsReceived (const std::vector< MimoSignalChunk > &csiRsSignal) |
A callback function that is called from NrMimoChunkProcessor when CSI-RS is being received. It stores the CSI-RS signal information. | |
void | EnqueueDlHarqFeedback (const DlHarqInfo &m) |
Get the HARQ feedback (on the transmission) from NrSpectrumPhy and send it through ideal PUCCH to gNB. | |
void | GenerateCsiRsCqi () |
Function that will be called in the case that CSI-RS is received, but CSI-IM is disabled and there is no PDSCH in the same slot, so this function will trigger CQI feedback generation based on the CSI-RS and the averaged covariance matrix if available, otherwise the CQI will be based only on CSI-RS that does not include any interference information. | |
void | GenerateDlCqiReport (const SpectrumValue &sinr) |
Generate a DL CQI report. | |
void | GenerateDlCqiReportMimo (const NrMimoSignal &cqiMimoFeedbackSignal, NrPmSearch::PmiUpdate pmiUpdateParams) |
Generate DL CQI, PMI, and RI (channel quality precoding matrix and rank indicators) | |
double | GetAlphaCovMat () const |
BeamId | GetBeamId (uint16_t rnti) const override |
Get the beam id for the specified user. | |
uint8_t | GetCsiFeedbackType () const |
uint8_t | GetCsiImDuration () const |
const SfnSf & | GetCurrentSfnSf () const override |
Get the current SfnSf. | |
Ptr< NrPmSearch > | GetPmSearch () const |
Get the precoding matrix search engine. | |
uint16_t | GetRnti () const __attribute__((warn_unused_result)) |
Get the current RNTI of the user. | |
double | GetRsrp () const |
Returns the latest measured RSRP value Called by NrUePowerControl. | |
double | GetTxPower () const override |
Retrieve the TX power of the UE. | |
NrUeCphySapProvider * | GetUeCphySapProvider () __attribute__((warn_unused_result)) |
Retrieve the pointer for the C PHY SAP provider (AKA the PHY interface towards the RRC) | |
Ptr< NrUePowerControl > | GetUplinkPowerControl () const |
Get NR uplink power control entity. | |
void | PdschMimoReceived (const std::vector< MimoSignalChunk > &pdschMimoChunks) |
Function is called when PDSCH is received by the UE. It contains the channel and interference information of all the PDSCH signals of own gNB that occurred during the duration of the UE's PDSCH signal. | |
void | PhyCtrlMessagesReceived (const Ptr< NrControlMessage > &msg) |
Receive a list of CTRL messages. | |
void | PhyDataPacketReceived (const Ptr< Packet > &p) |
Receive a PHY data packet. | |
void | ReceivePss (uint16_t cellId, const Ptr< SpectrumValue > &p) |
Receive PSS and calculate RSRQ in dBm. | |
void | RegisterToGnb (uint16_t bwpId) |
Register the UE to a certain Gnb. | |
void | ReportDlCtrlSinr (const SpectrumValue &sinr) |
Called when DlCtrlSinr is fired. | |
void | ReportRsReceivedPower (const SpectrumValue &power) |
Called when rsReceivedPower is fired. | |
void | ReportRsrpSinrTrace (const SpectrumValue &sinr) |
Report the SINR value in the RSRP and SINR trace. In OSS code, this functionality is piggy-backed onto GenerateDlCqiReport. The RSRP is unknown and reported as 0.0, like in OSS code. | |
void | ScheduleStartEventLoop (uint32_t nodeId, uint16_t frame, uint8_t subframe, uint16_t slot) override |
Start the ue Event Loop. | |
void | SetAlphaCovMat (double alpha) |
Set alpha parameter for the calculation of the CSI interference covariance matrix moving average. | |
void | SetCam (const Ptr< NrChAccessManager > &cam) |
Set the channel access manager interface for this instance of the PHY. | |
void | SetCsiImDuration (uint8_t csiImDuration) |
Sets CSI-IM duration in the number of OFDM symbols, if enabled. | |
void | SetDlAmc (const Ptr< const NrAmc > &amc) |
Set the AMC pointer from the GNB. | |
void | SetDlCtrlSyms (uint8_t dlCtrlSyms) |
Set the number of DL CTRL symbols. | |
void | SetEnableUplinkPowerControl (bool enable) |
void | SetNumRbPerRbg (uint32_t numRbPerRbg) |
Function that sets the number of RBs per RBG. This function will be soon deprecated, as soon as all the functions at gNb PHY, MAC and UE PHY that work with DCI bitmask start to work on level of RBs instead of RBGs. This function is configured by helper. | |
void | SetPattern (const std::string &pattern) |
Set the UE pattern. | |
void | SetPhySapUser (NrUePhySapUser *ptr) |
Install the PHY sap user (AKA the UE MAC) | |
void | SetPmSearch (Ptr< NrPmSearch > pmSearch) |
Set the precoding matrix search engine. | |
void | SetTxPower (double pow) |
Set the transmission power for the UE. | |
void | SetUeCphySapUser (NrUeCphySapUser *s) |
Install ue C PHY SAP user (AKA the PHY interface towards the RRC) | |
void | SetUlCtrlSyms (uint8_t ulCtrlSyms) |
Set the number of UL CTRL symbols. | |
void | SetUplinkPowerControl (Ptr< NrUePowerControl > pc) |
Allow configuration of uplink power control algorithm. E.g. necessary in FDD, when measurements are received in downlink BWP, but they are used in uplink BWP NOTE: This way of configuring is a temporal solution until BWP manager has this function implemented for UL PC, FFR, algorithm and similar algorithms, in which is needed to have a pair of DL and UL BWPs. In future this function will be called only by a friend class. | |
void | TriggerDlCqiGeneration (const NrMimoSignal &csiFeedbackSignal, NrPmSearch::PmiUpdate pmiUpdateParams) |
Function is called in different possible scenarios to generate CQI information. For example, this function is called upon PDSCH reception, or upon CSI-IM period. It could be also triggered when CSI-RS ends, in the case that CSI-IM is disabled and PDSCH is not expected in the current slot. This function triggers the generation of the CQI feedback for both cases: SU-MIMO, and "SISO" (MIMO feedback is disabled, no spatial multiplexing). | |
![]() | |
NrPhy () | |
NrPhy constructor. | |
~NrPhy () override | |
~NrPhy | |
void | DoSetCellId (uint16_t cellId) |
Set the cell ID. | |
void | EncodeCtrlMsg (const Ptr< NrControlMessage > &msg) |
Take the control messages, and put it in a list that will be sent at the first occasion. | |
void | EnqueueCtrlMessage (const Ptr< NrControlMessage > &m) |
Enqueue a ctrl message, keeping in consideration L1L2CtrlDelay. | |
uint16_t | GetBwpId () const |
uint16_t | GetCellId () const |
double | GetCentralFrequency () const |
Retrieve the frequency (in Hz) of this PHY's channel. | |
uint32_t | GetChannelBandwidth () const |
Retrieve the channel bandwidth, in Hz. | |
uint32_t | GetL1L2CtrlLatency () const |
double | GetNoiseFigure () const |
Get the NoiseFigure value. | |
uint16_t | GetNumerology () const |
Get the configured numerology. | |
NrPhySapProvider * | GetPhySapProvider () |
Retrieve a pointer to an instance of NrPhySapProvider. | |
enum NrSpectrumValueHelper::PowerAllocationType | GetPowerAllocationType () const |
Get the power allocation type. | |
uint32_t | GetRbNum () const |
Get the number of Resource block configured. | |
double | GetRbOverhead () const |
Get the bandwidth overhead used when calculating the usable RB number. | |
Time | GetSlotPeriod () const |
Get the slot period. | |
Ptr< const SpectrumModel > | GetSpectrumModel () |
Get the spectrum model of the PHY. | |
Ptr< NrSpectrumPhy > | GetSpectrumPhy () const |
Retrieve the SpectrumPhy pointer. | |
uint32_t | GetSubcarrierSpacing () const |
Retrieve the subcarrier spacing in Hz. Subcarrier spacing is updated when the numerology is being updated. | |
Time | GetSymbolPeriod () const |
Get SymbolPeriod. | |
uint32_t | GetSymbolsPerSlot () const |
Get the number of symbols in a slot. | |
virtual Time | GetTbDecodeLatency () const |
Returns Transport Block decode latency. | |
bool | HasDlSlot () const |
Go through the current pattern and see if at least one slot is DL, F or S. | |
bool | HasUlSlot () const |
Go through the current pattern and see if at least one slot is UL, F or S. | |
void | InstallCentralFrequency (double f) |
Install the PHY over a particular central frequency. | |
void | InstallSpectrumPhy (const Ptr< NrSpectrumPhy > &spectrumPhy) |
Set the SpectrumPhy associated with this PHY. | |
void | NotifyConnectionSuccessful () |
Notify PHY about the successful RRC connection establishment. | |
void | PushBackSlotAllocInfo (const SlotAllocInfo &slotAllocInfo) |
Store the slot allocation info. | |
void | SetBwpId (uint16_t bwpId) |
Set the bwp id. Called by helper. | |
void | SetDevice (Ptr< NrNetDevice > d) |
Set the owner device. | |
void | SetMacPdu (const Ptr< Packet > &p, const SfnSf &sfn, uint8_t symStart, uint16_t rnti) |
Store a MAC PDU. | |
void | SetNoiseFigure (double d) |
Set the NoiseFigure value. | |
void | SetNumerology (uint16_t numerology) |
Set GNB or UE numerology. | |
void | SetPowerAllocationType (enum NrSpectrumValueHelper::PowerAllocationType powerAllocationType) |
Set power allocation type. There are currently supported two types: one that distributes uniformly energy among all bandwidth (all RBs), and another only over used or active RBs. | |
void | SetRbOverhead (double oh) |
Set the bandwidth overhead for calculating the usable RB number. | |
void | SetSymbolsPerSlot (uint16_t symbolsPerSlot) |
Set the number of symbol per slot. | |
virtual void | SetTbDecodeLatency (const Time &us) |
Configures TB decode latency. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the object TypeId. | |
![]() | |
static std::string | GetPattern (const std::vector< LteNrTddSlotType > &pattern) |
Get a string representation of a pattern. | |
static TypeId | GetTypeId () |
Get the TypeId of the Object. | |
static bool | HasDlSlot (const std::vector< LteNrTddSlotType > &pattern) |
See if at least one slot is DL, F or S. | |
static bool | HasUlSlot (const std::vector< LteNrTddSlotType > &pattern) |
See if at least one slot is UL, F or S. | |
Protected Member Functions | |
void | DoDispose () override |
DoDispose method inherited from Object. | |
void | FinishSlotProcessing (const SfnSf &s, bool nrAllocationExists) |
Finish the StartSlot processing. | |
Time | GetLastSlotStart () const |
Get Time of last slot start. | |
uint32_t | GetNumRbPerRbg () const override |
NrUePhySapUser * | GetPhySapUser () const |
Get pointer to PhySapUser. | |
void | SetCurrentSfnSf (const SfnSf ¤tSfnSf) |
Set current SfnSf. | |
void | SetLastSlotStart (Time startTime) |
Set last slot start. | |
void | SetSubChannelsForTransmission (const std::vector< int > &mask, uint32_t numSym) |
Set the Tx power spectral density based on the RB index vector. | |
![]() | |
void | DoDispose () override |
DoDispose method inherited from Object. | |
void | DoInitialize () override |
DoInitialize method inherited from Object. | |
void | DoUpdateRbNum () |
Update the number of RB. Usually called after bandwidth changes. | |
void | EnqueueCtrlMsgNow (const Ptr< NrControlMessage > &msg) |
Enqueue a CTRL message without considering L1L2CtrlLatency. | |
void | EnqueueCtrlMsgNow (const std::list< Ptr< NrControlMessage > > &listOfMsgs) |
Enqueue a CTRL message without considering L1L2CtrlLatency. | |
std::vector< int > | FromRBGBitmaskToRBAssignment (const std::vector< bool > rbgBitmask) const |
Transform a MAC-made vector of RBG to a PHY-ready vector of SINR indices. | |
Ptr< SpectrumValue > | GetNoisePowerSpectralDensity () |
Create Noise Power Spectral density. | |
Ptr< PacketBurst > | GetPacketBurst (SfnSf sf, uint8_t sym, uint16_t rnti) |
Retrieve the PacketBurst at the slot/symbol specified. | |
Ptr< SpectrumValue > | GetTxPowerSpectralDensity (const std::vector< int > &rbIndexVector) |
void | InitializeMessageList () |
Initialize the message list. | |
bool | IsCtrlMsgListEmpty () const |
Check if there are no control messages queued for this slot. | |
SlotAllocInfo & | PeekSlotAllocInfo (const SfnSf &sfnsf) |
Peek the SlotAllocInfo at the SfnSf specified. | |
virtual std::list< Ptr< NrControlMessage > > | PopCurrentSlotCtrlMsgs () |
Extract and return the message list that is at the beginning of the queue. | |
void | PushFrontSlotAllocInfo (const SfnSf &newSfnSf, const SlotAllocInfo &slotAllocInfo) |
Store the slot allocation info at the front. | |
SlotAllocInfo | RetrieveSlotAllocInfo () |
Get the head for the slot allocation info, and delete it from the internal list. | |
SlotAllocInfo | RetrieveSlotAllocInfo (const SfnSf &sfnsf) |
Get the SlotAllocationInfo for the specified slot, and delete it from the internal list. | |
void | SetChannelBandwidth (uint16_t bandwidth) |
Function to set the channel bandwidth, used also by child classes, i.e., see functions DoSetDlBanwidth in NrUePhy and DoSetBandwidth in NrGnbPhy. This function is also called by NrHelper when creating gNB and UE devices. See CreateGnbPhy and CreateUePhy in NrHelper. This function updates the number of RBs and thus the spectrum model, i.e., for noise PSD and for future transmissions. | |
bool | SlotAllocInfoExists (const SfnSf &sfnsf) const |
Check if the SlotAllocationInfo for that slot exists. | |
size_t | SlotAllocInfoSize () const |
Retrieve the size of the SlotAllocInfo list. | |
Friends | |
class | MemberNrUeCphySapProvider< NrUePhy > |
class | NrHelper |
class | UeMemberNrUePhySapProvider |
Additional Inherited Members | |
![]() | |
static bool | IsTdd (const std::vector< LteNrTddSlotType > &pattern) |
Check if a pattern is TDD. | |
![]() | |
std::list< Ptr< NrControlMessage > > | m_ctrlMsgs |
CTRL messages to be sent. | |
SlotAllocInfo | m_currSlotAllocInfo |
Current slot allocation. | |
Ptr< NrNetDevice > | m_netDevice |
Pointer to the owner netDevice. | |
double | m_noiseFigure {0.0} |
Noise figure (attribute) | |
std::unordered_map< uint64_t, Ptr< PacketBurst > > | m_packetBurstMap |
Map between SfnSf and PacketBurst. | |
NrPhySapProvider * | m_phySapProvider |
Pointer to the MAC. | |
uint32_t | m_raPreambleId {0} |
Preamble ID. | |
Ptr< NrSpectrumPhy > | m_spectrumPhy |
Pointer to the (owned) spectrum phy. | |
std::vector< LteNrTddSlotType > | m_tddPattern = {F, F, F, F, F, F, F, F, F, F} |
Pattern. | |
double | m_txPower {0.0} |
Transmission power (attribute) | |
The UE PHY class.
This class represents the PHY in the User Equipment. Much of the processing and scheduling is done inside the gNb, so the user is a mere "executor" of the decision of the base station.
The slot processing is the same as the gnb phy, working as a state machine in which the processing is done at the beginning of the slot.
The attributes of this class (described in the section Attributes) can be configured through a direct call to SetAttribute
or, before the PHY creation, with the helper method NrHelper::SetUePhyAttribute().
In theory, much of the configuration should pass through RRC, and through messages that come from the gNb. However, we still are not at this level, and we have to rely on direct calls to configure the same values between the gnb and the ue. At this moment, the call that the helper has to perform are in NrHelper::AttachToGnb().
To initialize the class, you must call also SetSpectrumPhy() and StartEventLoop(). Usually, this is taken care inside the helper.
ns3::NrUePhy is accessible through the following paths with Config::Set and Config::Connect:
/NodeList/[i]/DeviceList/[i]/$ns3::NrNetDevice/$ns3::NrUeNetDevice/ComponentCarrierMapUe/[i]/NrUePhy
/NodeList/[i]/DeviceList/[i]/$ns3::NrUeNetDevice/ComponentCarrierMapUe/[i]/NrUePhy
Size of this type is 1360 bytes (on a 64-bit architecture).
Definition at line 59 of file nr-ue-phy.h.
typedef void(* ns3::NrUePhy::CqiFeedbackTracedCallback) (uint16_t, uint8_t, uint8_t, uint8_t) |
TracedCallback signature for CqiFeedback trace callback
[in] | rnti | |
[in] | CQI | |
[in] | MCS | |
[in] | RI | (rank indicator) |
Definition at line 302 of file nr-ue-phy.h.
typedef void(* ns3::NrUePhy::DlCtrlSinrTracedCallback) (uint16_t, uint16_t, double, uint16_t) |
TracedCallback signature for DL CTRL SINR trace callback
[in] | cellId | |
[in] | rnti | |
[in] | sinr | |
[in] | bwpId |
Definition at line 282 of file nr-ue-phy.h.
typedef void(* ns3::NrUePhy::DlDataSinrTracedCallback) (uint16_t, uint16_t, double, uint16_t) |
TracedCallback signature for DL DATA SINR trace callback
[in] | cellId | |
[in] | rnti | |
[in] | sinr | |
[in] | bwpId |
Definition at line 292 of file nr-ue-phy.h.
typedef void(* ns3::NrUePhy::PowerSpectralDensityTracedCallback) (const SfnSf &sfnSf, Ptr< const SpectrumValue > v, const Time &time, uint16_t rnti, uint64_t imsi, uint16_t bwpId, uint16_t cellId) |
TracedCallback signature for power trace source.
It depends on the TxPower configured attribute, and the number of RB allocated.
[in] | sfnSf | Slot number |
[in] | v | Power Spectral Density |
[in] | time | Time for which this power is set |
[in] | rnti | RNTI of the UE |
[in] | imsi | IMSI of the UE |
[in] | bwpId | Reference BWP ID |
[in] | cellId | Reference Cell ID |
Definition at line 445 of file nr-ue-phy.h.
typedef void(* ns3::NrUePhy::RsrpRsrqTracedCallback) (uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool isServingCell, uint8_t componentCarrierId) |
TracedCallback signature for cell RSRP and RSRQ.
[in] | rnti | |
[in] | cellId | |
[in] | rsrp | |
[in] | rsrq | |
[in] | isServingCell | |
[in] | componentCarrierId |
Definition at line 469 of file nr-ue-phy.h.
typedef void(* ns3::NrUePhy::RxedUePhyCtrlMsgsTracedCallback) (const SfnSf sfnSf, const uint16_t nodeId, const uint16_t rnti, const uint8_t bwpId, Ptr< NrControlMessage > ptr) |
TracedCallback signature for Ue Phy Received Control Messages.
[in] | sfnSf | Frame, subframe, slot number, numerology object |
[in] | nodeId | |
[in] | rnti | |
[in] | bwpId | |
[in] | ptr | pointer to msg to get the msg type |
Definition at line 313 of file nr-ue-phy.h.
typedef void(* ns3::NrUePhy::RxedUePhyDlDciTracedCallback) (const SfnSf sfnSf, const uint16_t nodeId, const uint16_t rnti, const uint8_t bwpId, uint8_t harqId, uint32_t K1Delay) |
TracedCallback signature for Ue Phy DL DCI reception.
[in] | frame | Frame number. |
[in] | subframe | Subframe number. |
[in] | slot | number. |
[in] | VarTti | |
[in] | nodeId | |
[in] | rnti | |
[in] | bwpId | |
[in] | harq | ID |
[in] | K1 | Delay |
Definition at line 347 of file nr-ue-phy.h.
typedef void(* ns3::NrUePhy::TxedUePhyCtrlMsgsTracedCallback) (const SfnSf sfnSf, const uint16_t nodeId, const uint16_t rnti, const uint8_t bwpId, Ptr< NrControlMessage >) |
TracedCallback signature for Ue Phy Transmitted Control Messages.
[in] | sfnSf | Frame, subframe, slot number, numerology object |
[in] | nodeId | |
[in] | rnti | |
[in] | bwpId | |
[in] | ptr | pointer to msg to get the msg type |
Definition at line 328 of file nr-ue-phy.h.
typedef void(* ns3::NrUePhy::TxedUePhyHarqFeedbackTracedCallback) (const SfnSf sfnSf, const uint16_t nodeId, const uint16_t rnti, const uint8_t bwpId, uint8_t harqId, uint32_t K1Delay) |
TracedCallback signature for Ue Phy DL HARQ Feedback transmission.
[in] | frame | Frame number. |
[in] | subframe | Subframe number. |
[in] | slot | number. |
[in] | VarTti | |
[in] | nodeId | |
[in] | rnti | |
[in] | bwpId | |
[in] | harq | ID |
[in] | K1 | Delay |
Definition at line 367 of file nr-ue-phy.h.
ns3::NrUePhy::NrUePhy | ( | ) |
NrUePhy default constructor.
Definition at line 41 of file nr-ue-phy.cc.
|
override |
~NrUePhy
Definition at line 51 of file nr-ue-phy.cc.
Calculates the moving average of the interference covariance matrix.
avgIntCovMat | the past average of the interference covariance matrix |
newCovMat | the new interference covariance matrix |
Definition at line 1994 of file nr-ue-phy.cc.
Referenced by CsiImEnded(), and PdschMimoReceived().
NrPmSearch::PmiUpdate ns3::NrUePhy::CheckUpdatePmi | ( | ) |
Check if updates to wideband and/or subband PMI are necessary. This function is used to limit the frequency of PMI updates because computational complexity of PMI feedback can be very high, and because PMI feedback requires PUSCH/PUCCH resources.
Definition at line 2009 of file nr-ue-phy.cc.
Referenced by PdschMimoReceived().
uint8_t ns3::NrUePhy::ComputeCqi | ( | const SpectrumValue & | sinr | ) |
Compute the CQI based on the SINR.
The function was implemented to assist mainly the NrSpectrumPhy class to include the CQI in RxPacketTraceUe trace.
sinr | the sinr PSD |
Definition at line 1562 of file nr-ue-phy.cc.
void ns3::NrUePhy::CsiImEnded | ( | const std::vector< MimoSignalChunk > & | csiImSignalChunks | ) |
Function is called when CSI-IM finishes, and this function triggers the update of the interference covariance matrix by using the spectrum channel matrix information from the last CSI-RS, and the interference information from this CSI-IM signal.
csiImSignalChunks | Chunks of the interference signals measured during the CSI-IM period |
Definition at line 1921 of file nr-ue-phy.cc.
References CalcAvgIntCovMat(), ns3::NrMimoSignal::m_chanMat, ns3::NrMimoSignal::m_covMat, and TriggerDlCqiGeneration().
void ns3::NrUePhy::CsiRsReceived | ( | const std::vector< MimoSignalChunk > & | csiRsSignal | ) |
A callback function that is called from NrMimoChunkProcessor when CSI-RS is being received. It stores the CSI-RS signal information.
csiRsSignal | the structure that represents the CSI-RS signal |
Definition at line 1895 of file nr-ue-phy.cc.
|
overrideprotected |
DoDispose method inherited from Object.
Definition at line 57 of file nr-ue-phy.cc.
References ns3::NrPhy::DoDispose().
void ns3::NrUePhy::EnqueueDlHarqFeedback | ( | const DlHarqInfo & | m | ) |
Get the HARQ feedback (on the transmission) from NrSpectrumPhy and send it through ideal PUCCH to gNB.
Connected by the helper to a spectrum phy callback
m | the HARQ feedback |
Definition at line 1294 of file nr-ue-phy.cc.
References ns3::NrPhy::GetBwpId(), ns3::NrPhy::GetSlotPeriod(), and ns3::HarqInfo::m_harqProcessId.
|
protected |
Finish the StartSlot processing.
Update the current slot object, insert DL/UL CTRL allocations depending on the TDD pattern, and schedule the next StartVarTti
s | the slot number |
nrAllocationExists | whether an NR allocation exists for the slot |
Definition at line 851 of file nr-ue-phy.cc.
References ns3::DciInfoElementTdma::CTRL, ns3::DciInfoElementTdma::DATA, ns3::NrPhy::EncodeCtrlMsg(), ns3::NrPhy::GetBwpId(), ns3::NrPhy::GetSymbolPeriod(), ns3::NrPhy::m_currSlotAllocInfo, ns3::NrPhy::m_netDevice, ns3::SlotAllocInfo::m_sfnSf, ns3::SlotAllocInfo::m_varTtiAllocInfo, ns3::DciInfoElementTdma::MSG3, ns3::NrPhy::PopCurrentSlotCtrlMsgs(), ns3::NrPhy::RetrieveSlotAllocInfo(), ns3::DciInfoElementTdma::SRS, and ns3::DciInfoElementTdma::UL.
void ns3::NrUePhy::GenerateCsiRsCqi | ( | ) |
Function that will be called in the case that CSI-RS is received, but CSI-IM is disabled and there is no PDSCH in the same slot, so this function will trigger CQI feedback generation based on the CSI-RS and the averaged covariance matrix if available, otherwise the CQI will be based only on CSI-RS that does not include any interference information.
Definition at line 1904 of file nr-ue-phy.cc.
References ns3::NrMimoSignal::m_chanMat, ns3::NrMimoSignal::m_covMat, and TriggerDlCqiGeneration().
void ns3::NrUePhy::GenerateDlCqiReport | ( | const SpectrumValue & | sinr | ) |
Generate a DL CQI report.
Connected by the helper to a callback in corresponding ChunkProcessor
sinr | the SINR |
Definition at line 1273 of file nr-ue-phy.cc.
References ns3::NrPhy::GetBwpId(), and ns3::NrPhy::GetCellId().
Referenced by TriggerDlCqiGeneration().
void ns3::NrUePhy::GenerateDlCqiReportMimo | ( | const NrMimoSignal & | cqiMimoFeedbackSignal, |
NrPmSearch::PmiUpdate | pmiUpdateParams | ||
) |
Generate DL CQI, PMI, and RI (channel quality precoding matrix and rank indicators)
cqiMimoFeedbackSignal | a vector of parameters of the received signals and interference |
pmiUpdateParams | struct that defines if WB/SB PMIs need to be updated |
Definition at line 1854 of file nr-ue-phy.cc.
References ns3::NrPhy::GetBwpId(), and ns3::DlCqiInfo::m_rnti.
Referenced by TriggerDlCqiGeneration().
double ns3::NrUePhy::GetAlphaCovMat | ( | ) | const |
Definition at line 262 of file nr-ue-phy.cc.
Referenced by GetTypeId().
|
overridevirtual |
Get the beam id for the specified user.
rnti | RNTI |
Implements ns3::NrPhy.
Definition at line 1385 of file nr-ue-phy.cc.
uint8_t ns3::NrUePhy::GetCsiFeedbackType | ( | ) | const |
Definition at line 1889 of file nr-ue-phy.cc.
uint8_t ns3::NrUePhy::GetCsiImDuration | ( | ) | const |
Definition at line 274 of file nr-ue-phy.cc.
Referenced by GetTypeId().
|
overridevirtual |
Get the current SfnSf.
Implements ns3::NrPhy.
Definition at line 1331 of file nr-ue-phy.cc.
|
protected |
Get Time of last slot start.
Definition at line 484 of file nr-ue-phy.cc.
|
overrideprotectedvirtual |
Returns the number of RBs per RBG
Implements ns3::NrPhy.
Definition at line 466 of file nr-ue-phy.cc.
|
protected |
Get pointer to PhySapUser.
Definition at line 490 of file nr-ue-phy.cc.
Ptr< NrPmSearch > ns3::NrUePhy::GetPmSearch | ( | ) | const |
Get the precoding matrix search engine.
Definition at line 2040 of file nr-ue-phy.cc.
uint16_t ns3::NrUePhy::GetRnti | ( | ) | const |
Get the current RNTI of the user.
Definition at line 1337 of file nr-ue-phy.cc.
double ns3::NrUePhy::GetRsrp | ( | ) | const |
Returns the latest measured RSRP value Called by NrUePowerControl.
Definition at line 293 of file nr-ue-phy.cc.
|
overridevirtual |
Retrieve the TX power of the UE.
Please note that there is also an attribute ("NrGnbPhy::TxPower")
Implements ns3::NrPhy.
Definition at line 287 of file nr-ue-phy.cc.
References ns3::NrPhy::m_txPower.
|
static |
Get the object TypeId.
Definition at line 75 of file nr-ue-phy.cc.
References GetAlphaCovMat(), GetCsiImDuration(), ns3::NrPhy::GetNoiseFigure(), ns3::NrPhy::GetPowerAllocationType(), ns3::NrPhy::GetSpectrumPhy(), ns3::NrPhy::GetTbDecodeLatency(), ns3::NrPhy::m_txPower, SetAlphaCovMat(), SetCsiImDuration(), ns3::NrPhy::SetNoiseFigure(), ns3::NrPhy::SetPowerAllocationType(), and ns3::NrPhy::SetTbDecodeLatency().
Referenced by ns3::NrHelper::NrHelper().
NrUeCphySapProvider * ns3::NrUePhy::GetUeCphySapProvider | ( | ) |
Retrieve the pointer for the C PHY SAP provider (AKA the PHY interface towards the RRC)
Definition at line 243 of file nr-ue-phy.cc.
Ptr< NrUePowerControl > ns3::NrUePhy::GetUplinkPowerControl | ( | ) | const |
Get NR uplink power control entity.
Definition at line 299 of file nr-ue-phy.cc.
void ns3::NrUePhy::PdschMimoReceived | ( | const std::vector< MimoSignalChunk > & | pdschMimoChunks | ) |
Function is called when PDSCH is received by the UE. It contains the channel and interference information of all the PDSCH signals of own gNB that occurred during the duration of the UE's PDSCH signal.
pdschMimoChunks | Chunks of the signals received by this UE from its cell, containing not only its own signals, but also towards other UEs of the same cell. This function triggers the generation of the CQI feedback if there was CSI-RS in the current slot, or in the case that CSI-RS is disabled, so CQI feedback is only based on PDSCH. |
Definition at line 1939 of file nr-ue-phy.cc.
References CalcAvgIntCovMat(), CheckUpdatePmi(), ns3::NrMimoSignal::m_chanMat, and TriggerDlCqiGeneration().
void ns3::NrUePhy::PhyCtrlMessagesReceived | ( | const Ptr< NrControlMessage > & | msg | ) |
Receive a list of CTRL messages.
Connected by the helper to a callback of the spectrum.
msg | Message |
Definition at line 546 of file nr-ue-phy.cc.
References ns3::SfnSf::Add(), ns3::DciInfoElementTdma::DATA, ns3::NrControlMessage::DL_DCI, ns3::NrPhy::GetBwpId(), ns3::NrPhy::GetCellId(), ns3::NrControlMessage::MIB, ns3::NrControlMessage::RAR, ns3::NrUePhySapUser::ReceiveControlMessage(), ns3::NrUeCphySapUser::RecvMasterInformationBlock(), ns3::NrUeCphySapUser::RecvSystemInformationBlockType1(), ns3::NrControlMessage::SIB1, ns3::DciInfoElementTdma::SRS, and ns3::NrControlMessage::UL_DCI.
void ns3::NrUePhy::PhyDataPacketReceived | ( | const Ptr< Packet > & | p | ) |
Receive a PHY data packet.
Connected by the helper to a callback of the spectrum.
p | Received packet |
Definition at line 1217 of file nr-ue-phy.cc.
References ns3::NrPhy::GetTbDecodeLatency(), ns3::NrPhy::m_netDevice, and ns3::NrUePhySapUser::ReceivePhyPdu().
void ns3::NrUePhy::ReceivePss | ( | uint16_t | cellId, |
const Ptr< SpectrumValue > & | p | ||
) |
Receive PSS and calculate RSRQ in dBm.
cellId | the cell ID |
p | PSS list |
Definition at line 1420 of file nr-ue-phy.cc.
References ns3::NrPhy::GetNumerology().
void ns3::NrUePhy::RegisterToGnb | ( | uint16_t | bwpId | ) |
Register the UE to a certain Gnb.
Install the configuration parameters in the UE.
bwpId | the bwp id to which this PHY is attaching to |
Definition at line 401 of file nr-ue-phy.cc.
References ns3::NrPhy::DoSetCellId(), and ns3::NrPhy::InitializeMessageList().
void ns3::NrUePhy::ReportDlCtrlSinr | ( | const SpectrumValue & | sinr | ) |
Called when DlCtrlSinr is fired.
sinr | the sinr PSD |
Definition at line 1541 of file nr-ue-phy.cc.
References ns3::NrPhy::GetBwpId(), and ns3::NrPhy::GetCellId().
void ns3::NrUePhy::ReportRsReceivedPower | ( | const SpectrumValue & | power | ) |
Called when rsReceivedPower is fired.
power | the power received |
Definition at line 1406 of file nr-ue-phy.cc.
References ns3::NrPhy::GetCellId().
void ns3::NrUePhy::ReportRsrpSinrTrace | ( | const SpectrumValue & | sinr | ) |
Report the SINR value in the RSRP and SINR trace. In OSS code, this functionality is piggy-backed onto GenerateDlCqiReport. The RSRP is unknown and reported as 0.0, like in OSS code.
sinr | the SINR |
|
overridevirtual |
Start the ue Event Loop.
As parameters, there are the initial values for some variables.
nodeId | the UE nodeId |
frame | Frame |
subframe | SubF. |
slot | Slot |
Implements ns3::NrPhy.
Definition at line 1393 of file nr-ue-phy.cc.
void ns3::NrUePhy::SetAlphaCovMat | ( | double | alpha | ) |
Set alpha parameter for the calculation of the CSI interference covariance matrix moving average.
alpha | the alpha parameter for the computation of the moving average |
Definition at line 256 of file nr-ue-phy.cc.
Referenced by GetTypeId().
void ns3::NrUePhy::SetCam | ( | const Ptr< NrChAccessManager > & | cam | ) |
Set the channel access manager interface for this instance of the PHY.
cam | the pointer to the interface |
Definition at line 1320 of file nr-ue-phy.cc.
void ns3::NrUePhy::SetCsiImDuration | ( | uint8_t | csiImDuration | ) |
Sets CSI-IM duration in the number of OFDM symbols, if enabled.
csiImDuration | the duration of CSI-IM if enabled, see NrHelper |
Definition at line 268 of file nr-ue-phy.cc.
Referenced by GetTypeId().
|
protected |
Set current SfnSf.
currentSfnSf | the current SfnSf |
Definition at line 472 of file nr-ue-phy.cc.
void ns3::NrUePhy::SetDlAmc | ( | const Ptr< const NrAmc > & | amc | ) |
Set the AMC pointer from the GNB.
amc | The DL AMC of the GNB. This will be used to create the DL CQI that will be sent to the GNB. |
This function will be soon deprecated, hopefully with some values that comes from RRC. For the moment, it is called by the helper at the registration time.
Definition at line 312 of file nr-ue-phy.cc.
void ns3::NrUePhy::SetDlCtrlSyms | ( | uint8_t | dlCtrlSyms | ) |
Set the number of DL CTRL symbols.
dlCtrlSyms | value |
This function will be soon deprecated, hopefully with a value that comes from RRC. For the moment, it is called by the helper at the registration time.
Definition at line 416 of file nr-ue-phy.cc.
void ns3::NrUePhy::SetEnableUplinkPowerControl | ( | bool | enable | ) |
Definition at line 250 of file nr-ue-phy.cc.
|
protected |
Set last slot start.
startTime | the last slot start time |
Definition at line 478 of file nr-ue-phy.cc.
void ns3::NrUePhy::SetNumRbPerRbg | ( | uint32_t | numRbPerRbg | ) |
Function that sets the number of RBs per RBG. This function will be soon deprecated, as soon as all the functions at gNb PHY, MAC and UE PHY that work with DCI bitmask start to work on level of RBs instead of RBGs. This function is configured by helper.
numRbPerRbg | Number of RBs per RBG |
Definition at line 422 of file nr-ue-phy.cc.
void ns3::NrUePhy::SetPattern | ( | const std::string & | pattern | ) |
Set the UE pattern.
Temporary.
pattern | The UE pattern |
Definition at line 428 of file nr-ue-phy.cc.
References ns3::DL, ns3::F, ns3::NrPhy::m_tddPattern, ns3::S, and ns3::UL.
void ns3::NrUePhy::SetPhySapUser | ( | NrUePhySapUser * | ptr | ) |
Install the PHY sap user (AKA the UE MAC)
ptr | the PHY SAP user pointer to install |
Definition at line 1703 of file nr-ue-phy.cc.
void ns3::NrUePhy::SetPmSearch | ( | Ptr< NrPmSearch > | pmSearch | ) |
Set the precoding matrix search engine.
pmSearch | the PM search engine |
Definition at line 2032 of file nr-ue-phy.cc.
|
protected |
Set the Tx power spectral density based on the RB index vector.
mask | vector of the index of the RB (in SpectrumValue array) in which there is a transmission |
numSym | number of symbols of the transmission |
Definition at line 323 of file nr-ue-phy.cc.
References ns3::NrPhy::GetBwpId(), ns3::NrPhy::GetCellId(), ns3::NrPhy::GetSymbolPeriod(), ns3::NrPhy::GetTxPowerSpectralDensity(), and ns3::NrPhy::m_spectrumPhy.
void ns3::NrUePhy::SetTxPower | ( | double | pow | ) |
Set the transmission power for the UE.
Please note that there is also an attribute ("NrUePhy::TxPower")
pow | power |
Definition at line 280 of file nr-ue-phy.cc.
References ns3::NrPhy::m_txPower.
void ns3::NrUePhy::SetUeCphySapUser | ( | NrUeCphySapUser * | s | ) |
Install ue C PHY SAP user (AKA the PHY interface towards the RRC)
s | the C PHY SAP user pointer to install |
Definition at line 236 of file nr-ue-phy.cc.
void ns3::NrUePhy::SetUlCtrlSyms | ( | uint8_t | ulCtrlSyms | ) |
Set the number of UL CTRL symbols.
ulCtrlSyms | value |
This function will be soon deprecated, hopefully with a value that comes from RRC. For the moment, it is called by the helper at the registration time.
Definition at line 410 of file nr-ue-phy.cc.
void ns3::NrUePhy::SetUplinkPowerControl | ( | Ptr< NrUePowerControl > | pc | ) |
Allow configuration of uplink power control algorithm. E.g. necessary in FDD, when measurements are received in downlink BWP, but they are used in uplink BWP NOTE: This way of configuring is a temporal solution until BWP manager has this function implemented for UL PC, FFR, algorithm and similar algorithms, in which is needed to have a pair of DL and UL BWPs. In future this function will be called only by a friend class.
pc | Pointer to NrUePowerControl |
Definition at line 306 of file nr-ue-phy.cc.
void ns3::NrUePhy::TriggerDlCqiGeneration | ( | const NrMimoSignal & | csiFeedbackSignal, |
NrPmSearch::PmiUpdate | pmiUpdateParams | ||
) |
Function is called in different possible scenarios to generate CQI information. For example, this function is called upon PDSCH reception, or upon CSI-IM period. It could be also triggered when CSI-RS ends, in the case that CSI-IM is disabled and PDSCH is not expected in the current slot. This function triggers the generation of the CQI feedback for both cases: SU-MIMO, and "SISO" (MIMO feedback is disabled, no spatial multiplexing).
csiFeedbackSignal | Contains the spectrum channel matrix and the interference covariance matrix that are used to generate the CQI feedback. |
pmiUpdateParams | struct that defines if WB/SB PMIs need to be updated |
Definition at line 1965 of file nr-ue-phy.cc.
References ns3::NrCovMat::CalcIntfNormChannel(), GenerateDlCqiReport(), GenerateDlCqiReportMimo(), ns3::NrSinrMatrix::GetVectorizedSpecVal(), ns3::NrMimoSignal::m_chanMat, and ns3::NrMimoSignal::m_covMat.
Referenced by CsiImEnded(), GenerateCsiRsCqi(), and PdschMimoReceived().
|
friend |
Definition at line 61 of file nr-ue-phy.h.
|
friend |
Definition at line 63 of file nr-ue-phy.h.
|
friend |
Definition at line 61 of file nr-ue-phy.h.