PDSCH#
This module contains classes related to the Physical Downlink Shared Channel, PDSCH, as well as to Channel State Information Reference Signals, CSI-RS.
- class aerial.phy5g.pdsch.pdsch_tx_base.PdschTxPipeline#
A base class for PDSCH transmitter pipeline implementations.
- abstract __call__(slot, tb_inputs, config, **kwargs)#
Abstract method that runs the transmitter pipeline.
This method gives the signature that the transmitter pipelines should implement.
- Parameters:
slot (int) – Slot number.
tb_inputs (List[Array]) – List of transport blocks, one per UE.
config (List[_SlotConfigT]) – Dynamic slot configuration in this slot. Note that the type of this configuration should be derived from SlotConfig.
kwargs (Any)
- Returns:
Transmitted OFDM symbols in a frequency x time x antenna tensor.
- Return type:
Array
- class aerial.phy5g.pdsch.pdsch_tx.PdschTxPipelineFactory#
Factory for building a PdschTx pipeline.
- create(config, cuda_stream, **kwargs)#
Create the pipeline.
- Parameters:
config (AerialPdschTxConfig) – Pipeline configuration object.
cuda_stream (int) – CUDA stream used to run the pipeline.
kwargs (Any)
- Returns:
A PdschTx pipeline object.
- Return type:
- class aerial.phy5g.pdsch.pdsch_tx.PdschTx#
PDSCH transmitter.
This class implements the whole PDSCH transmission pipeline from the transmitted transport block to the transmitted frequency-domain symbols.
- __init__(
- cell_id,
- num_rx_ant,
- num_tx_ant,
- num_ul_bwp=273,
- num_dl_bwp=273,
- mu=1,
- cuda_stream=None,
Initialize PdschTx.
- Parameters:
cell_id (int) – Physical cell ID.
num_rx_ant (int) – Number of receive antennas.
num_tx_ant (int) – Number of transmit antennas.
num_ul_bwp (int) – Number of PRBs in a uplink bandwidth part. Default: 273.
num_dl_bwp (int) – Number of PRBs in a downlink bandwidth part. Default: 273.
mu (int) – Numerology. Values in [0, 3]. Default: 1.
cuda_stream (int) – The CUDA stream. If not given, one will be created.
- Return type:
None
- __call__(
- slot,
- tb_inputs,
- config,
- csi_rs_config=None,
- **kwargs,
Run the transmitter pipeline.
Note: This implements the base class abstract method.
- Parameters:
slot (int) – Slot number.
tb_inputs (List[Array]) – Transport blocks to be transmitted, one per UE.
config (List[PdschConfig]) – Dynamic slot configuration in this slot.
csi_rs_config (List[CsiRsConfig]) – Optional parameters for CSI-RS. Note: This only leaves the CSI-RS REs empty. To actually add in the CSI-RS signals, one needs to call the CSI-RS transmitter separately.
kwargs (Any)
- Returns:
Transmitted OFDM symbols in a frequency x time x antenna tensor.
- Return type:
Array
- run(
- tb_inputs,
- slot=0,
- pdsch_configs=None,
- num_ues=1,
- num_dmrs_cdm_grps_no_data=2,
- dmrs_scrm_id=41,
- resource_alloc=1,
- prb_bitmap=None,
- start_prb=0,
- num_prbs=273,
- dmrs_syms=None,
- start_sym=2,
- num_symbols=12,
- scids=None,
- layers=None,
- dmrs_ports=None,
- bwp_starts=None,
- ref_points=None,
- rntis=None,
- data_scids=None,
- precoding_matrices=None,
- mcs_tables=None,
- mcs_indices=None,
- code_rates=None,
- mod_orders=None,
- rvs=None,
- num_prb_lbrms=None,
- max_layers=None,
- max_qms=None,
- csi_rs_configs=None,
Run PDSCH transmission.
Set dynamic PDSCH parameters and call cuPHY to run the PDSCH transmission.
If the input transport blocks are on the GPU, also the output will be on the GPU. If they are on the host (NumPy arrays), also the output will be on the host.
- Parameters:
tb_inputs (List[np.ndarray]) – Transport blocks in bytes for each UE.
num_ues (int) – Number of UEs.
slot (int) – Slot number.
num_dmrs_cdm_grps_no_data (int) – Number of DMRS CDM groups without data [3GPP TS 38.212, sec 7.3.1.1]. Value: 1->3.
dmrs_scrm_id (int) – Downlink DMRS scrambling ID.
resource_alloc (int) – Resource allocation type.
prb_bitmap (List[int]) – Array of bits indicating bitmask for allocated RBs.
start_prb (int) – Start PRB index for the UE group.
num_prbs (int) – Number of allocated PRBs for the UE group.
dmrs_syms (List[int]) – For the UE group, a list of binary numbers each indicating whether the corresponding symbol is a DMRS symbol.
start_sym (int) – Start OFDM symbol index of the UE group allocation.
num_symbols (int) – Number of symbols in the allocation, starting from start_sym.
scids (List[int]) – DMRS sequence initialization for each UE [TS38.211, sec 7.4.1.1.2].
layers (List[int]) – Number of layers for each UE.
dmrs_ports (List[int]) – DMRS ports for each UE. The format of each entry is in the SCF FAPI format as follows: A bitmap (mask) starting from the LSB where each bit indicates whether the corresponding DMRS port index is used.
bwp_starts (List[int]) – Bandwidth part start (PRB number starting from 0). Used only if reference point is 1.
ref_points (List[int]) – DMRS reference point per UE. Value 0 or 1.
rntis (List[int])
data_scids (List[int]) – Data scrambling IDs for each UE, more precisely dataScramblingIdentityPdsch [TS38.211, sec 7.3.1.1].
precoding_matrices (List[np.ndarray]) – Precoding matrices, one per UE. The shape of each precoding matrix is number of layers x number of Tx antennas. If set to None, precoding is disabled.
mcs_tables (List[int]) – MCS table per UE.
mcs_indices (List[int]) – MCS index per UE.
code_rates (List[int]) – Code rate, expressed as the number of information bits per 1024 coded bits expressed in 0.1 bit units.
mod_orders (List[int]) – Modulation order for each UE.
rvs (List[int]) – Redundancy version per UE (default: 0 for each UE).
num_prb_lbrms (List[int]) – Number of PRBs used for LBRM TB size computation. Possible values: {32, 66, 107, 135, 162, 217, 273}.
max_layers (List[int]) – Number of layers used for LBRM TB size computation (at most 4).
max_qms (List[int]) – Modulation order used for LBRM TB size computation. Value: 6 or 8.
csi_rs_configs (List[CsiRsConfig]) – List of CSI-RS RRC dynamic parameters, see CsiRsConfig. Note that no CSI-RS symbols get written, this is only to make sure that PDSCH does not get mapped to the CSI-RS resource elements.
pdsch_configs (List[PdschConfig] | None)
- Returns:
Transmitted OFDM symbols in a frequency x time x antenna tensor.
- Return type:
Array
- ldpc_output()#
Return the coded bits from LDPC encoder output.
Note: This is returned always as a NumPy array, i.e. in host memory.
- Returns:
- Coded bits in a num_codewords x num_bits_per_codeword tensor,
one per UE.
- Return type:
List[np.array]
- classmethod cuphy_to_tx(
- tx_slot,
- num_ues,
- dmrs_ports,
- scids,
- precoding_matrices=None,
Map cuPHY outputs to Tx antenna ports.
- Parameters:
tx_slot (Array) – Transmit buffer from cuPHY.
num_ues (int) – Number of UEs.
dmrs_ports (List[int]) – DMRS ports for each UE. The format of each entry is in the SCF FAPI format as follows: A bitmap (mask) starting from the LSB where each bit indicates whether the corresponding DMRS port index is used.
scids (List[int]) – DMRS sequence initialization for each UE [TS38.211, sec 7.4.1.1.2].
precoding_matrices (List[np.ndarray]) – Precoding matrices, one per UE. The shape of each precoding matrix is number of layers x number of Tx antennas. If set to None, precoding is disabled.
- Returns:
Transmitted OFDM symbols in a frequency x time x antenna tensor.
- Return type:
Array
- class aerial.phy5g.pdsch.csirs_tx.CsiRsTx#
CSI-RS transmitter.
This class implements CSI-RS transmission within a slot.
- __init__(num_prb_dl_bwp, cuda_stream=None)#
Initialize CsiRsTx.
- Parameters:
num_prb_dl_bwp (List[int]) – Number of PRBs in DL BWP.
cuda_stream (int) – The CUDA stream. If not given, one will be created.
- Return type:
None
- run(csirs_cell_dyn_prms, tx_buffers, precoding_matrices=None)#
Run CSI-RS transmission.
Fills CSI-RS into the transmit buffers given as input, based on given CSI-RS parameters.
The method can be called using either Numpy or CuPy arrays. In case the input arrays are located on the GPU (CuPy), the output will be on the GPU (CuPy). So the return type shall be the same as used for tx_buffers when calling the method.
- Parameters:
csirs_cell_dyn_prms (List[CsiRsCellDynPrms]) – A list of CSI-RS cell dynamic parameters, one entry per cell. See CsiRsCellDynPrms.
tx_buffers (List[Array]) – A list of transmit slot buffers, one per cell. These represent the slot buffers prior to inserting the CSI-RS.
precoding_matrices (List[CsiRsPmwOneLayer]) – A list of precoding matrices. This list gets indexed by the pmw_prm_idx field in CsiRsRrcDynPrms (part of CsiRsCellDynPrms).
- Returns:
Transmit buffers for the slot for each cell after inserting CSI-RS.
- Return type:
List[Array]