Commit Graph

289 Commits

Author SHA1 Message Date
Francisco cba0cc457f sched rand test refactor: creation of abstract sched simulator class for testing 2020-12-12 15:59:27 +01:00
Francisco b4861bc59a move sched params and sched helper methods to sched_helpers.h/cc files. Removed place in the scheduler where the mcs is increased forcefully to avoid segmentation 2020-12-12 15:59:27 +01:00
Francisco 99f94d9a1a Bug fixes of srseNB scheduler TPC
- fix encoding of TPC command
- use of exponential average with irregular sampling for the ULSNR average estimate.
  Turns out using a time-windowed average for the SNR was a bad idea.
  If the UL grants are very sporadic, the SNR time window will never have samples
  when a TPC is encoded
- update of TPC sched test
- other fixes in accumulators lib
2020-12-12 15:59:27 +01:00
Francisco 22229adf08 fix: normal phr is only sent for PCell 2020-12-12 15:59:27 +01:00
Francisco 69748e9313 fix compilation issue regarding definition of size_t in header and declaration of static member null_value in sliding average class 2020-12-12 15:59:27 +01:00
Francisco d42dc50c44 Write TPC sched unit test and fix sched logical channel test 2020-12-12 15:59:27 +01:00
Francisco 479602ed1d add option to specify target ul sinr for UL power control to the enb rr.conf parser 2020-12-12 15:59:27 +01:00
Francisco 5865df39d1 created class that implements the scheduler transmit power control and PHR handling 2020-12-12 15:59:27 +01:00
Francisco 86ab1864f7 The struct tti_point is now used ubiquitously in the scheduler 2020-12-12 15:59:26 +01:00
Francisco 8fb3ea6922 Added the ability to choose scheduling policy from enb.conf
- The two options provided at the moment are time-domain RR and PF
2020-12-12 15:59:26 +01:00
Francisco b71e8075f4 Refactoring of scheduling algorithms
- Use single interface for both DL and UL
- Wrote helper functions for tasks that are common to different algorithms
- created subfolder for all scheduling algorithms
2020-12-12 15:59:26 +01:00
Francisco d7fae0b7a3 Implementation of time-domain PF scheduler
- PF scheduling becomes the new default
2020-12-12 15:59:26 +01:00
Andre Puschmann 07d2bc4fe8 change license header to agnostic version with hint to root LICENSE file 2020-12-12 15:59:25 +01:00
Francisco f07e52129c increase mcs ul upper bound to 24 when ue is cat4 and enb supports 64qam. Simplified max_mcs computation 2020-12-12 15:59:25 +01:00
Francisco 3d80ff4831 fix activation of PDCCH for adaptive retxs. 2020-12-12 15:59:25 +01:00
Francisco fc81a5c6ba harq ack state can now only be NACK or ACK. The ul_harq pending phich flag is now reset after phich scheduling. Thus, the existence of a crc_info(...) signal from the PHY is not required. 2020-12-12 15:59:25 +01:00
Francisco 3067e81e67 fix check of pending UL bytes 2020-12-12 15:59:25 +01:00
Francisco bb96625129 renaming lch_manager -> lch_ue_manager 2020-12-12 15:59:25 +01:00
Francisco a348508072 simplified sched_ue pending DL bytes calculation API 2020-12-12 15:59:25 +01:00
Francisco 0ffea62411 Wrote logging functions for SCHED MAC CE/LCID allocations 2020-12-12 15:59:25 +01:00
Francisco c1fb161004 Move sched lch_manager to separate file 2020-12-12 15:59:25 +01:00
Francisco eae0dc93ad rename scheduler files. scheduler -> sched 2020-12-12 15:59:25 +01:00
Francisco 68eda336bd remove ENB_METRICS_MAX_USERS compile time macro and use run-time variable to set maximum number of UEs the srseNB can have connected at a given instant. 2020-12-12 15:59:25 +01:00
yagoda bdc1964335 consolidating RRC eMBMS configuration into single function, setting some parameters to const 2020-12-12 15:58:34 +01:00
yagoda b90574975b refactoring asn1 eMBMS code, removing asn1 from PHY and MAC in eNodeB 2020-12-12 15:58:34 +01:00
Francisco Paisana 49a48c0130 add measgap awareness to scheduler metric and sf_sched. Add measGap test to random sched test suite. 2020-12-12 15:58:34 +01:00
Francisco Paisana 9579931f16 added meas gap checks to scheduler ue 2020-12-12 15:58:34 +01:00
Francisco Paisana bf7c587e4f add UL 64QAM support to eNB RRC and scheduler 2020-12-12 15:58:33 +01:00
Francisco Paisana d5f6ccc0c4 integrated UL UE-dedicated sched tests in random test 2020-12-12 15:58:33 +01:00
Francisco Paisana 88105c1577 change the namespace of tti point helper functions for the eNB 2020-12-12 15:58:33 +01:00
Francisco Paisana 3ea47b645a changed the way the number of UL pending bytes is calculated in the scheduler 2020-12-12 15:58:32 +01:00
Francisco Paisana d8203acd56 implement harq resuming functionality 2020-12-12 15:58:32 +01:00
Francisco Paisana f927ccaf55 fix pusch grant allocation for cqi reporting in CA. 2020-11-05 19:35:03 +00:00
Francisco Paisana a351b2534e allow PUSCH grants for CQI in PCell 2020-11-03 09:25:17 +00:00
Francisco Paisana a865858db3 disable srbs UL during handover to avoid UL grants and scheduling requests before the handover is complete 2020-10-30 21:51:58 +00:00
Francisco Paisana 42cdc5e340 Allocate all the leftover bytes of the TBS to last allocated MAC SDU.
Fix the way the RLC header is accounted for depending on the bearer id.
For instance, the SRB0 does not require any RLC header.
2020-10-30 13:35:15 +00:00
Francisco Paisana 55d62a2baa fix rlc buffer updating inside the scheduler to account for RLC headers 2020-10-30 13:35:15 +00:00
Francisco Paisana 44a9ad76f1 avoid sched_ue dangling pointer
With the sched feature that allows scheduling in TTIs
ahead of time, there is no guarantee that when
the tti arrives to generate a sched result, the stored
raw sched_ue pointers are still valid. For this reason,
I now store the rnti and check if the rnti still exists.
2020-10-22 12:42:34 +01:00
Francisco Paisana 852c31c0bc log warnings when the sched ue cfg is not valid 2020-10-22 09:59:45 +02:00
Francisco Paisana c5c7700cb7 implemented DL logical channel prioritization test for finite PBRs 2020-10-14 22:55:12 +01:00
Francisco Paisana 9b10acff06 implemented logical channel prioritization in DL scheduler 2020-10-14 22:55:12 +01:00
Francisco Paisana a761762ec8 extended cc_sched_ue fsm to account for more harmonious transition of an scell to deactivated state 2020-10-12 14:45:13 +01:00
Francisco Paisana eafc003671 Altered the way the generation of the scheduling decision for a given
TTI is made. Instead of generating one CC in each dl_sched()/ul_sched()
call, all CC decisions are generated at once. This avoids race
conditions with calls from the RRC to the MAC to configure UEs.
2020-10-12 14:04:34 +01:00
Francisco Paisana 688dda30a4 favour carriers with best channel conditions for UL grants due to SRs 2020-10-01 19:58:00 +01:00
Francisco Paisana 7e6487b6fa perform PUCCH+PRACH PRB reservation right at the start of a new TTI in the scheduler 2020-09-15 16:10:50 +01:00
Ismael Gomez 38e2ffe414 Use Format1A when using CA and 15 PRB due to DCI size ambiguity 2020-09-03 10:45:06 +02:00
Ismael Gomez a4835dd2c8
More accurate MCS reduction when PUSCH carries UCI (#1630) 2020-08-25 22:30:35 +02:00
Francisco Paisana 20b69fb22e substitution of ul_alloc_t for prb_interval 2020-08-14 15:06:06 +01:00
Francisco Paisana 26f46ea067 add S1 Handover Request handling in target eNB 2020-08-14 14:28:56 +01:00
Francisco Paisana caf862c99f moved expected, bounded_bitset, move_callback to adt folder. created a test for bitset 2020-08-13 13:13:34 +01:00
Francisco Paisana 35fa5346b9 only reduce mcs if the current tti requires uci 2020-07-21 10:51:11 +01:00
Francisco Paisana 58c4bcf288 reduce mcs for UL grants carrying UCI 2020-07-21 10:51:11 +01:00
Francisco Paisana 5e06430455 removal of stack handler interface 2020-07-13 11:19:25 +01:00
Francisco Paisana 039977aeb5 renamed interfaces 2020-07-13 11:19:25 +01:00
Francisco Paisana 7ab4b5f723 fix long bsr handling 2020-06-29 17:31:07 +01:00
Francisco Paisana af58597647 fix mac tb building in scheduler 2020-06-29 17:31:07 +01:00
Francisco Paisana cb7f620254 created separate class to manage bearers buffers/status reports in the scheduler 2020-06-29 17:31:07 +01:00
Francisco Paisana 2cb80f9bf3 remove rnti in mac/phy in staged manner. First the "upper mac", and then the "lower mac" and phy 2020-06-26 11:59:06 +01:00
Ismael Gomez 493b7ea2da Remove SNR threshold based link failure detection 2020-06-25 22:57:31 +02:00
Francisco Paisana 64e8f5e3ed update license year 2020-06-18 12:41:54 +01:00
Andre Puschmann a1d64c1efe enb: improve error message when RAR cannot be sent 2020-06-12 21:37:10 +02:00
Francisco Paisana 3c2e3dbdbf added latest mac nr updates 2020-06-11 15:50:36 +01:00
Francisco Paisana d859c33035 added check for UCI collision during DL scheduling for CA 2020-06-10 22:22:41 +01:00
Francisco Paisana 53b85691b5 moved sf result to sched class. This way each carrier has a view to the results of the remaining carriers in the same subframe 2020-06-10 22:22:41 +01:00
Francisco Paisana 5d33acdb53 changed name of sched_ue_carrier class 2020-06-10 22:22:41 +01:00
Francisco Paisana 92c4b3f226 fix non-final sdap/mac/rlc dtor error 2020-06-05 15:10:11 +01:00
Francisco Paisana 9a0ea6e08c use log_helper for log macros 2020-05-26 10:02:08 +01:00
Francisco Paisana edba7f57e4 corrected mac_nr_pdu includes 2020-05-26 10:02:08 +01:00
Francisco Paisana d7b35ba7d1 added nr mac 2020-05-26 10:02:08 +01:00
Andre Puschmann a0e4b18507 enb_mac: pre-allocate UE object for quicker PRACH/RAR handling
we've seen long delays in handling PRACH on low-power devices
such as the RPi4. This was mainly caused by long delays
in creating the UE object on the fly during PRACH handling.

This patch pre-allocates one UE object that is then used
during the PRACH.
2020-05-25 13:12:19 +02:00
faluco 7ff251f112 - Fixed warnings caught by Clang 9.0.0 2020-05-07 10:10:24 +02:00
Francisco Paisana 500a7f6357 created new separate ue class in sched tester to handle acks and harq tests 2020-05-05 14:35:40 +01:00
Francisco Paisana b8e6ba02e4 remove warnings related to unused vars and fwd declarations with trivial dtors 2020-04-27 22:19:08 +01:00
Francisco Paisana df06443470 use c++ variadic template instead of variadic function 2020-04-27 22:19:08 +01:00
Francisco Paisana 367a190829 created dl-sch lcid type 2020-04-24 11:55:53 +01:00
Francisco Paisana 0526ae8ab1 updated rrc mobility parsing. added some utility methods 2020-04-22 12:57:11 +01:00
Francisco Paisana 20f6655c6b use common method to build mac pdu. allow CE allocations in dci format2/2a 2020-04-22 11:34:08 +01:00
Francisco Paisana 64557740fc use mac_buffer_state interface to schedule CEs in scheduler 2020-04-22 11:34:08 +01:00
Francisco Paisana ec94819f08 changed mechanism for conres ce scheduling to be controlled by rrc 2020-04-22 11:34:08 +01:00
Francisco Paisana d716d8bf7e use mini state machine for ConRes CE scheduling instead of relying that there is data in the DL buffer 2020-04-22 11:34:08 +01:00
Francisco Paisana d183d64409 added allocate_rnti method to mac. Useful both during PRACH and handover UE resource allocation 2020-04-22 11:34:08 +01:00
Francisco Paisana 6ddedd5972 moved pdu to common mac folder 2020-04-22 10:06:08 +01:00
Xavier Arteaga 5b7493cab5 Added 256QAM modulation tables to scheduler 2020-04-10 17:48:53 +02:00
Xavier Arteaga 8b265883e4 SRSENB: UL TA measurement waits for a start order before start measuring 2020-04-10 15:57:41 +02:00
Francisco Paisana c661025cda fix log tti, and print a warning when the ul_harq tti does not match existing ones 2020-04-01 15:02:21 +01:00
Ismael Gomez 7a7385d0e5 Support multiple carriers for common buffers (RAR/BCCH/PCCH) 2020-03-24 16:47:33 +01:00
Francisco Paisana a2866f661b made the number of ue payload allocations proportional to number of active carriers. Made mac::ue_db use unique_ptrs 2020-03-23 14:49:17 +00:00
Francisco Paisana 8772d8f85c use byte buffer pool for the ue tx_payload_buffer allocation. This halves the mac::ue object creation time 2020-03-23 14:49:17 +00:00
Francisco Paisana 82cb6baef0 now the whole ue and enb mac uses the logmap 2020-03-20 11:32:03 +00:00
Francisco Paisana 807d177b47 fix hanging issue, and simplified the handling of minRBG for different CFIs 2020-03-17 22:06:37 +00:00
Francisco Paisana ede09cb9b2 added dynamic CFI capability to the eNB scheduler 2020-03-17 22:06:37 +00:00
Xavier Arteaga ada8772f57 Initial srenb TA compensation 2020-03-17 17:21:43 +01:00
Ismael Gomez cf4f4508ce Normalize throughput in CSV/stdout metrics with respect to number of TTIs 2020-03-16 22:58:09 +01:00
Ismael Gomez 858165f177
Allocate a different PDU buffer for each carrier in MAC eNodeB (#1069) 2020-03-16 13:35:03 +01:00
Xavier Arteaga e832769ae6 Updated copyright 2020-03-16 11:26:06 +01:00
Francisco Paisana 5330249625 created tti_point type and unit test. Added also the tti_point to the scheduler harqs, and rrc procedure 2020-03-13 19:20:40 +00:00
Francisco Paisana 4217dba7e0 fix msg3 delayed allocation and update test 2020-03-13 08:30:42 +01:00
Francisco Paisana d18b476e37 use utility macro for printing function name 2020-03-12 11:11:20 +00:00
Francisco Paisana 9b4a0baa87 activate scells in the phy 2020-03-11 21:56:33 +01:00
Francisco Paisana 7548402632 change scell activation interface to use arrays. Added a method to the scheduler to get the current set of activated carriers 2020-03-11 21:56:33 +01:00
Xavier Arteaga 76408b195e Rename TX_DELAY and FDD_HARQ_DELAY_MS 2020-03-11 21:16:36 +01:00
Andre Puschmann a8acd235f6 extend eNB MAC to support multiple CC per UE
- add tx/rx softbuffers for each CC that a UE might have
- make sure to call assign correct buffers when iterating
  over the CC for UL/DL grant assignment
2020-03-11 10:16:23 +01:00
Francisco Paisana a744729007 use range of rbgs 2020-03-10 22:06:07 +00:00
Francisco Paisana 46579da1ff use signed integer to express the error 2020-03-10 22:06:07 +00:00
Francisco Paisana bcbb08ebae use initial_dl_cqi for first DL tx. 2020-03-10 22:06:07 +00:00
Francisco Paisana 3b937348a2 refactored some sched util methods 2020-03-10 22:06:07 +00:00
Francisco Paisana fad897cb35 DL scheduler metric now takes into account the min and max of RBGs possible. This is to forbid segmentation of SRB0 allocations 2020-03-10 22:06:07 +00:00
Francisco Paisana 6317750de2 fix computation of ranged of allowed sched dl bytes 2020-03-10 22:06:07 +00:00
Francisco Paisana 414259e83b fix allocation expected alloc bytes (min and max) 2020-03-10 22:06:07 +00:00
Francisco Paisana e62972d38e fix fdd delays in scheduler 2020-03-10 14:17:49 +01:00
Andre Puschmann 2edecea33e fix SIB transmission for CA
Avoid double buffering of SIBs in MAC as this would require one buffer for each CC.
Instead, use byte_buffer managed by RRC that contains packed SIBs to avoid
double memcpy for each SIB tx. Only use MAC provided buffer in error case.

Also avoid MAC calling RLC for each SIB and call RRC directly.
2020-03-09 14:18:09 +01:00
Andre Puschmann 120ad76c63 refactor cell param handling and fix SIB transmissions
- move cell specific eNB params to cell list in rr.conf
- make sure DL EARFCN and DL freq can be used to manually overwrite a single cell config
- fix SIB packing and transmission for multi cell configs
- introduce cell list to MAC
- adapt default enb.conf.example and rr.conf.example
2020-03-06 16:20:44 +01:00
Xavier Arteaga da701cd82b SRSENB: Added PUSCH TA and EVM measurement. Some more PHY cleanup. 2020-03-06 13:58:49 +01:00
Francisco Paisana ec1f1cc677 remove const_casts from scheduler. Fix ODR issue 2020-03-05 20:23:07 +00:00
Francisco Paisana e9a599857a created a header for all common structs and helper functions 2020-03-05 20:23:07 +00:00
Francisco Paisana 02ccb8b32b fix wrong calculation of sched tx and rx delays 2020-03-05 20:23:07 +00:00
Andre Puschmann 664170fec6 pcap: add CC index when writing PCAP 2020-03-05 20:46:14 +01:00
Francisco Paisana 43e67b8536 created a harq entity that handles all harq procs. This entity accepts as arg the number of harq procs. 2020-03-05 17:51:33 +00:00
Francisco Paisana 1c041b2c1d created harq entity class 2020-03-05 17:51:33 +00:00
Francisco Paisana 7e840bde86 fix tb idx assignment in scheduler mac sdu alloc 2020-03-05 12:18:05 +00:00
Francisco Paisana d1356568e0 separated sf sched result from sf_sched class. The interface became way simpler. No need for finish_tti() method, sf_sched::new_tti() is called automatically when we access the sf_sched. 2020-03-05 00:04:21 +00:00
Francisco Paisana bb38fa7119 fixed tti resetting after tti end 2020-03-05 00:04:21 +00:00
Francisco Paisana 47b05118ad simplified msg3 allocation. Now we can allocate resources ahead of time (e.g. msg3 is 2 ttis ahead) using the sf_sched interface. It's guaranteed that the given allocations wont be erased when the respective tti starts 2020-03-05 00:04:21 +00:00
Francisco Paisana 8f7890c60a store mask results in separate variables for testing, and reset sf_sched state at the end of the tti 2020-03-05 00:04:21 +00:00
Francisco Paisana b37d9b9930 fixed msg4 setting in sched tester 2020-03-03 21:26:17 +00:00
Francisco Paisana 3cc94c3694 simplified mutexing of the scheduler. One single mutex for everything, and removed rwlock 2020-03-03 21:26:17 +00:00
Francisco Paisana fed06138b9 moved rach_detected to stack thread. Created a more friendly interface to enqueue tasks in stack 2020-03-03 21:03:21 +00:00
Francisco Paisana ad9e126299 test for different enb_cc_idxs as pcell. Bug fixes 2020-03-02 16:33:31 +00:00
Francisco Paisana 0f3ef11f8b now the scheduler only activates a scell after receiving a valid CQI for the SCell 2020-03-02 16:33:31 +00:00
Xavier Arteaga b45223c880 Fix minor MAC Clang warnings 2020-03-02 12:19:09 +01:00
Francisco Paisana e859d622c7 added logref class to forbid logmap pointer invalidation. Created a test for the logref, and introduced it in the scheduler, rrc and nas 2020-02-28 11:33:26 +00:00
Francisco Paisana d831522692 addition of SCell Activation CE Cmd to scheduler and MAC 2020-02-14 21:49:01 +00:00
Francisco Paisana 838053e8f2 added SCell Activation CE to scheduler. Handling this CE in the MAC is still missing 2020-02-14 21:49:01 +00:00
Xavier Arteaga 385102fa2d SRSENB: minor format, renaming and interface changes 2020-02-13 10:29:00 +01:00
Xavier Arteaga 231431f569 SRSENB: enabled CA PUCCH decode in eNb 2020-02-13 10:29:00 +01:00
Xavier Arteaga 35f4e5d69a Initial PUCCH 1B with channel selection 2020-02-13 10:29:00 +01:00
Francisco Paisana c9ac42f11d renamed rlc pdu / mac sdu allocate functions, and added some comments describing what these functions do 2020-02-10 16:55:18 +00:00
Francisco Paisana 87038375d5 fixed the building of MAC SDUs in the scheduler. Now, we ensure there is always space for the MAC subheader and RLC header. The MAC subheader is correctly discounted from the remaining bytes in a TB. 2020-02-10 16:55:18 +00:00
Francisco Paisana c8fc0d91b3 changed the supported cc list to a vector of structs 2020-02-07 15:06:46 +00:00
Francisco Paisana 42b15c7bed use common ue_cfg interface to set the ue antenna info 2020-02-07 15:06:46 +00:00
Francisco Paisana 5f557700f2 changed the sched::ue_cfg(...) function to allow diff configurations. The RRC now activates all carriers after rrc reconf complete 2020-02-07 15:06:46 +00:00
Francisco Paisana b66bc3a6b0 create a sched_interface struct for antenna info dedicated. This way we remove the asn1 as a dependency in the scheduler 2020-02-07 15:06:46 +00:00
Francisco Paisana 88a22e7dbf support cc cfg from rrc 2020-02-07 15:06:46 +00:00
Francisco Paisana 095d0cda5a fix regs leak 2020-02-07 15:06:46 +00:00
Francisco Paisana e86862611c update the scheduler interfaces to accommodate the configuration of multiple carriers 2020-02-07 15:06:46 +00:00
Francisco Paisana 2dc31ea440 added interface to configure multiple cells from the RRC 2020-02-07 15:06:46 +00:00
Francisco Paisana c537d38650 separated sched tests based on output into a separate file. Added scheduler random tester to unit tests 2020-01-29 17:15:35 +00:00
Francisco Paisana a9b8c3fd55 fix msg3 prb limit for prb==6. It has to collide with PUCCH 2020-01-28 17:15:23 +00:00
Francisco Paisana 39fff9ed68 fix potential bug with grouping of RARs with same RA-RNTI but different prach_tti. The scheduler might not clear the old tti on time before the grouping. 2020-01-28 17:15:23 +00:00
Francisco Paisana de195e9521 changed the RAR schedule to support the allocation of nof_grants lower than the current nof_grants in the queue with same ra-rnti 2020-01-28 17:15:23 +00:00