LteMacEnbD2D¶
Package: simu5g.stack.d2d.mac
compound module LteMacEnbD2D
Extends LTE MAC functionalities at the eNodeB side to support device-to-device (D2D) communications. Specifically, it enhances resource allocation procedures to enable direct communication between User Equipments (UEs), i.e., it allocates resources for D2D transmissions. Network-assisted D2D is only implemented (out-of-coverage D2D is not supported).
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
compound module |
Extends the LteMacBase module by providing specific MAC functions on the eNodeB side. Specifically, it initializes and manages the scheduling classes responsible for resource allocation operations in both uplink and downlink directions, while also supporting Carrier Aggregation (CA). It manages the Random Access procedure (RAC) and the reception of Buffer Status Reports (BSRs) from UEs, as well as the transmission of scheduling grants to UEs allocated within the uplink bandwidth. For downlink connections, it notifies the Radio Link Control (RLC) layer when it is ready to receive MAC Service Data Units (SDUs) to build MAC Protocol Data Units (PDUs) and transmit them 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 |
MAC Buffers queue size |
harqProcesses |
int |
8 |
|
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 |
“LteAmcD2D” |
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 |
“LteSchedulerEnbUlD2D” |
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 |
||
d2dBinderModule |
string |
“d2dBinder” |
The network’s D2dBinder, which holds the D2D state |
connectionControlModule |
string |
“^.rrc.connectionControl” |
The node’s control-plane entry point, which knows the UEs handing over |
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 |
dBm |
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 |
|---|---|---|
class |
LteMacEnbD2D |
|
display |
i=block/mac |
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 |
|---|---|---|---|
avgServedBlocksDl |
|||
avgServedBlocksUl |
|||
grantSent |
|||
harqErrorRate_1st_Dl |
|||
harqErrorRate_1st_Ul |
|||
harqErrorRate_2nd_Dl |
|||
harqErrorRate_2nd_Ul |
|||
harqErrorRate_3rd_Dl |
|||
harqErrorRate_3rd_Ul |
|||
harqErrorRate_4th_Dl |
|||
harqErrorRate_4th_Ul |
|||
harqErrorRateDl |
|||
harqErrorRateUl |
|||
harqTxAttemptsDl |
|||
harqTxAttemptsUl |
|||
macBufferOverFlowD2D |
|||
macBufferOverFlowDl |
|||
macBufferOverFlowUl |
|||
macCellPacketLossD2D |
|||
macCellPacketLossDl |
|||
macCellPacketLossUl |
|||
macDelayDl |
|||
macDelayUl |
|||
macPacketLossDl |
|||
macPacketLossUl |
|||
macPduAcked |
|||
macPduDiscarded |
|||
macThroughputDl |
|||
macThroughputUl |
|||
receivedPacketFromLowerLayer |
|||
receivedPacketFromUpperLayer |
|||
rlcPduDiscarded |
|||
sentPacketToLowerLayer |
|||
sentPacketToUpperLayer |
|||
ulMacPduArrived |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
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 |
||
harqErrorRate_1st_Dl |
Harq Error Rate Dl (1st tx) |
harqErrorRate_1st_Dl |
mean,vector |
|||
harqErrorRate_1st_Ul |
Harq Error Rate Ul (1st tx) |
harqErrorRate_1st_Ul |
mean,vector |
|||
harqErrorRate_2nd_Dl |
Harq Error Rate Dl (2nd tx) |
harqErrorRate_2nd_Dl |
mean,vector |
|||
harqErrorRate_2nd_Ul |
Harq Error Rate Ul (2nd tx) |
harqErrorRate_2nd_Ul |
mean,vector |
|||
harqErrorRate_3rd_Dl |
Harq Error Rate Dl (3rd tx) |
harqErrorRate_3rd_Dl |
mean,vector |
|||
harqErrorRate_3rd_Ul |
Harq Error Rate Ul (3rd tx) |
harqErrorRate_3rd_Ul |
mean,vector |
|||
harqErrorRate_4th_Dl |
Harq Error Rate Dl (4th tx) |
harqErrorRate_4th_Dl |
mean,vector |
|||
harqErrorRate_4th_Ul |
Harq Error Rate Ul (4th tx) |
harqErrorRate_4th_Ul |
mean,vector |
|||
harqErrorRateDl |
Harq Error Rate Dl |
harqErrorRateDl |
mean,vector |
|||
harqErrorRateUl |
Harq Error Rate Ul |
harqErrorRateUl |
mean,vector |
|||
harqTxAttemptsDl |
Harq Tx Attempts Dl |
harqTxAttemptsDl |
mean,vector |
|||
harqTxAttemptsUl |
Harq Tx Attempts Ul |
harqTxAttemptsUl |
mean,vector |
|||
macBufferOverFlowD2D |
Mac buffer overflow as function of time |
macBufferOverFlowD2D |
mean |
Byte/s |
||
macBufferOverFlowDl |
Mac buffer overflow as function of time |
macBufferOverFlowDl |
mean |
Byte/s |
||
macBufferOverFlowUl |
Mac buffer overflow as function of time |
macBufferOverFlowUl |
mean |
Byte/s |
||
macCellPacketLossD2D |
Mac Cell Packet Loss D2D |
macCellPacketLossD2D |
mean |
|||
macCellPacketLossDl |
Mac Cell Packet Loss Dl |
macCellPacketLossDl |
mean |
|||
macCellPacketLossUl |
Mac Cell Packet Loss Ul |
macCellPacketLossUl |
mean |
|||
macDelayDl |
Delay at the MAC layer UL |
macDelayDl |
mean,vector |
s |
||
macDelayUl |
Delay at the MAC layer UL |
macDelayUl |
mean,vector |
s |
||
macPacketLossDl |
Mac Packet Loss Dl |
macPacketLossDl |
mean |
|||
macPacketLossUl |
Mac Packet Loss Ul |
macPacketLossUl |
mean |
|||
macThroughputDl |
Throughput at the MAC layer DL |
macThroughputDl |
simu5g_rateavg |
Bps |
||
macThroughputUl |
Throughput at the MAC layer UL |
macThroughputUl |
simu5g_rateavg |
Bps |
||
receivedPacketFromLowerLayer |
receivedPacketFromLowerLayer |
count,”sum(packetBytes)”,”vector(packetBytes)” |
none |
|||
receivedPacketFromUpperLayer |
receivedPacketFromUpperLayer |
count,”sum(packetBytes)”,”vector(packetBytes)” |
none |
|||
sentPacketToLowerLayer |
sentPacketToLowerLayer |
count,”sum(packetBytes)”,”vector(packetBytes)” |
none |
|||
sentPacketToUpperLayer |
sentPacketToUpperLayer |
count,”sum(packetBytes)”,”vector(packetBytes)” |
none |
Source code¶
//
// Extends LTE MAC functionalities at the eNodeB side to support device-to-device (D2D)
// communications. Specifically, it enhances resource allocation procedures to enable direct
// communication between User Equipments (UEs), i.e., it allocates resources for D2D transmissions.
// Network-assisted D2D is only implemented (out-of-coverage D2D is not supported).
//
module LteMacEnbD2D extends LteMacEnb
{
parameters:
@class("LteMacEnbD2D");
string d2dBinderModule = default("d2dBinder"); // The network's ~D2dBinder, which holds the D2D state
string connectionControlModule = default("^.rrc.connectionControl"); // The node's control-plane entry point, which knows the UEs handing over
// Use the D2D-capable AMC leaf
amcType = default("LteAmcD2D");
// Use the D2D-capable uplink scheduler leaf
ulSchedulerType = default("LteSchedulerEnbUlD2D");
// 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);
}