PdcpEntityBase

Package: simu5g.stack.pdcp

PdcpEntityBase

compound module

Base type of the PDCP entity of one data radio bearer: packages the transmitting and the receiving side of TS 36.323 / 38.323, plus the leg split/join stage of a multi-leg bearer (e.g. an NR dual connectivity split bearer). Created dynamically by BearerManagement, one per (peer, DRB) pair.

The lower boundary is a vector of legs, each serving a cell group (the legs parameter). A plain (MCG-only) bearer has one leg, and the TX/RX entities connect straight to it; a bearer with an SCG leg routes the TX side through a splitter (per-PDU leg choice on a split bearer, and per-leg id mapping on any SCG leg -- see DcPdcpLegSplitter), and a multi-leg bearer additionally merges all legs through a joiner into the single RX entity, whose one reorder window restores SN order across legs. BearerManagement wires each leg to a local RLC entity (UE legs, a master's MCG leg) or to the DcMux/X2 path (a DC master's SCG leg).

This base type binds no TX/RX entity types; the concrete subclasses do (LtePdcpEntity, NrPdcpEntity), so it is not instantiable on its own. A mixed entity (e.g. an EN-DC master eNB running an NR TX side with an LTE RX side) overrides just tx.typename or rx.typename from the configuration.

tx : like IPdcpTxEntity

IPdcpTxEntity: Module interface for the transmitting side of a PDCP entity.

Source:
tx: <> like IPdcpTxEntity {
    @display("p=50,50");
} rx : like IPdcpRxEntity

IPdcpRxEntity: Module interface for the receiving side of a PDCP entity.

Source:
rx: <> like IPdcpRxEntity {
    @display("p=150,50");
} splitter : like IPdcpLegSplitter

DcPdcpLegSplitter: TX-side leg dispatcher of a dual-connectivity split bearer (two legs), steering each PDCP PDU to a...

IPdcpLegSplitter: Module interface for the TX-side leg dispatcher of a PDCP entity (see ~PdcpEntityBase):...

Source:
splitter: <default("simu5g.stack.pdcp.DcPdcpLegSplitter")> like IPdcpLegSplitter if hasSplitter {
    @display("p=50,130;is=s");
} joiner : like IPdcpLegJoiner

PdcpLegJoiner: RX-side leg merger of a multi-leg PDCP entity (see ~PdcpEntityBase): relays the PDU streams of all...

IPdcpLegJoiner: Module interface for the RX-side leg merger of a multi-leg PDCP entity (see ~PdcpEntityBase):...

Source:
joiner: <default("simu5g.stack.pdcp.PdcpLegJoiner")> like IPdcpLegJoiner if numLegs > 1 {
    @display("p=150,130;is=s");
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Known subclasses

Name Type Description
LtePdcpEntity compound module

PDCP entity of an LTE data radio bearer: the PdcpEntityBase compound with its TX/RX sides bound to the LTE entity profiles (TS 36.323). Selected by BearerManagement via its pdcpEntityModuleType parameter, which defaults to this type.

NrPdcpEntity compound module

PDCP entity of an NR data radio bearer: the PdcpEntityBase compound with its TX/RX sides bound to the NR entity profiles (TS 38.323), i.e. NR-flavored statistics on the TX side and the multi-leg reorder window on the RX side. Selected by BearerManagement via its pdcpEntityModuleType parameter (set by NrNicUe/NrNicEnb, and on EN-DC master eNBs from the configuration).

Parameters

Name Type Default value Description
numLegs int 1

Number of RLC legs of this bearer

legs string numLegs == 1 ? "MCG" : "MCG SCG"

Cell group of each leg, space-separated, in leg-index order

hasSplitter bool numLegs > 1 || legs != "MCG"

The TX side routes through the splitter whenever a leg needs its per-leg id mapping

headerCompressedSize int -1B
rlcMode string "UM"

Forwarded to tx only; determines the PDCP header size

Properties

Name Value Description
dynamic true
display i=block/wheelbarrow

Gates

Name Direction Size Description
upperIn input

SDUs from IP (via PdcpMux)

upperOut output

Reassembled SDUs to IP (via PdcpMux)

legOut [ ] output numLegs

PDUs to leg k (RLC entity, or DcMux/X2)

legIn [ ] input numLegs

PDUs from leg k

Source code

//
// Base type of the PDCP entity of one data radio bearer: packages the
// transmitting and the receiving side of TS 36.323 / 38.323, plus the leg
// split/join stage of a multi-leg bearer (e.g. an NR dual connectivity split
// bearer). Created dynamically by BearerManagement, one per (peer, DRB) pair.
//
// The lower boundary is a vector of legs, each serving a cell group (the legs
// parameter). A plain (MCG-only) bearer has one leg, and the TX/RX entities
// connect straight to it; a bearer with an SCG leg routes the TX side through
// a splitter (per-PDU leg choice on a split bearer, and per-leg id mapping on
// any SCG leg -- see ~DcPdcpLegSplitter), and a multi-leg bearer additionally
// merges all legs through a joiner into the single RX entity, whose one
// reorder window restores SN order across legs. BearerManagement wires each
// leg to a local RLC entity (UE legs, a master's MCG leg) or to the DcMux/X2
// path (a DC master's SCG leg).
//
// This base type binds no TX/RX entity types; the concrete subclasses do
// (~LtePdcpEntity, ~NrPdcpEntity), so it is not instantiable on its own. A
// mixed entity (e.g. an EN-DC master eNB running an NR TX side with an LTE RX
// side) overrides just tx.typename or rx.typename from the configuration.
//
module PdcpEntityBase
{
    parameters:
        @dynamic(true);
        @display("i=block/wheelbarrow");
        int numLegs = default(1);                  // Number of RLC legs of this bearer
        string legs = default(numLegs == 1 ? "MCG" : "MCG SCG");  // Cell group of each leg, space-separated, in leg-index order
        bool hasSplitter = numLegs > 1 || legs != "MCG";  // The TX side routes through the splitter whenever a leg needs its per-leg id mapping
        int headerCompressedSize @unit(B) = default(-1B);
        *.headerCompressedSize = default(this.headerCompressedSize);
        string rlcMode @enum(TM,UM,AM) = default("UM");   // Forwarded to tx only; determines the PDCP header size
        *.rlcMode = default(this.rlcMode);
        *.numLegs = this.numLegs;
        *.legs = this.legs;
        *.emitPerSduSignals = !this.hasSplitter;   // Where the splitter is present, it emits the per-leg statistics
        *.reorderingEnabled = this.numLegs > 1;    // Reorder the SN stream merged from several legs
    gates:
        input upperIn;            // SDUs from IP (via PdcpMux)
        output upperOut;          // Reassembled SDUs to IP (via PdcpMux)
        output legOut[numLegs];   // PDUs to leg k (RLC entity, or DcMux/X2)
        input legIn[numLegs];     // PDUs from leg k
    submodules:
        tx: <> like IPdcpTxEntity {
            @display("p=50,50");
        }
        rx: <> like IPdcpRxEntity {
            @display("p=150,50");
        }
        splitter: <default("simu5g.stack.pdcp.DcPdcpLegSplitter")> like IPdcpLegSplitter if hasSplitter {
            @display("p=50,130;is=s");
        }
        joiner: <default("simu5g.stack.pdcp.PdcpLegJoiner")> like IPdcpLegJoiner if numLegs > 1 {
            @display("p=150,130;is=s");
        }
    connections:
        upperIn --> { @display("m=n"); } --> tx.in;
        rx.out --> { @display("m=n"); } --> upperOut;

        // TX side: straight to the leg, or through the splitter (leg choice + id mapping)
        tx.out --> { @display("m=s"); } --> legOut[0] if !hasSplitter;
        tx.out --> splitter.in if hasSplitter;
        for i=0..numLegs-1 {
            splitter.out++ --> { @display("m=s"); } --> legOut[i] if hasSplitter;
        }

        // RX side: straight from the single leg, or all legs merged through the joiner
        legIn[0] --> { @display("m=s"); } --> rx.in if numLegs == 1;
        joiner.out --> rx.in if numLegs > 1;
        for i=0..numLegs-1 {
            legIn[i] --> { @display("m=s"); } --> joiner.in++ if numLegs > 1;
        }
}
File: src/simu5g/stack/pdcp/PdcpEntityBase.ned