Package: simu5g.stack.d2d.mac
NrMacGnbD2D
compound moduleNR-gNB MAC with D2D support. Extends NrMacGnb with the device-to-device (D2D) deltas: it enhances resource allocation procedures to enable direct communication between UEs (network-assisted D2D). It is the NR counterpart of LteMacEnbD2D.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Extends
| Name | Type | Description |
|---|---|---|
| NrMacGnb | compound module |
Provides functionalities for the Medium Access Control (MAC) of the New Radio (NR) protocol stack at the gNodeB (gNB) side. In particular, it extends the LteMacEnb module by initializing the NR version of the uplink scheduler and using, by default, the NR version of the Adaptive Modulation and Coding (AMC) module. |
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 | |
| rlcMuxModule | string | "^.rlcMux" |
Module references for accessing other stack layers |
| bearerManagementModule | string | "^.rrc.bearerManagement" | |
| amcType | string | "NrAmcD2D" |
AMC Type: "LteAmc", "NrAmc" (the D2D NICs swap in the "LteAmcD2D"/"NrAmcD2D" leaves) |
| amcMode | string | "AUTO" |
AMC pilot mode; supported values depend on the AMC implementation (LteAmc: "AUTO", "D2D") |
| rbAllocationType | string | "localized" |
Resource allocation type ("distributed" or "localized") |
| summaryLowerBound | double | 5ms |
Summary feedback confidence function lower bound |
| summaryUpperBound | double | 20ms |
Summary feedback confidence function upper bound |
| fbhbCapacityDl | int | 5 |
Feedback historical base capacity in DL (number of stored feedback samples per UE) |
| fbhbCapacityUl | int | 5 |
Feedback historical base capacity in UL (number of stored feedback samples per UE) |
| cqiWeight | double | 0.0 |
Wideband CQI generation parameter (0.0 means "use the mean value") |
| eNodeBCount | int | 0 |
Number of eNodeBs - set to 0 if unknown |
| schedulingDisciplineDl | string | "MAXCI" |
Scheduling discipline. See LteCommon.h for discipline meaning. ALLOCATOR_BESTFIT is the D2D frequency-reuse allocator: it is only constructible by the D2D uplink schedulers, so selecting it requires ulSchedulerType = LteSchedulerEnbUlD2D or NrSchedulerGnbUlD2D (and hence the Simu5G_D2D feature). Any other scheduler raises an error at setup. |
| schedulingDisciplineUl | string | "MAXCI" | |
| ulSchedulerType | string | "NrSchedulerGnbUlD2D" |
Scheduler Types |
| dlSchedulerType | string | "LteSchedulerEnbDl" | |
| pfAlpha | double | 0.95 |
Proportional Fair parameters |
| pilotMode | string | "ROBUST_CQI" | |
| numPreambles | int | 64 |
Number of RACH preambles available for contention-based random access |
| cellInfoModule | string | ||
| fbhbCapacityD2D | int | 5 |
Feedback historical base capacity in D2D (number of stored feedback samples per UE) |
| usePreconfiguredTxParams | bool | false | |
| d2dCqi | int | 7 | |
| reuseD2D | bool | false |
Frequency reuse parameters |
| reuseD2DMulti | bool | false | |
| conflictGraphUpdatePeriod | double | 1s | |
| conflictGraphThreshold | double | 90 |
CG thresholds can be defined in either dBm or meters if distances are set to -1.0, then dBm thresholds are used, otherwise distances have priority on dBm thresholds |
| conflictGraphD2DInterferenceRadius | double | -1.0m |
Meters |
| conflictGraphD2DMultiTxRadius | double | -1.0m |
Meters |
| conflictGraphD2DMultiInterferenceRadius | double | -1.0m |
Meters |
| msHarqInterrupt | bool | true |
Handling of D2D mode switch |
| msClearRlcBuffer | bool | true |
Properties
| Name | Value | Description |
|---|---|---|
| display | i=block/mac | |
| class | NrMacGnbD2D |
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 | |||
| avgServedBlocksDl | |||
| avgServedBlocksUl | |||
| macCellPacketLossD2D | |||
| macBufferOverFlowD2D |
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 | |||
| avgServedBlocksDl | Average number of allocated Resource Blocks in the Dl | avgServedBlocksDl | mean, vector | blocks | ||
| avgServedBlocksUl | Average number of allocated Resource Blocks in the Dl | avgServedBlocksUl | mean, vector | blocks | ||
| macCellPacketLossD2D | Mac Cell Packet Loss D2D | macCellPacketLossD2D | mean | |||
| macBufferOverFlowD2D | Mac buffer overflow as function of time | macBufferOverFlowD2D | mean | Byte/s |
Source code
// // NR-gNB MAC with D2D support. Extends ~NrMacGnb with the device-to-device (D2D) // deltas: it enhances resource allocation procedures to enable direct // communication between UEs (network-assisted D2D). It is the NR counterpart of // ~LteMacEnbD2D. // module NrMacGnbD2D extends NrMacGnb { parameters: @class("NrMacGnbD2D"); // Use the D2D-capable AMC leaf amcType = default("NrAmcD2D"); // Use the D2D-capable uplink scheduler leaf ulSchedulerType = default("NrSchedulerGnbUlD2D"); // Feedback historical base capacity in D2D (number of stored feedback samples per UE) int fbhbCapacityD2D = default(5); bool usePreconfiguredTxParams = default(false); int d2dCqi = default(7); // Frequency reuse parameters bool reuseD2D = default(false); bool reuseD2DMulti = default(false); double conflictGraphUpdatePeriod @unit(s) = default(1s); // CG thresholds can be defined in either dBm or meters // if distances are set to -1.0, then dBm thresholds are used, // otherwise distances have priority on dBm thresholds double conflictGraphThreshold = default(90); // dBm double conflictGraphD2DInterferenceRadius @unit(m) = default(-1.0m); // Meters double conflictGraphD2DMultiTxRadius @unit(m) = default(-1.0m); // Meters double conflictGraphD2DMultiInterferenceRadius @unit(m) = default(-1.0m); // Meters // Handling of D2D mode switch bool msHarqInterrupt = default(true); bool msClearRlcBuffer = default(true); @signal[macCellPacketLossD2D]; @statistic[macCellPacketLossD2D](title="Mac Cell Packet Loss D2D"; unit=""; source="macCellPacketLossD2D"; record=mean); @signal[macBufferOverFlowD2D]; @statistic[macBufferOverFlowD2D](title="Mac buffer overflow as function of time"; unit="Byte/s"; source="macBufferOverFlowD2D"; record=mean); }File: src/simu5g/stack/d2d/mac/NrMacGnbD2D.ned