NR SA DMRS - PDSCH, Antenna Port
The purpose of this tutorial is to show you how to configure PDSCH DMRS and Antenna Port in DCI 1_1. PDSCH DMRS (DeModulation Reference Signal) is a kind of reference signal that is used for channel estimation and helps to decode PDSCH. The exact position is determined by following factors.
- RRC parameter configured in DMRS-DownlinkConfig : This determines mostly about the time domain position (i.e, the OFDM symbols) of DMRS and DMRS type (details)
- MIMO configuration configured in DCI : This determines mostly about the frequeny domain position (i.e, the frequency offset of the starting position). (details)
Theoretically, if you put more number of symbols for DMRS, you may get better decoding result (i.e, lower BLER), but the number of the RE (resource elements) for user data (PDSCH) is reduced since some of the symbols are used for DMRS. As a rule of thumb, in most of cases it is recommended to use two symbols for DMRS. If you use only one symbol for DMRS, it is highly likely to have high BLER. If you use more than two symbols for DMRS, you would sacrifice too much in terms of ideal (max) throughput.
Table of Contents
- NR SA DMRS - PDSCH, Antenna Port
- Introduction
- Summary of the Tutorial
- Test Setup
- Key Configuration Parameters
- Test 1 : Table 7.3.1.2.2-1
- Configuration
- Perform the Test
- Log Analysis
- Sub Test 1 : Value = 0
- Sub Test 2 : Value = 1
- Sub Test 3 : Value = 2
- Sub Test 4 : Value = 7
- Sub Test 5 : Value = 9
- Test 2 : Table 7.3.1.2.2-2
- RRC / NAS Signaling
Introduction
The configuration of PDSCH DMRS (Physical Downlink Shared Channel DeModulation Reference Signal) and Antenna Port assignment in DCI 1_1 is a foundational aspect of 5G NR (New Radio) physical layer procedures, directly influencing data channel reliability and throughput. In 5G NR, the PDSCH serves as the primary channel for delivering user data, and its robust decoding relies heavily on accurate channel estimation, which is facilitated by DMRS. The DMRS are specialized reference signals embedded within the PDSCH transmission, enabling the receiving UE (User Equipment) to estimate the wireless channel and properly demodulate downlink data. The position and configuration of DMRS in time and frequency domains are dictated by multiple factors: RRC (Radio Resource Control) signaling, which establishes the overall DMRS configuration in the DMRS-DownlinkConfig, and dynamic parameters conveyed in DCI (Downlink Control Information), which may adjust aspects such as antenna port mapping and frequency offset at transmission time. The selection of DMRS symbol positions, types (Type 1 or Type 2), and the number of symbols allocated, directly impacts both channel estimation quality and the available capacity for user data, requiring careful balancing based on deployment scenarios and desired performance. Antenna port configuration further enables advanced MIMO (Multiple-Input Multiple-Output) schemes, enhancing spectral efficiency and reliability. Configuring these parameters correctly is critical for optimizing link-level performance, minimizing block error rate (BLER), and maximizing throughput, forming a vital part of physical layer optimization in modern 5G networks.
-
Context and Background
- PDSCH DMRS is integral to 5G NR downlink, enabling accurate channel estimation for user data decoding.
- Configuration parameters are managed through a combination of RRC signaling and dynamic DCI assignments.
- Antenna port mapping is essential for supporting MIMO, spatial multiplexing, and beamforming capabilities.
- The balance between DMRS allocation and data REs (Resource Elements) directly affects BLER and system throughput.
-
Relevance and Importance
- Correct configuration of DMRS and antenna ports ensures robust, high-performance 5G data delivery.
- Misconfiguration can lead to degraded link quality, higher error rates, or inefficient resource usage.
- This topic is crucial for engineers involved in 5G NR physical layer development, testing, and optimization.
-
Tutorial Learning Outcomes
- Understand the role and configuration of PDSCH DMRS in 5G NR systems.
- Gain insights into the interaction between RRC and DCI in DMRS and antenna port assignment.
- Learn how to balance channel estimation needs with data throughput requirements.
- Acquire practical knowledge for configuring and optimizing PDSCH DMRS and antenna ports in real-world scenarios.
-
Prerequisite Knowledge
- Familiarity with 5G NR architecture and physical layer concepts.
- Basic understanding of OFDM, resource elements, and MIMO techniques.
- Awareness of RRC and DCI signaling in 5G systems.
Summary of the Tutorial
This tutorial details procedures for low layer DMRS configuration and MIMO testing using Amarisoft callbox, focusing on TS 38.212 Table 7.3.1.2.2-1 and Table 7.3.1.2.2-2. The tests demonstrate how to set up and verify various DMRS patterns and MIMO schemes, including multiple subtests for different DMRS values.
-
Test Setup:
- Uses the default SIM card supplied with the system.
- Does not require complex IP layer configuration.
- Refer to the Configuration Guide for optional changes.
-
Key Configuration Parameters:
- Relevant for DMRS and MIMO: mapping_type, dmrs_add_pos, dmrs_max_len, dmrs_type, dmrs_scid0, dmrs_scid1, dmrs_len, n_dmrs_cdm_groups, dmrs_ports, n_layers.
- Individual setting of these parameters is required in Amarisoft; single-value mappings from 3GPP are not supported.
-
Test 1: Table 7.3.1.2.2-1 (DMRS Configurations for SISO to 4x4 MIMO)
-
Configuration Steps:
- Start from provided config file (gnb-sa-dmrs-7-3-1-2-2-1.cfg), based on gnb-sa.cfg.
- Set N_ANTENNA_DL to 4 to enable up to 4x4 MIMO.
- Individually configure dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups, dmrs_ports to match required DMRS pattern.
-
Test Execution Procedure:
- Run the test and verify the number of physical antennas using the cell phy command (ANT parameter shows allocated antennas).
- Initiate a call and confirm connection status using the t command.
- For detailed confirmation (number of layers, DMRS pattern), review logs.
-
Log Analysis:
- Check RRC Setup log to confirm DMRS configuration and applied table.
- Verify maxMIMO-Layers in pdsch-ServingCellConfig to ensure the intended maximum number of layers.
- Inspect DCI 1_1 to confirm antenna_ports value matches configuration (e.g., value = 10 for 4x4 MIMO).
-
Subtests (for values 0, 1, 2, 7, 9 in Table 7.3.1.2.2-1):
- For each subtest, set N_ANTENNA_DL to 4 and configure DMRS parameters to match the specific value from the 3GPP table.
- Repeat the procedure:
- Configure parameters individually (as above).
- Run the test, check physical antenna count (cell phy).
- Set up and verify call connection (t command).
- Review DCI 1_1 logs to confirm antenna_ports matches expected value (0, 1, 2, 7, 9).
-
Configuration Steps:
-
Test 2: Table 7.3.1.2.2-2 (Alternative DMRS Patterns)
-
Configuration Steps:
- Start from gnb-sa-dmrs-7-3-1-2-2-2.cfg, based on gnb-sa.cfg.
- Set N_ANTENNA_DL to 4.
- Individually configure dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups, dmrs_ports for the desired pattern.
-
Test Execution Procedure:
- Run the test, verify physical antenna count using cell phy.
- Set up a call and confirm connection via t command.
- Check logs for confirmation of number of layers and DMRS pattern.
-
Log Analysis:
- Confirm correct table selection and DMRS configuration in the RRC log.
- Check DCI 1_1 to verify antenna_ports value aligns with the intended configuration (e.g., value = 28).
-
Configuration Steps:
General Notes on Test Methodology:
- For every DMRS/MIMO configuration, parameters must be set individually in Amarisoft, not as a single code value.
- Physical antenna count can be checked using cell phy, while dynamic layer usage is best verified through logs.
- Throughput and log analysis help infer actual layer usage during high data rate scenarios.
- DCI 1_1's antenna_ports must be checked for each configuration to ensure correct mapping to the desired DMRS/MIMO scheme.
Test Setup
Test setup for this tutorial is as shown below. This is just for low layer testing, you may not need any complicated IP layer setup.
- SIM Card used in this tutorial is the one delivered with the system as it is.
- If you want to change the configuration, The tutorial Configuration Guide would help

Key Configuration Parameters
Followings are important configuration parameters for this tutorial. You may click on the items for the descriptions from Amarisoft documents.
- pdsch : In this link, you would get the descriptions for all the items listed below
- mapping_type
- dmrs_add_pos
- dmrs_max_len
- dmrs_type
- dmrs_scid0
- dmrs_scid1
- dmrs_len
- n_dmrs_cdm_groups
- dmrs_ports
- n_layers
Test 1 : Table 7.3.1.2.2-1
The purpose of this test is to provide an example of how to configure a specific DMRS configuration for SISO/MIMO (from SISO up to 4x4 MIMO). In terms of 3GPP, this configuration is specified by TS 38.212 Table 7.3.1.2.2-1: Antenna port(s) (1000 + DMRS port), dmrs-Type=1, maxLength=1. According to the specification, there are multiple options of DMRS patterns to choose even for the same MIMO scheme. It means just setting the number of antenna may not be enough to specify MIMO scheme accurately. If you don't care much about the detailed DMRS pattern, you can just specify the number of antenna and let Callbox software to choose whatever DMRS pattern it likes. However if you are interested in controlling the details of MIMO configuration, this test would help.
Configuration
I have used gnb-sa-dmrs-7-3-1-2-2-1.cfg which is copied and modified from gnb-sa.cfg

I am using the default mme, ims config as shown below.

In gnb-sa-dmrs-7-3-1-2-2-1.cfg, it is configured as follows.
N_ANTENNA_DL is set to 4 to enable a maximum of four downlink transmit antennas. This allows the Callbox to support configurations up to 4×4 MIMO and to use the DMRS antenna-port combinations defined for as many as four layers.
Setting N_ANTENNA_DL to 4 specifies the available physical antenna capability, but it does not force every PDSCH transmission to use four layers. Depending on the configured transmission mode, UE capability, channel condition, and scheduling decision, the actual PDSCH transmission may use one, two, three, or four layers.

In the 3GPP specification, the Antenna Port field in DCI format 1_1 is represented by a single index. Each index maps to a predefined combination of DMRS configuration type, maximum front-loaded DMRS length, number of transmission layers, number of DMRS CDM groups without data, and DMRS antenna ports.
In the Amarisoft Callbox configuration, this index is not entered directly. Instead, the corresponding properties are configured individually using dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups, and dmrs_ports.
The dmrs_type and dmrs_max_len parameters determine which antenna-port mapping table in TS 38.212 is applicable. In this example:
dmrs_type: 1
dmrs_max_len: 1
These settings select TS 38.212 Table 7.3.1.2.2-1. The remaining parameters select a specific entry within that table:
n_layer: 4
n_dmrs_cdm_groups: 2
dmrs_ports: [0,1,2,3]
This combination corresponds to Antenna Port field value 10 in Table 7.3.1.2.2-x. It configures a four-layer PDSCH transmission using DMRS ports 1000, 1001, 1002, and 1003, with two DMRS CDM groups without data.

Perform the Test
Start the Callbox with the test configuration and use the cell phy command to verify the configured number of physical antennas.
In the command output, ANT under the DL section is shown as 4, confirming that four downlink physical antenna paths are allocated to the cell. The UL ANT value remains 1, as configured by N_ANTENNA_UL.
The ANT value represents the maximum number of physical antenna paths available for the test. It does not indicate the number of PDSCH layers or DMRS ports currently used by each transmission. The actual rank, DMRS port combination, and CDM-group configuration are selected dynamically according to the PDSCH configuration and scheduling.

Then establish a UE connection and run the t command to confirm that the call is operating normally.
The trace output shows the UE in the connected state with active downlink and uplink traffic. The displayed CQI, rank indicator, MCS, retransmission count, throughput, SNR, PHR, path loss, and timing-advance values can be used to verify that scheduling and data transmission are working correctly before checking the detailed PDSCH DMRS and antenna-port configuration.

Log Analysis
First check the RRC log to confirm that the PDSCH DMRS configuration has been signalled as intended. In this example, the relevant information is included in the RRC Setup message under pdsch-Config → dmrs-DownlinkForPDSCH-MappingTypeA.
Only dmrs-AdditionalPosition is explicitly shown. The fields dmrs-Type and maxLength are absent, so the UE applies their default values: dmrs-Type = type , maxLength = len1 . This combination selects 38.212 - Table 7.3.1.2.2-1 through Table 7.3.1.2.2-4 for interpreting the Antenna Port field carried in DCI format 1_1.

Next, check maxMIMO-Layers under pdsch-ServingCellConfig. In this example, maxMIMO-Layers is set to 4, indicating that the UE may receive PDSCH using up to four transmission layers.
This value defines only the maximum supported layer count for the serving cell. It does not mean that every PDSCH transmission uses four layers. The gNB can dynamically select a lower rank, such as one or two layers, according to the scheduling decision, UE capability, channel condition, and selected DMRS antenna-port combination.

Check DCI format 1_1 and verify the antenna_ports field. In this example, antenna_ports is set to 10.
This confirms that the configured combination of dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups, and dmrs_ports has been mapped to Antenna Port field value 10 in TS 38.212 Table 7.3.1.2.2-1.
For this table, value 10 represents four transmission layers using DMRS ports 1000, 1001, 1002, and 1003 with two CDM groups without data. Therefore, this particular PDSCH transmission is scheduled as rank 4, corresponding to 4-layer MIMO.

Sub Test 1 : Value = 0
This subtest is to show how to configure and verify of the value = 0 in 38.212 - Table 7.3.1.2.2-1
N_ANTENNA_DL is set to 4 to enable a maximum of four downlink transmit antennas. This allows the Callbox to support configurations up to 4×4 MIMO and to use the DMRS antenna-port combinations defined for as many as four layers.
Setting N_ANTENNA_DL to 4 specifies the available physical antenna capability, but it does not force every PDSCH transmission to use four layers. Depending on the configured transmission mode, UE capability, channel condition, and scheduling decision, the actual PDSCH transmission may use one, two, three, or four layers.

In the 3GPP specification, the Antenna Port field in DCI format 1_1 is represented by a single index. Each index maps to a predefined combination of DMRS configuration type, maximum front-loaded DMRS length, number of transmission layers, number of DMRS CDM groups without data, and DMRS antenna ports.
In the Amarisoft Callbox configuration, this index is not entered directly. Instead, the corresponding properties are configured individually using dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups, and dmrs_ports.
The dmrs_type and dmrs_max_len parameters determine which antenna-port mapping table in TS 38.212 is applicable. In this example:
dmrs_type: 1
dmrs_max_len: 1
These settings select TS 38.212 Table 7.3.1.2.2-1. The remaining parameters select a specific entry within that table:
n_layer: 1
n_dmrs_cdm_groups: 2
dmrs_ports: [0]
This combination corresponds to Value field 0 in Table 7.3.1.2.2-1.

Perform the test.
First run the test and check on the number of physical antenna using cell phy command. (
In this example, the DL section shows: ANT = 4, NL = 4
ANT = 4 confirms that four downlink physical antenna paths are configured. NL = 4 indicates that the cell supports up to four downlink transmission layers. This is consistent with the configured 4×4 MIMO capability, but it does not mean that every PDSCH transmission always uses four layers. The actual number of layers is selected dynamically for each scheduled transmission.

Then setup a call and make it sure that call connection is OK using t command.
The trace shows the UE in the connected state with active downlink and uplink traffic. The DL ri field is 4, indicating that the current PDSCH transmission is using four layers. This is consistent with the configured antenna_ports value 10 and the four-layer DMRS port assignment. The CQI, MCS, retransmission count, throughput, SNR, PHR, path loss, and timing-advance values can also be monitored to verify overall link operation.

Check DCI 1_1 and see if antenna_ports is set as intended. In this specific example, antenna_ports value is set to 0. You need to compare this value with the dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups and dmrs_ports and 38.212 - Table 7.3.1.2.2-1 through Table 7.3.1.2.2-4
For dmrs-Type = type1 and maxLength = len1, value 0 in TS 38.212 Table 7.3.1.2.2-1 indicates a single-layer PDSCH transmission using DMRS port 1000 and one DMRS CDM group without data.
This shows that although the cell is configured to support up to four layers, the gNB can dynamically switch the actual PDSCH transmission from four layers to one layer. The physical antenna count remains four, while the number of layers and corresponding DMRS antenna-port assignment can change for each scheduled PDSCH.

Sub Test 2 : Value = 1
This subtest is to show how to configure and verify of the value = 1 in 38.212 - Table 7.3.1.2.2-1
N_ANTENNA_DL is set to 4 to enable a maximum of four downlink transmit antennas. This allows the Callbox to support configurations up to 4×4 MIMO and to use the DMRS antenna-port combinations defined for as many as four layers.
Setting N_ANTENNA_DL to 4 specifies the available physical antenna capability, but it does not force every PDSCH transmission to use four layers. Depending on the configured transmission mode, UE capability, channel condition, and scheduling decision, the actual PDSCH transmission may use one, two, three, or four layers.

In the 3GPP specification, the Antenna Port field in DCI format 1_1 is represented by a single index. Each index maps to a predefined combination of DMRS configuration type, maximum front-loaded DMRS length, number of transmission layers, number of DMRS CDM groups without data, and DMRS antenna ports.
In the Amarisoft Callbox configuration, this index is not entered directly. Instead, the corresponding properties are configured individually using dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups, and dmrs_ports.
The dmrs_type and dmrs_max_len parameters determine which antenna-port mapping table in TS 38.212 is applicable. In this example:
dmrs_type: 1
dmrs_max_len: 1
These settings select TS 38.212 Table 7.3.1.2.2-1. The remaining parameters select a specific entry within that table:
n_layer: 1
n_dmrs_cdm_groups: 2
dmrs_ports: [1]
This combination corresponds to Value field 1 in Table 7.3.1.2.2-1.

Perform the test.
In this example, the DL section shows: ANT = 4, NL = 4
ANT = 4 confirms that four downlink physical antenna paths are configured. NL = 4 indicates that the cell supports up to four downlink transmission layers. This is consistent with the configured 4×4 MIMO capability, but it does not mean that every PDSCH transmission always uses four layers. The actual number of layers is selected dynamically for each scheduled transmission.

Then setup a call and make it sure that call connection is OK using t command.
The trace shows the UE in the connected state with active downlink and uplink traffic. The DL ri field is 4, indicating that the current PDSCH transmission is using four layers. This is consistent with the configured antenna_ports value 10 and the four-layer DMRS port assignment. The CQI, MCS, retransmission count, throughput, SNR, PHR, path loss, and timing-advance values can also be monitored to verify overall link operation.

Check DCI 1_1 and see if antenna_ports is set as intended. In this specific example, antenna_ports value is set to 0. You need to compare this value with the dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups and dmrs_ports and 38.212 - Table 7.3.1.2.2-1 through Table 7.3.1.2.2-4
For dmrs-Type = type1 and maxLength = len1, value 1 in TS 38.212 Table 7.3.1.2.2-1 indicates a single-layer PDSCH transmission using DMRS port 1000 and one DMRS CDM group without data.
This shows that although the cell is configured to support up to four layers, the gNB can dynamically switch the actual PDSCH transmission from four layers to one layer. The physical antenna count remains four, while the number of layers and corresponding DMRS antenna-port assignment can change for each scheduled PDSCH.

Sub Test 3 : Value = 2
This subtest is to show how to configure and verify of the value = 2 in 38.212 - Table 7.3.1.2.2-1
N_ANTENNA_DL is set to 4 to enable a maximum of four downlink transmit antennas. This allows the Callbox to support configurations up to 4×4 MIMO and to use the DMRS antenna-port combinations defined for as many as four layers.
Setting N_ANTENNA_DL to 4 specifies the available physical antenna capability, but it does not force every PDSCH transmission to use four layers. Depending on the configured transmission mode, UE capability, channel condition, and scheduling decision, the actual PDSCH transmission may use one, two, three, or four layers.

In the 3GPP specification, the Antenna Port field in DCI format 1_1 is represented by a single index. Each index maps to a predefined combination of DMRS configuration type, maximum front-loaded DMRS length, number of transmission layers, number of DMRS CDM groups without data, and DMRS antenna ports.
In the Amarisoft Callbox configuration, this index is not entered directly. Instead, the corresponding properties are configured individually using dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups, and dmrs_ports.
The dmrs_type and dmrs_max_len parameters determine which antenna-port mapping table in TS 38.212 is applicable. In this example:
dmrs_type: 1
dmrs_max_len: 1
These settings select TS 38.212 Table 7.3.1.2.2-1. The remaining parameters select a specific entry within that table:
n_layer: 1
n_dmrs_cdm_groups: 2
dmrs_ports: [0,1]
This combination corresponds to Value field 2 in Table 7.3.1.2.2-1.

Perform the test.
In this example, the DL section shows: ANT = 4, NL = 4
ANT = 4 confirms that four downlink physical antenna paths are configured. NL = 4 indicates that the cell supports up to four downlink transmission layers. This is consistent with the configured 4×4 MIMO capability, but it does not mean that every PDSCH transmission always uses four layers. The actual number of layers is selected dynamically for each scheduled transmission.

Then setup a call and make it sure that call connection is OK using t command.
The trace shows the UE in the connected state with active downlink and uplink traffic. The DL ri field is 4, indicating that the current PDSCH transmission is using four layers. This is consistent with the configured antenna_ports value 10 and the four-layer DMRS port assignment. The CQI, MCS, retransmission count, throughput, SNR, PHR, path loss, and timing-advance values can also be monitored to verify overall link operation.

Check DCI 1_1 and see if antenna_ports is set as intended. In this specific example, antenna_ports value is set to 0. You need to compare this value with the dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups and dmrs_ports and 38.212 - Table 7.3.1.2.2-1 through Table 7.3.1.2.2-4
For dmrs-Type = type1 and maxLength = len1, value 2 in TS 38.212 Table 7.3.1.2.2-1 indicates a single-layer PDSCH transmission using DMRS port 1000 and one DMRS CDM group without data.
This shows that although the cell is configured to support up to four layers, the gNB can dynamically switch the actual PDSCH transmission from four layers to one layer. The physical antenna count remains four, while the number of layers and corresponding DMRS antenna-port assignment can change for each scheduled PDSCH.

Sub Test 4 : Value = 7
This subtest is to show how to configure and verify of the value = 7 in 38.212 - Table 7.3.1.2.2-1
N_ANTENNA_DL is set to 4 to enable a maximum of four downlink transmit antennas. This allows the Callbox to support configurations up to 4×4 MIMO and to use the DMRS antenna-port combinations defined for as many as four layers.
Setting N_ANTENNA_DL to 4 specifies the available physical antenna capability, but it does not force every PDSCH transmission to use four layers. Depending on the configured transmission mode, UE capability, channel condition, and scheduling decision, the actual PDSCH transmission may use one, two, three, or four layers.

In the 3GPP specification, the Antenna Port field in DCI format 1_1 is represented by a single index. Each index maps to a predefined combination of DMRS configuration type, maximum front-loaded DMRS length, number of transmission layers, number of DMRS CDM groups without data, and DMRS antenna ports.
In the Amarisoft Callbox configuration, this index is not entered directly. Instead, the corresponding properties are configured individually using dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups, and dmrs_ports.
The dmrs_type and dmrs_max_len parameters determine which antenna-port mapping table in TS 38.212 is applicable. In this example:
dmrs_type: 1
dmrs_max_len: 1
These settings select TS 38.212 Table 7.3.1.2.2-1. The remaining parameters select a specific entry within that table:
n_layer: 2
n_dmrs_cdm_groups: 2
dmrs_ports: [0,1]
This combination corresponds to Value field 7 in Table 7.3.1.2.2-1.

Perform the test.
In this example, the DL section shows: ANT = 4, NL = 4
ANT = 4 confirms that four downlink physical antenna paths are configured. NL = 4 indicates that the cell supports up to four downlink transmission layers. This is consistent with the configured 4×4 MIMO capability, but it does not mean that every PDSCH transmission always uses four layers. The actual number of layers is selected dynamically for each scheduled transmission.

Then setup a call and make it sure that call connection is OK using t command.
The trace shows the UE in the connected state with active downlink and uplink traffic. The DL ri field is 4, indicating that the current PDSCH transmission is using four layers. This is consistent with the configured antenna_ports value 10 and the four-layer DMRS port assignment. The CQI, MCS, retransmission count, throughput, SNR, PHR, path loss, and timing-advance values can also be monitored to verify overall link operation.

Check DCI 1_1 and see if antenna_ports is set as intended. In this specific example, antenna_ports value is set to 0. You need to compare this value with the dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups and dmrs_ports and 38.212 - Table 7.3.1.2.2-1 through Table 7.3.1.2.2-4
For dmrs-Type = type1 and maxLength = len1, value 7 in TS 38.212 Table 7.3.1.2.2-1 indicates a single-layer PDSCH transmission using DMRS port 1000 and one DMRS CDM group without data.
This shows that although the cell is configured to support up to four layers, the gNB can dynamically switch the actual PDSCH transmission from four layers to one layer. The physical antenna count remains four, while the number of layers and corresponding DMRS antenna-port assignment can change for each scheduled PDSCH.

Sub Test 5 : Value = 9
This subtest is to show how to configure and verify of the value = 9 in 38.212 - Table 7.3.1.2.2-1
N_ANTENNA_DL is set to 4 to enable a maximum of four downlink transmit antennas. This allows the Callbox to support configurations up to 4×4 MIMO and to use the DMRS antenna-port combinations defined for as many as four layers.
Setting N_ANTENNA_DL to 4 specifies the available physical antenna capability, but it does not force every PDSCH transmission to use four layers. Depending on the configured transmission mode, UE capability, channel condition, and scheduling decision, the actual PDSCH transmission may use one, two, three, or four layers.

In the 3GPP specification, the Antenna Port field in DCI format 1_1 is represented by a single index. Each index maps to a predefined combination of DMRS configuration type, maximum front-loaded DMRS length, number of transmission layers, number of DMRS CDM groups without data, and DMRS antenna ports.
In the Amarisoft Callbox configuration, this index is not entered directly. Instead, the corresponding properties are configured individually using dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups, and dmrs_ports.
The dmrs_type and dmrs_max_len parameters determine which antenna-port mapping table in TS 38.212 is applicable. In this example:
dmrs_type: 1
dmrs_max_len: 1
These settings select TS 38.212 Table 7.3.1.2.2-1. The remaining parameters select a specific entry within that table:
n_layer: 3
n_dmrs_cdm_groups: 2
dmrs_ports: [0,1,2]
This combination corresponds to Value field 9 in Table 7.3.1.2.2-1.

Perform the test.
In this example, the DL section shows: ANT = 4, NL = 4
ANT = 4 confirms that four downlink physical antenna paths are configured. NL = 4 indicates that the cell supports up to four downlink transmission layers. This is consistent with the configured 4×4 MIMO capability, but it does not mean that every PDSCH transmission always uses four layers. The actual number of layers is selected dynamically for each scheduled transmission.

Then setup a call and make it sure that call connection is OK using t command.
The trace shows the UE in the connected state with active downlink and uplink traffic. The DL ri field is 4, indicating that the current PDSCH transmission is using four layers. This is consistent with the configured antenna_ports value 10 and the four-layer DMRS port assignment. The CQI, MCS, retransmission count, throughput, SNR, PHR, path loss, and timing-advance values can also be monitored to verify overall link operation.

Check DCI 1_1 and see if antenna_ports is set as intended. In this specific example, antenna_ports value is set to 0. You need to compare this value with the dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups and dmrs_ports and 38.212 - Table 7.3.1.2.2-1 through Table 7.3.1.2.2-4
For dmrs-Type = type1 and maxLength = len1, value 9 in TS 38.212 Table 7.3.1.2.2-1 indicates a single-layer PDSCH transmission using DMRS port 1000 and one DMRS CDM group without data.
This shows that although the cell is configured to support up to four layers, the gNB can dynamically switch the actual PDSCH transmission from four layers to one layer. The physical antenna count remains four, while the number of layers and corresponding DMRS antenna-port assignment can change for each scheduled PDSCH.

Test 2 : Table 7.3.1.2.2-2
This test is to show how to configure DMRS patterns of 38.212 - Table 7.3.1.2.2-2 and verify it . You can configure different DMRS pattern value from the table by setting n_dmrs_cdm_groupds, dmrs_ports, dmrs_len
Configuration
I have used gnb-sa-dmrs-7-3-1-2-2-2.cfg which is copied and modified from gnb-sa.cfg

I am using the default mme, ims config as shown below.

In gnb-sa-dmrs-7-3-1-2-2-2.cfg, it is configured as follows.
N_ANTENNA_DL is set to 4 to enable a maximum of four downlink transmit antennas. This allows the Callbox to support configurations up to 4×4 MIMO and to use the DMRS antenna-port combinations defined for as many as four layers.
Setting N_ANTENNA_DL to 4 specifies the available physical antenna capability, but it does not force every PDSCH transmission to use four layers. Depending on the configured transmission mode, UE capability, channel condition, and scheduling decision, the actual PDSCH transmission may use one, two, three, or four layers.

In the 3GPP specification, the Antenna Port field in DCI format 1_1 is represented by a single index. Each index maps to a predefined combination of DMRS configuration type, maximum front-loaded DMRS length, number of transmission layers, number of DMRS CDM groups without data, DMRS ports, and DMRS length.
In the Amarisoft Callbox configuration, this index is not entered directly. Instead, the corresponding parameters are configured individually using dmrs_type, dmrs_max_len, n_layer, n_dmrs_cdm_groups, dmrs_ports, and dmrs_len.
The following parameters determine the applicable TS 38.212 table:
dmrs_type: 1
dmrs_max_len: 2
This combination selects TS 38.212 Table 7.3.1.2.2-2, which applies to DMRS configuration type 1 with a maximum front-loaded DMRS length of two symbols.
The remaining parameters select a specific entry within the table:
n_layer: 4
n_dmrs_cdm_groups: 2
dmrs_ports: [0,1,4,5]
dmrs_len: 2
This combination corresponds to Antenna Port field value 28 in Table 7.3.1.2.2-2. It configures a four-layer PDSCH transmission using two-symbol front-loaded DMRS and DMRS ports 1000, 1001, 1004, and 1005.

Perform the Test
In this example, the DL section shows: ANT = 4, NL = 4
ANT = 4 confirms that four downlink physical antenna paths are configured. NL = 4 indicates that the cell supports up to four downlink transmission layers. This is consistent with the configured 4×4 MIMO capability, but it does not mean that every PDSCH transmission always uses four layers. The actual number of layers is selected dynamically for each scheduled transmission.

Then setup a call and make it sure that call connection is OK using t command.
The trace shows the UE in the connected state with active downlink and uplink traffic. The DL ri field is 4, indicating that the current PDSCH transmission is using four layers. This is consistent with the configured antenna_ports value 10 and the four-layer DMRS port assignment. The CQI, MCS, retransmission count, throughput, SNR, PHR, path loss, and timing-advance values can also be monitored to verify overall link operation.

Log Analysis
First check RRC log and see if the configuration is done as you intended. In this tutorial, I am checking RRC Setup for PDSCH DMRS Configuration. This parameter determines which table out of 38.212 - Table 7.3.1.2.2-1 through Table 7.3.1.2.2-4 should be applied.
First, check the PDSCH DMRS configuration in the RRC Setup message under pdsch-Config → dmrs-DownlinkForPDSCH-MappingTypeA. In this example, maxLength is explicitly configured as len2, while dmrs-Type is absent. Because dmrs-Type is not signalled, the UE applies the default value type1.
Therefore, the effective configuration is:
dmrs-Type = type1
maxLength = len2
This combination selects TS 38.212 Table 7.3.1.2.2-2 for interpreting the Antenna Port field in DCI format 1_1.

Next, check DCI format 1_1 and verify the antenna_ports field. In this example, antenna_ports is set to 28.
With dmrs-Type = type1 and maxLength = len2, the UE interprets this value using TS 38.212 Table 7.3.1.2.2-2. Value 28 corresponds to the configured four-layer transmission using two-symbol front-loaded DMRS, two CDM groups without data, and DMRS ports 1000, 1001, 1004, and 1005.
The corresponding PDSCH log also shows nl=4, confirming that this transmission uses four spatial layers.

RRC / NAS Signaling
MIB(SA)
: This is MIB message sent by gNB (
MIB ::= SEQUENCE {
...
dmrs-TypeA-Position ENUMERATED {pos2, pos3},
...
}
RrcSetup(SA)
: This is the RrcSetup message sent by gNB to configure NR SA. (
{
message c1: rrcSetup: {
rrc-TransactionIdentifier 0,
criticalExtensions rrcSetup: {
radioBearerConfig {
...
},
masterCellGroup {
cellGroupId 0,
rlc-BearerToAddModList {
...
},
mac-CellGroupConfig {
...
},
physicalCellGroupConfig {
pdsch-HARQ-ACK-Codebook dynamic
},
spCellConfig {
spCellConfigDedicated {
initialDownlinkBWP {
pdcch-Config setup: {
...
},
pdsch-Config setup: {
dmrs-DownlinkForPDSCH-MappingTypeA setup: {
dmrs-AdditionalPosition pos1
},
...
},
firstActiveDownlinkBWP-Id 0,
uplinkConfig {
initialUplinkBWP {
pucch-Config setup: {
...
},
pusch-Config setup: {
txConfig codebook,
dmrs-UplinkForPUSCH-MappingTypeA setup: {
dmrs-AdditionalPosition pos1,
transformPrecodingDisabled {
}
},
...
},
srs-Config setup: {
...
},
firstActiveUplinkBWP-Id 0,
pusch-ServingCellConfig setup: {
}
},
pdcch-ServingCellConfig setup: {
},
pdsch-ServingCellConfig setup: {
...
},
csi-MeasConfig setup: {
...
}
}
},
tag-Id 0