Skip to content

`nr_generate_pdsch()` clean up and little performance improves

Quency Lin requested to merge pdsch-layer-mapping-32bit-assign into develop
  • Improve PDSCH layer mapping by 32 bits assignment

  • Improve PDSCH layer precoding by cleaning up C code, no new algorithm introduced.

  • Use c16_t instead of casting int16_t* / int32_t* everywhere (in nr_generate_pdsch() and init_codebook_gNB())

  • Cleaning up: Use macros instead of hardcoded numbers, Use shortcuts for array offset.

  • Rework on init_codebook_gNB(): More rework (move to MAC...) in !2199 (merged).

    8d338858 - misc: Use inline and c16_t for init_codebook()

4 layers, unitary precoding

sudo ./nr_dlsim -n200 -s35.8 -S40 -x4 -y4 -z4 -e18 -q1 -R106 -b106 -P
Layer Mapping time Resource Mapping time
2023.w40 75.43 us 116.79 us
This MR 47.24 us 93.48 us

2 layers, pmi=1

Diff to enable precoding
diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c
index b04b13ca58..ade0cc8185 100644
--- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c
@@ -473,7 +473,8 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot)

           //get pmi info
           uint8_t pmi;
-          if (0 /*rel15->precodingAndBeamforming.prg_size > 0*/)
+          // if (0 /*rel15->precodingAndBeamforming.prg_size > 0*/)
+          if (rel15->precodingAndBeamforming.prg_size > 0)
             pmi = rel15->precodingAndBeamforming.prgs_list[(int)rb/rel15->precodingAndBeamforming.prg_size].pm_idx;
           else
             pmi = 0;//no precoding
sudo ./nr_dlsim -n200 -s35.8 -S40 -x2 -y4 -z4 -e18 -q1 -R106 -b106 -P -p1
Layer Mapping time Resource Mapping time Layer Precoding time
2023.w40 61.01 us 61.77 us 848.95 us
This MR 30.40 us 47.40 us 605.74 us
Edited by Quency Lin

Merge request reports