Package: simu5g.stack.mac
NrMacUe
compound moduleProvides functionalities for the Medium Access Control (MAC) of the New Radio (NR) protocol stack at the User Equipment (UE) side. In particular, it extends the LteMacUe module by redefining functions to support different numerology parameterizations.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Known subclasses
| Name | Type | Description |
|---|---|---|
| NrMacUeD2D | compound module |
NR-UE MAC with D2D support. Extends NrMacUe with the device-to-device (D2D) deltas: it customizes the numerology-aware MAC to support the transmission and reception of MAC PDUs, CSI, and BSRs over a D2D link, including one-to-many D2D multicast transmission. It is the NR counterpart of LteMacUeD2D. |
Extends
| Name | Type | Description |
|---|---|---|
| LteMacUe | compound module |
Extends the LteMacBase module by providing specific MAC functions at the User Equipment (UE) side. For uplink connections, this module manages the initiation of the Random Access procedure (RAC) and the sending of Buffer Status Reports (BSRs) to the eNodeBs. Once it receives an uplink scheduling grant from the eNodeB, it is responsible for managing the local connections' scheduler and constructing MAC Protocol Data Units (PDUs) to be transmitted to the physical layer. |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| macNodeId | int |
MacNodeId of the stack leg this MAC belongs to (set by the NIC) |
|
| binderModule | string | "binder" | |
| queueSize | int | 2MiB | |
| harqProcesses | int | 5 | |
| maxHarqRtx | int | 3 | |
| harqFbEvaluationTimer | int | 4 |
Number of slots for sending back HARQ FB |
| statDisplay | bool | false | |
| isNr | bool | false |
True for the NR leg (set by NrNicUe on the nrMac submodule) |
| collectorModule | string | "" | |
| numPreambles | int | 64 |
Number of RACH preambles available for contention-based random access |
| maxRacAttempts | int | 10 |
preambleTransMax; max RAC attempts (0 = give up after first failure) |
| racBackoffMin | int | 0 |
Min random backoff (TTIs) after failed RAC |
| racBackoffMax | int | 20 |
Max random backoff (TTIs) after failed RAC (0 = no backoff, instant retry) |
| raResponseWindow | int | 20 |
ra-ResponseWindow: TTIs to wait before retrying RAC |
| retxBsrTimer | int | 320 |
retxBSR-Timer: BSR retransmission timer (TTIs; 0 = disabled) |
Properties
| Name | Value | Description |
|---|---|---|
| display | i=block/mac | |
| class | NrMacUe |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| upperLayerIn | input |
From RLC |
|
| upperLayerOut | output |
To RLC |
|
| phyIn | input |
From PHY |
|
| phyOut | output |
To PHY |
Signals
| Name | Type | Unit | Description |
|---|---|---|---|
| macDelayDl | |||
| macThroughputDl | |||
| macDelayUl | |||
| macThroughputUl | |||
| macCellPacketLossDl | |||
| macCellPacketLossUl | |||
| macPacketLossUl | |||
| macPacketLossDl | |||
| macBufferOverFlowDl | |||
| macBufferOverFlowUl | |||
| harqErrorRateUl | |||
| harqErrorRateDl | |||
| harqTxAttemptsDl | |||
| harqTxAttemptsUl | |||
| harqErrorRate_1st_Ul | |||
| harqErrorRate_1st_Dl | |||
| harqErrorRate_2nd_Ul | |||
| harqErrorRate_2nd_Dl | |||
| harqErrorRate_3rd_Ul | |||
| harqErrorRate_3rd_Dl | |||
| harqErrorRate_4th_Ul | |||
| harqErrorRate_4th_Dl | |||
| receivedPacketFromUpperLayer | |||
| receivedPacketFromLowerLayer | |||
| sentPacketToUpperLayer | |||
| sentPacketToLowerLayer | |||
| macPduAcked | |||
| macPduDiscarded | |||
| rlcPduDiscarded | |||
| grantSent | |||
| ulMacPduArrived |
Statistics
| Name | Title | Source | Record | Unit | Interpolation Mode | Description |
|---|---|---|---|---|---|---|
| macDelayDl | Delay at the MAC layer UL | macDelayDl | mean, vector | s | ||
| macThroughputDl | Throughput at the MAC layer DL | macThroughputDl | simu5g_rateavg | Bps | ||
| macDelayUl | Delay at the MAC layer UL | macDelayUl | mean, vector | s | ||
| macThroughputUl | Throughput at the MAC layer UL | macThroughputUl | simu5g_rateavg | Bps | ||
| macCellPacketLossDl | Mac Cell Packet Loss Dl | macCellPacketLossDl | mean | |||
| macCellPacketLossUl | Mac Cell Packet Loss Ul | macCellPacketLossUl | mean | |||
| macPacketLossUl | Mac Packet Loss Ul | macPacketLossUl | mean | |||
| macPacketLossDl | Mac Packet Loss Dl | macPacketLossDl | mean | |||
| macBufferOverFlowDl | Mac buffer overflow as function of time | macBufferOverFlowDl | mean | Byte/s | ||
| macBufferOverFlowUl | Mac buffer overflow as function of time | macBufferOverFlowUl | mean | Byte/s | ||
| harqErrorRateUl | Harq Error Rate Ul | harqErrorRateUl | mean, vector | |||
| harqErrorRateDl | Harq Error Rate Dl | harqErrorRateDl | mean, vector | |||
| harqTxAttemptsDl | Harq Tx Attempts Dl | harqTxAttemptsDl | mean, vector | |||
| harqTxAttemptsUl | Harq Tx Attempts Ul | harqTxAttemptsUl | mean, vector | |||
| harqErrorRate_1st_Ul | Harq Error Rate Ul (1st tx) | harqErrorRate_1st_Ul | mean, vector | |||
| harqErrorRate_1st_Dl | Harq Error Rate Dl (1st tx) | harqErrorRate_1st_Dl | mean, vector | |||
| harqErrorRate_2nd_Ul | Harq Error Rate Ul (2nd tx) | harqErrorRate_2nd_Ul | mean, vector | |||
| harqErrorRate_2nd_Dl | Harq Error Rate Dl (2nd tx) | harqErrorRate_2nd_Dl | mean, vector | |||
| harqErrorRate_3rd_Ul | Harq Error Rate Ul (3rd tx) | harqErrorRate_3rd_Ul | mean, vector | |||
| harqErrorRate_3rd_Dl | Harq Error Rate Dl (3rd tx) | harqErrorRate_3rd_Dl | mean, vector | |||
| harqErrorRate_4th_Ul | Harq Error Rate Ul (4th tx) | harqErrorRate_4th_Ul | mean, vector | |||
| harqErrorRate_4th_Dl | Harq Error Rate Dl (4th tx) | harqErrorRate_4th_Dl | mean, vector | |||
| receivedPacketFromUpperLayer | receivedPacketFromUpperLayer | count, sum(packetBytes), vector(packetBytes) | none | |||
| receivedPacketFromLowerLayer | receivedPacketFromLowerLayer | count, sum(packetBytes), vector(packetBytes) | none | |||
| sentPacketToUpperLayer | sentPacketToUpperLayer | count, sum(packetBytes), vector(packetBytes) | none | |||
| sentPacketToLowerLayer | sentPacketToLowerLayer | count, sum(packetBytes), vector(packetBytes) | none |
Source code
// // Provides functionalities for the Medium Access Control (MAC) of the // New Radio (NR) protocol stack at the User Equipment (UE) side. In particular, it extends // the ~LteMacUe module by redefining functions to support different numerology // parameterizations. // module NrMacUe extends LteMacUe { parameters: @class("NrMacUe"); harqProcesses = default(5); raResponseWindow = default(20); // NR: longer RA response window retxBsrTimer = default(320); // NR: longer BSR retransmission timer }File: src/simu5g/stack/mac/NrMacUe.ned