If both transport blocks are enabled, the number of layers equals two; transport block 1 is mapped to codeword 0; and transport block 2 is mapped to codeword 1. Antenna ports 7 and 8 are used for spatial multiplexing.
dlsch0_harq->rvidx=rv1;
In case one of the transport blocks is disabled, the number of layers equals one; the active transport block is mapped to codeword 0; and the antenna port for single-antenna port transmission is according to the ndi of the disabled TB (0 -> 7, 1 -> 8)
dlsch1_harq->rvidx=rv2;
*/
TB0_active=1;
TB1_active=1;
// check if either TB is disabled (see 36-213 V8.6 p. 26)
/*NOTE: the antenna port 7 and 8 should be replaced with dlsch0_harq->first_layer and dlsch1_harq->first_layer below (when first_layer is actually initialized)*/