How do 8 layers get mapped to 12 PDSCH antenna ports?

In 5G NR for PDSCH PHY processing, the scrambled bits after the modulation mapper go through a layer mapping operation followed by antenna port mapping, as shown below.

Where the maximum number of layers $(N_{\nu})$ that can be assigned is equal to $N_{\nu, \mathrm{max}} = 8$ and the maximum number of antenna ports $(N_{p})$ for PDSCH is equal to $N_{p, \mathrm{max}} = 12$ with $p = {1000, 1001, \cdots, 1011}$.

The antenna port mapping operation is defined in $138.211$ as
image

How do 8 layers get mapped to 12 antenna ports?

Check table 7.3.1.2.2-1 to 7.3.1.2.2-4 in 3GPP TS 38.212.

Dear nr2k,

I am aware of the tables you mentioned, and since they are specific to PDSCH DMRS, I think there is no field specific to the number of layers.

In the case of PDSCH, they get mapped to antenna ports after layer mapping. Can you provide an example to clarify this?

You cannot map 8 layers to 12 antenna ports. You can see in the equation, v layers are mapped to v antenna ports, and the set of antenna ports are determined according to table 7.3.1.2.2-1 to 7.3.1.2.2-4 in 3GPP TS 38.212. In this case, the PDSCH antenna ports mean 1000+dmrs ports.
For example, 8 layer with dmrs-type=1 and maxLength=2, will be mapped to 8 antenna port {1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007} according to Table 7.3.1.2.2-2.