Commit Graph
100 Commits
Author SHA1 Message Date
Robert Schmidt cdb18d38bf Move CMakeLists.txt into root 2022-09-19 17:29:42 +02:00
Robert Schmidt 6a23bcfb42 Add PDCP stats 2022-08-12 12:19:09 +02:00
Robert Schmidt ec4df27a75 Add RLC stats 2022-08-12 12:19:09 +02:00
Robert Schmidt bcbf2b38ee Add more MAC stats 2022-08-12 12:19:09 +02:00
Robert Schmidt bc2246a566 Remove usage of MSC library after last merge 2022-03-04 09:21:02 +01:00
Robert Schmidt 990385eea0 Move CMake macro definitions to separate file 2022-02-21 13:37:32 +01:00
Robert Schmidt 41dff7b190 Add MCS from HARQ BLER
- Estimates correct MCS using EMA, kept between target thresholds
  dl_bler_target_upper and dl_bler_target_lower (conf options) for 1st
  retx and below dl_rd2_bler_threshold for 2nd retx
- Maximum MCS configurable
- on 3rd retx, reduce MCS by 5
2021-10-06 08:38:21 +02:00
Robert Schmidt 2319b4e76f Introduce configuration for maximum UE ULSCH inactivity 2021-04-30 16:40:59 +02:00
Robert Schmidt 6c162e3808 Remove unused variables 2021-04-27 08:36:43 +02:00
Robert Schmidt 821a5e5dfe Correct T310 & N310 to avoid RA 2021-04-27 08:30:33 +02:00
Robert Schmidt 74fa01463c Do PUCCH TPC only if Acknack or positive SR
otherwise, if we only have a (negative) SR, the UE did not send
anything, and the PUCCH CQI is invalid
2021-04-27 08:30:33 +02:00
Robert Schmidt 8187361615 Schedule UE periodically every 10 frames in UL 2021-04-27 08:30:33 +02:00
Robert Schmidt cba2d9e413 Schedule UEs on SR or BSR 2021-04-27 08:30:33 +02:00
Robert Schmidt 51e844e19f Bugfix ul preproc: check correct slot for UL 2021-04-27 08:30:33 +02:00
Robert Schmidt f73e8e0459 Bugfixes in nr_acknack_scheduling()
1: there can be 2bits AckNack + SR in PUCCH F0
2: when allocating csi_pucch, zero out struct
3: Make unfree resources a warning
4: When asserting, explain the issue
2021-04-27 08:30:33 +02:00
Robert Schmidt 4f4e25852f Reduce sched_pucch array length, we only need two entries 2021-04-27 08:30:33 +02:00
Robert Schmidt b005f9594b Statically allocate PUCCH F0 resource index 0 for AckNack 2021-04-27 08:30:33 +02:00
Robert Schmidt c2d16eb8d5 Configure secondaryCellGroup: dedicated PUCCH, CSI, Preamble
- Configure PUCCH Format 0 to be in separate RBs (each UE has dedicated
  resources)
- Configure RA preamble to be different per UE
- Configure CSI offset such that no two UEs have their report in the
  same frame
2021-04-27 08:30:31 +02:00
Robert Schmidt f39b97a9e8 Execute nr_schedule_pucch() only in UL slots 2021-04-27 08:29:55 +02:00
Robert Schmidt 84e57113c8 initial_csi_index depends on local_uid
Nb_ue is not unique among UEs: consider 2 UEs present. The last UE has
CSI idx "2". Now the first UE disconnects, and a new UE connects. It
will also get CSI idx "2", and I assume this is not what we want.
2021-04-27 08:29:55 +02:00
Robert Schmidt 26b6d87fa3 Merge branch 'develop' into integration_2021_wk13_b 2021-04-25 16:34:30 +02:00
Robert Schmidt 089246c693 Fix Msg.2 TDA to be 1, revert DL TDA configs to two entries 2021-04-25 14:44:46 +02:00
Robert Schmidt b548f9a3d2 Correctly check for used symbols in UL phytest scheduler 2021-04-16 16:46:46 +02:00
Robert Schmidt 052739f01d Update phytest cmdline parameter description after review 2021-04-16 16:46:17 +02:00
Robert Schmidt e0780320fa Fix to make nrUE compile 2021-04-16 07:27:11 +02:00
Robert Schmidt c3796c044f Merge branch 'develop' into integration_2021_wk13_b 2021-04-16 07:23:46 +02:00
Robert Schmidt 71ecec6744 Fix: mark delayed HARQ feedback as free 2021-04-14 12:19:12 +02:00
Robert Schmidt b10ba9f88c Fix: don't go beyond 3rd retx 2021-04-14 12:19:12 +02:00
Robert Schmidt 8edacdede4 UL Scheduler: Check vrb_map_UL against symb map 2021-04-14 12:19:04 +02:00
Robert Schmidt e04affbc7c UL scheduler: use correct TDA 2021-04-13 13:15:59 +02:00
Robert Schmidt aca57eb969 DL scheduler: correctly calculate mixed slot TDA, check TDA before scheduling 2021-04-13 13:15:59 +02:00
Robert Schmidt 7f774d5fbc Merge branch 'develop' into integration_2021_wk13_b 2021-04-12 17:23:21 +02:00
Robert Schmidt f5a1d356db Refactor after merge
With the merge of fix_NR_DLUL_PF, gNB_dlsch_ulsch_scheduler() has no
nb_periods_per_frame variable. There are two changes here:

1) calculate this locally for initializing tdd_beam_association

2) do not pass it into schedule_nr_mib(). Further, use the following:
   nb_periods_per_frame = slots_per_frame / slots_per_period
   slots_per_frame / nb_periods_per_frame =
     = slots_per_frame / (slots_per_frame / slots_per_period)
     = slots_per_period
2021-03-30 10:49:00 +02:00
Robert Schmidt 576df55450 Merge remote-tracking branch 'origin/fix_NR_DLUL_PF' into integration_2021_wk12 2021-03-30 10:48:57 +02:00
Robert Schmidt decd654ad0 Change initial{D,U}LBWPlocationAndBandwidth for quectel to connect in testing_gnb.conf files 2021-03-18 09:16:36 +01:00
Robert Schmidt 9dd8572359 Change initial{D,U}LBWPlocationAndBandwidth for quectel to connect 2021-03-15 15:00:34 +01:00
Robert Schmidt 8307d79929 Make RRC buffer sufficiently large 2021-03-15 15:00:34 +01:00
Robert Schmidt 43f6e2f0de Shorten RSRP meas print, avoid SIGFPE 2021-03-11 12:22:32 +01:00
Robert Schmidt 9e707bb2d6 Remove uselessly added code 2021-03-11 12:12:35 +01:00
Robert Schmidt 6274348dfb Remove redundant code 2021-03-11 12:12:35 +01:00
Robert Schmidt 305902da42 Correctly allocate memory for NR measurement array 2021-02-20 15:43:02 +01:00
Robert Schmidt a3b1216b23 Fixup sched_ul_bytes logic
1) Only count new transmission as scheduled bytes (which is then
compared against the BSR)

2) When subtracting scheduled bytes after successful reception, subtract
TBsize from correct HARQ process
2021-02-17 10:17:59 +01:00
Robert Schmidt ef90d77b0e Reformat nr_initiate_ra_proc() [no other changes] 2021-02-12 20:53:36 +01:00
Robert Schmidt 54a2d698db Fix build: test for slot from within preprocessor 2021-02-09 16:46:44 +01:00
Robert Schmidt b86fdaf59b Revert "Lower UE log level"
This reverts commit 71e297de9d.
2021-02-08 11:20:23 +01:00
Robert Schmidt 9b77575af2 Use the MAX_BWP_SIZE macro everywhere 2021-02-07 10:45:57 +01:00
Robert Schmidt 318c4e0fd7 Skip DL HARQ feedbacks if the timing does not match
As the precedent commit, this commit deals with the realtime problems
that we currently have on the CI bench.

For DL HARQ feedback, nFAPI does not give us the HARQ process ID.
Instead, we have to figure this out "from timing", i.e., if we trigger
PUCCH reception, we will get a message with HARQ if we instructed the
PHY to do so. If we have real-time problems, it seems (I cannot verify:
don't have real time problems) that we do not get the nFAPI message with
HARQ feedback. Thus, we need to skip the HARQ processes that should have
been processed in the past, which happens in this commit.
2021-02-07 10:45:57 +01:00
Robert Schmidt f23890e0b9 Search correct UL HARQ, don't assert on late slot
At the time of this commit, the CI has realtime issues. This can mean
that the HARQ result is delivered in a delayed fashion. Before this
commit, we were asserting on whether the slot corresponds to the HARQ
process's expected feedback slot, but a particular feedback might be
delayed under realtime issues, and we actually don't care about the
timing since we get the HARQ process ID.

Instead, we loop through the HARQ processes for which we wait for a
feedback in the beginning until we have the right process (which did not
seem to cause a problem till now, but who knows.
2021-02-07 10:45:57 +01:00
Robert Schmidt 423a0e4afe Handle UL HARQ slot wrap around for slot = 0 2021-02-07 10:45:57 +01:00
Robert Schmidt 8bd3ec7602 Fix whitespace issues (review request) 2021-02-07 10:45:57 +01:00
Robert Schmidt 71fd526e12 Remove unused variables 2021-02-07 10:45:57 +01:00
Robert Schmidt 30d13ebf6d Lower various log levels 2021-02-07 10:45:57 +01:00
Robert Schmidt 77203ee989 Fix nr_dlschsim unitary simulator 2021-02-07 10:45:57 +01:00
Robert Schmidt dcd591bd2b Schedule BSR0 UE only one at a time, in round-robin 2021-02-07 10:45:57 +01:00
Robert Schmidt 3b972f6766 ULSCH fix: Only allocate CCEs when necessary 2021-02-07 10:45:57 +01:00
Robert Schmidt 77de70c82f Calculate TBS for coefficient only when needed 2021-02-07 10:45:57 +01:00
Robert Schmidt 6294ce715e Reorder pf_ul to process retransmission 2021-02-07 10:45:57 +01:00
Robert Schmidt c8168085dd Calculate UL coefficient 2021-02-07 10:39:40 +01:00
Robert Schmidt 4b1be522a5 Add estimated_ul_buffer & Update in DTCH 2021-02-07 10:39:40 +01:00
Robert Schmidt 75dbf5fa4d Don't log retransmissions explicitly 2021-02-07 10:39:40 +01:00
Robert Schmidt ca47955293 Bugfix: check that retransmission can be allocated 2021-02-07 10:39:39 +01:00
Robert Schmidt 78da8c9345 Save TB in MAC, transmit TX_req also on retx 2021-02-07 10:39:39 +01:00
Robert Schmidt 80e23a179e Enable 12 slots
This commit enables more slots so that the "real UE" preprocessor can
schedule them. The DL phytest preprocessor continues to only schedule
slots 1 & 3.  This is because the OAI-UE needs to have PUCCH scheduled
at least six slots in advance.  Since we do not support this (yet), but
assume that two slots are enough, we schedule the UE only in slot 1 & 3
so it has 6 slots until slot 7 to send PUCCH.
2021-02-07 10:39:39 +01:00
Robert Schmidt 59cb9c87e0 Refactor nr_rx_sdu() 2021-02-07 10:39:39 +01:00
Robert Schmidt 0773229b1a Implement UL HARQ using NR_list_t 2021-02-07 10:39:39 +01:00
Robert Schmidt a0d47c504c Create lists for UL HARQ management 2021-02-07 10:39:39 +01:00
Robert Schmidt 4ddd45f813 Implement DL HARQ using NR_list_t 2021-02-07 10:39:39 +01:00
Robert Schmidt 42710ee7ba Create lists for DL HARQ management 2021-02-07 10:39:39 +01:00
Robert Schmidt d7f46a2ff2 Set RRC nrofHARQ_ProcessesForPDSCH to 16 2021-02-07 10:39:39 +01:00
Robert Schmidt c9de1c70c0 Set secondaryCellGroup + default values in add_new_nr_ue() 2021-02-07 10:39:39 +01:00
Robert Schmidt 74cb9bf367 Refactor add_new_nr_ue() and mac_remove_nr_ue()
mac_remove_nr_ue(): no need to memset sched_ctrl, since it is done on
connection of a UE
2021-02-07 10:39:39 +01:00
Robert Schmidt 4a0efd6f48 mac_top_init_gNB(): do not init per-UE HARQ
the whole UE_sched_ctrl is initialized in add_new_nr_ue(), which will
also init the per-UE HARQ.
2021-02-07 10:39:39 +01:00
Robert Schmidt 77c7fe5b87 Create more generic NR_list_t with helper functions 2021-02-07 10:39:39 +01:00
Robert Schmidt 338d8debae Bugfix OAI UE: reset slot_for_feedback_ack to initial value 2021-02-07 10:39:39 +01:00
Robert Schmidt e328a6ccf7 Make multiple passes over RLC to get all data 2021-02-07 10:39:39 +01:00
Robert Schmidt 76d154f07c Do not count down TBS 2021-02-07 10:39:39 +01:00
Robert Schmidt a18ed9d92d Reorder DLSCH MAC PDU logic
Before this commit, the DLSCH scheduler would construct the MAC PDU by
reading RLC data into a memory on the stack, and then construct the PDU
with CEs first. There are at least two problems:
- we need to keep track of the exact number of bytes of CEs (cumbersome)
  to calculate the number of MAC SDUs to include
- we needlessly copy data around.

This commit does the following instead:
- write all CEs first (no need of keeping track of this in DLSCH and a
  separate function)
- then read MAC SDUs directly into nFAPI as much as possible or
  necessary, without recopying
2021-02-07 10:39:39 +01:00
Robert Schmidt 96e1f3597b Group PDCCH PDU per CC/BWP/CORESET in RA, and reuse in DLSCH 2021-02-07 10:39:39 +01:00
Robert Schmidt c71412882d nr_schedule_ulsch(): only one PDCCH PDU per BWP and CORESET 2021-02-07 10:39:39 +01:00
Robert Schmidt a26404c17f nr_schedule_ue_spec(): link TX_data/PDSCH PDU with common PDU index 2021-02-07 10:39:39 +01:00
Robert Schmidt a6348e8567 nr_generate_Msg2(): link TX_data/PDSCH PDU with common PDU index 2021-02-07 10:39:39 +01:00
Robert Schmidt 28b78ee09c nr_schedule_ue_spec(): only one PDCCH PDU per BWP and CORESET 2021-02-07 10:39:39 +01:00
Robert Schmidt 55c6ce1598 Add small notice that we assume no concurrent RA 2021-02-07 10:39:39 +01:00
Robert Schmidt 089f821dd2 Separate nFAPI PDCCH allocation from nFAPI DCI allocation
According to SCF222, a single PDCCH allocation groups DCIs that are
within the same BWP and CORESET. Therefore, if we want to allocate
multiple DCIs, we need to decouple PDCCH allocation and DCI (previously
jointly done in nr_configure_pdcch()), especially to be forward
compatible.

***Note that as of this commit, we would still allocate different PDCCH
PDUs for multiple UEs (which we do not support yet, anyway)***

nr_configure_pdcch(): simply take out DCI allocation.

nr_generate_Msg2(): separately allocate dci_pdu in common RA SS, and
rename DCI payload variable. Also, reorganize the function so that it is
first checked for CCE allocation and messages nFAPI messages are
allocated afterwards.

nr_schedule_ue_spec(): separately allocate dci_pdu in UE-specific SS.
Rename DCI payload variable.

nr_schedule_ulsch(): separately allocate dci_pdu in UE-specific SS.
Rename DCI payload variable.

nr_fill_nfapi_dl_sib1_pdu(): separately allocate dci_pdu in common SS.
2021-02-07 10:39:39 +01:00
Robert Schmidt 0655cc481d No DCI PDU array in nr_fill_nfapi_dl_sib1_pdu() 2021-02-07 10:39:39 +01:00
Robert Schmidt 080b776097 No DCI PDU array in nr_schedule_ue_spec() 2021-02-07 10:39:39 +01:00
Robert Schmidt 86b1c0035d No DCI PDU array in nr_generate_Msg2() 2021-02-07 10:39:39 +01:00
Robert Schmidt db792632c9 Refactor config_uldci() 2021-02-07 10:39:39 +01:00
Robert Schmidt 52ba0e277d Simplify config_uldci(): handle only one DCI 2021-02-07 10:39:39 +01:00
Robert Schmidt 1bf58a4482 Deleted commented code 2021-02-07 10:39:39 +01:00
Robert Schmidt ccaa5abc55 Reformat fill_dci_pdu_rel15() 2021-02-07 10:39:39 +01:00
Robert Schmidt 0473074acf fill_dci_pdu_rel15(): handle one DCI at a time 2021-02-07 10:39:39 +01:00
Robert Schmidt 0d90ecfd62 Make dci_pdu in PDCCH PDU an array
SCF222 says that dci_pdu in PDCCH PDU
(nfapi_nr_dl_tti_pdcch_pdu_rel15_t) should be an array, and not its
members.
2021-02-07 10:39:39 +01:00
Robert Schmidt 83f7c4be5f Make passed secondaryCellGroup pointer const in prepare_dci() 2021-02-07 10:39:39 +01:00
Robert Schmidt dc04e8cced Make passed pointers const in nr_dci_size() and get_transformPrecoding() 2021-02-07 10:39:39 +01:00
Robert Schmidt d0ae11783a Integrate nr_fill_nfapi_dl_pdu() back into nr_schedule_ue_spec()
Initially, filling the PDCCH and PDSCH nFAPI messages was split into a
separate function (in an attempt to keep the code structure similar to
LTE). However, this proved as not helpful: the nr_fill_nfapi_dl_pdu()
just filled the messages, with a parameter list almost size as long as
the actual messages (because most parameters are kind of independent).
This made no sense, so we put it back.

Also, from an understanding POV, they just fill a message as specified
in SCF222, so it should not be a problem.
2021-02-07 10:39:39 +01:00
Robert Schmidt 71e297de9d Lower UE log level 2021-02-07 10:39:39 +01:00
Robert Schmidt 8f399a1c9e Disable logging of PUCCH 2021-02-07 10:39:39 +01:00
Robert Schmidt a69ec6669a Assert on maximum number of used PUCCH resources 2021-02-07 10:39:39 +01:00
Robert Schmidt 943d55717e Scheduler: introduce BIT() macro 2021-02-07 10:39:39 +01:00