1. 14 Nov, 2025 16 commits
    • Robert Schmidt's avatar
      15441c74
    • Robert Schmidt's avatar
      Delete dead code · aa3f01b6
      Robert Schmidt authored
      aa3f01b6
    • Robert Schmidt's avatar
      Remove dead code · c8fba996
      Robert Schmidt authored
      c8fba996
    • Robert Schmidt's avatar
      Remove dead code · 5ac381dd
      Robert Schmidt authored
      5ac381dd
    • Robert Schmidt's avatar
      Reimplement nFAPI message exchange after msgDataTx removal · eefb9da6
      Robert Schmidt authored
      Reimplement nFAPI message exchange between L1 and L2 following the
      changes in parent commit removing msgDataTx.
      
      Avoid direct calls and use NR_IF_module fptrs to avoid linking problems.
      allowing to remove some function definitions that are not needed.
      eefb9da6
    • Robert Schmidt's avatar
      Avoid use of FAPI message buffers in msgDataTx · 2bea71a8
      Robert Schmidt authored
      Note: after this commit, monolithic works but nFAPI operation is broken
      and fixed in the next commit, to keep the changes small(er). All
      simulators work.
      
      This commit removes the use of msgDataTx's intermediate buffers for FAPI
      messages and the call of the "Schedule response". The latter incurs an
      additional copy of FAPI messages for the TX chain (for the RX chain, it
      is and will remain there) which we can avoid.
      
      Instead, it uses an NR_Sched_Rsp_t-typed variable sched_response to
      store the results of the scheduler when called from tx_func(). Thus, the
      scheduler remains unchanged (it gets a pointer to where to put FAPI
      messages), but we don't call nr_schedule_response() to then copy FAPI
      messages into the L1, but have them in a local variable sched_response.
      sched_response on on the data segment, as it is big and would overflow
      the stack; at the same time, this is ok because only one tx_func() runs
      at a time.
      
      Since we don't use allocate_sched_response() anymore, we don't need
      deref_sched_response().
      
      clear_slot_beamid() is moved to tx_func(), as it was called in
      nr_schedule_response().
      
      Since the "intermediate" NR_gNB_DLSCH_t structure groups both the
      DL_tti_pdsch and TX_data.req structures, a pointer has been created to
      point to pdsch_pdu. This affects a number of simulators, as they have to
      put some messages on the stack:
      
      - nr_dlschsim: put the corresponding variable on the stack
      - nr_pbchsim: a new array for the SSB PDUs has been introduced
      
      Further, these changes are now necessary:
      
      - nr_dlsim:  there were variables "rel15" and "pdsch_pdu_rel15" that
        point to the same PDSCH PDU. At least "rel15" would not exist, as the
        corresponding pointer is now populated in phy_procedures_gNB_TX(), and
        we therefore refer to the single PDSCH PDU variable with
        "pdsch_pdu_rel15", but at the place where "rel15" used to be
        initialized.
      - nr_ulsim: use nr_save_ul_tti_req() to load PDUs into the RX chain
        instead of nr_schedule_response(), which does not exist anymore.
      2bea71a8
    • Robert Schmidt's avatar
      Move DLSCH/PDSCH variables to gNB · e17c165c
      Robert Schmidt authored
      The next commit will remove msgDataTx. We can therefore not use
      msgDataTx to retain the PDSCH/DLSCH variables, and move them to the gNB.
      
      Note that the only reason for NR_gNB_DLSCH_t after this commit is to
      hold various large buffers (c, b, f). Future work could be done to
      remove this, in which case the array inside PHY_VARS_gNB could be
      deleted.
      
      On this occasion, clean up the use of init_DLSCH_struct() and
      reset_DLSCH_struct() (renamed destroy_DLSCH_struct()) and centralize
      their call in phy_init_nr_gNB()/phy_free_nr_gNB(), and correct
      simulators accordingly.
      e17c165c
    • Robert Schmidt's avatar
    • Robert Schmidt's avatar
      Don't use msgTx inside nr_dlsch_encoding() and nr_generate_pdsch() · 2be5ff36
      Robert Schmidt authored
      A later commit will remove "msgTx" altogether. Push it out from L1
      functions.
      2be5ff36
    • Robert Schmidt's avatar
      751cab3d
    • Robert Schmidt's avatar
      Simplify gNB DLSCH type · 2b2b3cd3
      Robert Schmidt authored
      DLSCH encoding is not concerned with HARQ processes directly. Instead,
      it gets the redundancy version and encodes a specific redundancy version
      for a given TB. The rest is up to the MAC, the L1 is stateless in that
      regard. Hence, remove the HARQ type and put it into DLSCH, which also
      simplifies the code elsewhere.
      2b2b3cd3
    • Robert Schmidt's avatar
      Remove unused computation · 09e0344b
      Robert Schmidt authored
      unav_res is already computed in nr_generate_pdsch(), and then used
      inside of nr_dlsch_encoding() right after.
      09e0344b
    • Robert Schmidt's avatar
      Remove unused or write-only variables · c0603369
      Robert Schmidt authored
      c0603369
    • Robert Schmidt's avatar
      Refactor csi-rs handling · 62333cd3
      Robert Schmidt authored
      Similarly to the parent commit, simplify the array type to the FAPI PDU
      towards further refactoring, and encapsulate the code in a function for
      easier reuse in a later refactoring step.
      
      Note on ZP-CSI: after this commit, we continue treating CSI PDUs. The
      prior code was returning, which I think is wrong (as this information is
      only for the currently treated CSI-RS PDU).
      62333cd3
    • Robert Schmidt's avatar
      Remove msgTx->ssb and replace with normal array · d0f4997a
      Robert Schmidt authored
      There is no point in tracking the "active" state: the SSB PDU will be
      sent from MAC to L1, encoded, and then "discarded" (by marking the
      number of SSB PDUs as 0). Hence, remove this intermediate type.
      d0f4997a
    • Robert Schmidt's avatar
      bae9e0f1
  2. 13 Nov, 2025 2 commits
  3. 12 Nov, 2025 3 commits
  4. 06 Nov, 2025 8 commits
  5. 05 Nov, 2025 10 commits
  6. 04 Nov, 2025 1 commit
    • alexjiao's avatar
      NR UE: fix PDCCH LLR indexing for different search space RB sizes · 7655604d
      alexjiao authored
      When multiple search spaces have different CORESET configurations
      (different number of RBs), the LLR buffer stride must be calculated
      based on the maximum RB size across all search spaces, not the
      current search space's RB size.
      
      The LLR buffer is allocated with size based on get_pdcch_max_rbs(),
      but the demapping function was using coreset_nbr_rb (current search
      space) for symbol stride calculation, causing incorrect LLR extraction
      when search spaces have different RB configurations.
      7655604d