Commit Graph

901 Commits

Author SHA1 Message Date
Xavier Arteaga caf7b514a0 Avoid TTI initial magic number 2020-03-13 14:01:58 +01:00
Xavier Arteaga 5af89513eb use double precission for frequency in srsue and srsenb 2020-03-13 14:01:58 +01:00
Xavier Arteaga 834a081c09 Add EPRE measurement to PUSCH decoder 2020-03-13 14:01:58 +01:00
Francisco Paisana 567790c1a2 Renamed struct to store cell context in rrc. Moved sib buffers to this struct. Created helper methods for lookup 2020-03-13 11:46:12 +00:00
Francisco Paisana fe3195bb27 add default pcell to ue_cfg in RRC 2020-03-13 11:46:12 +00:00
Francisco Paisana ce03971ca0 fix rrc_mobility_test 2020-03-13 11:46:12 +00:00
Francisco Paisana 349aed5e0d use sib configuration to set SCellToAddModList 2020-03-13 11:46:12 +00:00
Andre Puschmann 764c912977 fix a few more displaying issue in the stdout metrics 2020-03-13 11:34:32 +01:00
Francisco Paisana 4217dba7e0 fix msg3 delayed allocation and update test 2020-03-13 08:30:42 +01:00
Ismael Gomez e8b8c9922e
Add RF per-channel frequency band constraints (#1026) 2020-03-12 23:06:09 +01:00
Andre Puschmann 2f8643fb97 add tx/rx pkt ok/nok to enb metrics, also add enb metrics test
This is what it'll look like if running the new test:

------DL--------------------------------UL-------------------------------------
rnti cqi  ri mcs brate   ok  nok  (%)  snr  phr mcs brate   ok  nok  (%)    bsr
  46  16 1.5  28 15.2G 1000 1000 100% 14.2 12.0  20 15.2M   50   10  20%  100.0
ffff 1.2 1.5 6.2 1.00M  100   54  54% 22.2 99.1  28 1.00k   50   10  20%  100.0
2020-03-12 21:43:36 +01:00
Andre Puschmann 074ffbbb1d remove braces and reformat code 2020-03-12 21:04:15 +01:00
Andre Puschmann a95605a8a2 trim log name for eNB 2020-03-12 21:04:15 +01:00
Andre Puschmann f14697cdaa schedule PMI for SCells right after PCell, disable SRS for SCells 2020-03-12 21:04:15 +01:00
Andre Puschmann fdb7b0fa41 fix simple typo 2020-03-12 20:55:47 +01:00
Andre Puschmann 111aa6fc46 add SIB3 definition and enable in SI scheduling
SIB3 contains common cell re-selection information for intra, inter and intra-RAT cell reselection
2020-03-12 20:55:47 +01:00
Andre Puschmann 90beda34a1 fix parsing of optional field in SIB3 2020-03-12 20:55:47 +01:00
Andre Puschmann c534ee2b55 fix SCell packing in RRC reconfig 2020-03-12 12:22:41 +01:00
Andre Puschmann 0e4f97d1a0 fix bug in MAC where new PHY RNTI was always registered for enb_cc_idx==0 2020-03-12 12:22:41 +01:00
Andre Puschmann ab210c5f3c tiny cosmetic changes to the error messages printing 0x and clear cc_idx use 2020-03-12 12:22:41 +01:00
Andre Puschmann b7aad27d86 move packing of SCell list into extra method and add fill PHY config on the spot
previously we've packed the RRCReconfig with SCellToAddMod list and have then
parsed the message again to pack the PHY config dedicated for the new SCell carrier. This
is now done in one step.
2020-03-12 12:22:41 +01:00
Francisco Paisana d18b476e37 use utility macro for printing function name 2020-03-12 11:11:20 +00:00
yagoda f09c8324eb adding success/error macros in scheduler.cc 2020-03-12 11:11:20 +00:00
yagoda bfa451559b adding error logs to some scheduler function calls to ue_db to add clarity 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 c42cb92784 Fix srsENB PHY stop 2020-03-11 21:17:13 +01:00
Xavier Arteaga 76408b195e Rename TX_DELAY and FDD_HARQ_DELAY_MS 2020-03-11 21:16:36 +01:00
Xavier Arteaga 442926cf66 Fix enb_phy_test deadlock 2020-03-11 12:08:24 +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
Pedro Alvarez 96c82b3fc6 Moved PDCP configs to pdcp_config.h. Added `as_security_cfg_t` structure to hold access stratum keys.
Refactored PDCP, RRC and USIM accordingly.
2020-03-11 09:00:38 +00:00
Francisco Paisana dc8dca2a08 fix namespace-related compilation error 2020-03-10 22:06:07 +00: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 9ad80ee29f added initial_dl_cqi to the enb rr.cfg parser 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 ab69c6fe43 account for delays in RAR tx in scheduler CA tester 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 698899d309 added scells to enb rrc reconf message 2020-03-10 21:32:16 +01:00
Xavier Arteaga d585cf14f3 SRSENB: phy_ue_db returns default configuration for non User C-RNTI 2020-03-10 20:51:24 +01:00
Xavier Arteaga 47b7c1b72b SRSENB: remove assert macros from phy_ue_db.cc 2020-03-10 20:51:24 +01:00
Andre Puschmann f2e1bfa699 refactor naming for s/p/cell structs and {enb,ue}_cc_idx 2020-03-10 15:01:00 +01:00
Francisco Paisana 639f473042 fixed unsigned signed comparison 2020-03-10 14:17:49 +01:00
Francisco Paisana 1e63fa41cf made ue_cc_idx int to set to -1 for rar and bc allocs 2020-03-10 14:17:49 +01:00
Francisco Paisana f3c3c52fcd added ue_cc_idx to dci allocation 2020-03-10 14:17:49 +01:00
Francisco Paisana e62972d38e fix fdd delays in scheduler 2020-03-10 14:17:49 +01:00
Xavier Arteaga 04b3416d87 Remove auto for u16 2020-03-10 09:19:54 +01:00
Xavier Arteaga 5311c37429 SRSENB PHY: check RNTI type before requesting configuration 2020-03-10 09:19:54 +01:00
Xavier Arteaga 002a68e183 SRSENB: hard-coded parametrized PUCCH DMRS correlation threshold 2020-03-10 09:19:54 +01:00
Xavier Arteaga 385cc8ecd8 tweaked I_offset_ack in enb_phy_test 2020-03-10 09:19:54 +01:00
Xavier Arteaga 64caa4321b Fix UL control decoding. Some minor aesthetic changes. 2020-03-10 09:19:54 +01:00
Pedro Alvarez 8c58d1054a Changed pcap.mac_enable back to pcap.enable in eNB. 2020-03-09 17:35:10 +00:00
Pedro Alvarez 08a4ce0970 Added the ability to save S1AP pcaps at the eNB. 2020-03-09 17:35:10 +00: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
Pau Espin 91a5d1a74e gtpu: Log bind failure cause 2020-03-09 11:08:12 +01:00
Andre Puschmann 73feeaeba9 make UL earfcn optional in cell list 2020-03-06 17:57:26 +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
Ismael Gomez 4e12405fff
Remove radio_multi class and organize channels, ports and carrier buffers (#1019) 2020-03-06 15:26:48 +01:00
Xavier Arteaga ecb22600ff improved eNb PHY test scheduler 2020-03-06 13:58:49 +01:00
Xavier Arteaga 89a672a585 SRSENB: fix UE phy dB defect for SCell Index 2020-03-06 13:58:49 +01:00
Xavier Arteaga 84dd9911ca eNb PHY test uses only Aggregation level 0 2020-03-06 13:58:49 +01:00
Xavier Arteaga 0d6694d5e6 Improvement in eNb PHY test 2020-03-06 13:58:49 +01:00
Xavier Arteaga 5c689ed4c4 SRSENB: minor aesthetic change 2020-03-06 13:58:49 +01:00
Xavier Arteaga 8eb96747ab SRSENB: Minor RAR RNTI fix 2020-03-06 13:58:49 +01:00
Xavier Arteaga da701cd82b SRSENB: Added PUSCH TA and EVM measurement. Some more PHY cleanup. 2020-03-06 13:58:49 +01:00
Pedro Alvarez bb9ff82490 Remove enb singleton and make sure log is initialized. 2020-03-06 13:05:25 +01:00
Pedro Alvarez bd3598f774 Moved srsEPC to the new S1AP library. Deleted liblte_s1ap.cc and liblte_s1ap.h. 2020-03-06 11:57:07 +00:00
Xavier Arteaga a61ff0b0fc SRSENB cleanup phy common 2020-03-06 12:24:28 +01:00
Xavier Arteaga cac2ee33b6 SRSENB: PHY uses tti_semaphore class instead of normal semaphores 2020-03-06 12:24:28 +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 73c8b02820 enb: loop over CC in MAC 2020-03-05 20:46:14 +01:00
Andre Puschmann 664170fec6 pcap: add CC index when writing PCAP 2020-03-05 20:46:14 +01:00
Andre Puschmann 33a410bda4 fix parsing of DL/UL earfcn in cell config
using a single earfcn or dl_freq value that gets set by default
in the [rf] section doesn't make sense in a enb config with more
than 1 cell, so we should actually remove the earfcn/freq setting in [rf]
and only configure the radio through the values in the cell list in rr.cfg
2020-03-05 20:46:14 +01:00
Andre Puschmann 87f1b2a939 catch exceptions from eNB config parser
since the eNB config gets more complex, especially with CA,
we need to catch potential parsing errors from libconfig,
print an error with the position of the error and gracefully
stop the enb
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
Andre Puschmann dfb1cd1361 temporarily disabling enb_phy_test_1cell until it is fixed 2020-03-05 14:47:07 +01:00
Francisco Paisana 9f266161cf increase tbs until allocation is big enough to fit MAC subheader and RLC header 2020-03-05 12:47:43 +00:00
Ismael Gomez 1f3aee2fc0 Fix incorrect parameters 2020-03-05 13:26:16 +01: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
Pedro Alvarez afc209711c Fix jump depending on uninitialized variable in srsenb::sched_ue::set_bearer_cfg_unlocked 2020-03-04 22:03:17 +01:00
Francisco Paisana 5bdc603113 added error macros 2020-03-03 21:26:17 +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 7210c35c6c checked all methods of srsenb::pdcp to see if they are called by different threads. Since it is all single-threaded, I removed the locks 2020-03-03 21:03:37 +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 d10e950650 fix ue streamid assignment in s1ap 2020-03-03 21:19:09 +01:00
Andre Puschmann c79e202fd9 fix typo 2020-03-03 17:20:44 +01:00
Andre Puschmann 37c342af39 give enb_phy_tests individual names 2020-03-03 17:20:17 +01:00
Andre Puschmann a8bbe551ac move thread class into srslte namespace to avoid ambiguity between std::thread 2020-03-03 16:22:04 +01:00
Andre Puschmann 8b46f631c1 add basic TTI stats in stack 2020-03-03 16:22:04 +01: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
Francisco Paisana f571b7c16b cleaned up some of the log error messages in the sched tester 2020-03-02 16:33:31 +00:00
Francisco Paisana c595696ec2 no need for a separate class for the CA tester 2020-03-02 16:33:31 +00:00
Francisco Paisana b44754f0ae the CA and random sched testers now use same structs and common interface. 2020-03-02 16:33:31 +00:00
Francisco Paisana 385fa226e0 started to use a type-safe tti counter for comparisons. Uniformized the common_sched_tester api. Next, need to use the same struct to register events. 2020-03-02 16:33:31 +00:00
Francisco Paisana 518f813f13 now the CA testing generation and simulation happen simultaneously. This way we can do more tti/event specific checks 2020-03-02 16:33:31 +00:00
Francisco Paisana b319f8dfcd created first version of CA test. Now we need to create actual asserts 2020-03-02 16:33:31 +00:00
Francisco Paisana 507bc2d2a2 created a test for CA. Currently is quite empty 2020-03-02 16:33:31 +00:00
Xavier Arteaga 2c534c9059 Correction of TX_DELAY and FDD_HARQ_DELAY_MS uses in srsenb PHY 2020-03-02 12:19:09 +01:00
Xavier Arteaga ae6f52bf0b Fix CLang Warnings in PHY eNb Test 2020-03-02 12:19:09 +01:00
Xavier Arteaga 0556dea01a Refactored eNb PHY test to accept arguments and added unit test 2020-03-02 12:19:09 +01:00
Xavier Arteaga 9a54930430 Minor log messages and dynamic number of buffer allocation 2020-03-02 12:19:09 +01:00
Xavier Arteaga 2a6f54e13f SRSENB: phy method cleanup and CLang tidy warning fixes 2020-03-02 12:19:09 +01:00
Xavier Arteaga 4c61ffd391 SRSENB: set UE common PHY configuration in RRC::UE constructor 2020-03-02 12:19:09 +01:00
Xavier Arteaga 5893f66364 SRSENB: fixes, srsUE attaches srsENB 2020-03-02 12:19:09 +01:00
Xavier Arteaga b45223c880 Fix minor MAC Clang warnings 2020-03-02 12:19:09 +01:00
Xavier Arteaga f35ed14f76 SRSENB: refactored PHY common UE database 2020-03-02 12:19:09 +01:00
Xavier Arteaga 2fc0832f05 Addition of DL HARQ-ACK generation procedure for eNb DL and minor aesthetic changes 2020-03-02 12:19:09 +01:00
Andre Puschmann dc8c5687c6 fix rwlock in PDCP
we've used a rdlock but since the users struct is modified, we should be
really using a rwlock
2020-03-01 18:26:45 +01:00
Andre Puschmann 9e113f8b27 pdcp: allow to configure security for rx/tx seperately
previously PDCP security (integrity and ciphering) could only
be enabled for both Rx and Tx at the same time.

this, however, caused an issue during the conformance testing in which,
in TC_8_2_1_1() for example, the eNB sends a SecModeCommand and a
RRC Reconfiguration in the same MAC TB. In this case, the eNB
needs to be able to enable DL security right after sending the SecModeCmd
in order to send the RRCReconfig encrypted. However, enabling UL security needs
to be postponed until after the SecModeComplete is received.

This patch allows to enable PDCP security for rx/tx independently if
that is needed. The default way is like before, enabling it for tx/rx at
the same time.
2020-03-01 18:26:45 +01:00
Francisco Paisana ac52208409 removed most of clang-tidy warnings, introduced logmap in asn1, fixed info object naming in s1ap and ngap for successful and unsuccessful outcomes 2020-02-28 18:03:29 +00: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 b8b8740258 fix wraparound in si proc and error in scell parsing 2020-02-28 10:08:01 +01:00
Francisco Paisana 052892916e fix mme/enb id assignment. Also, now using the macro for invalid rnti and a boolean flag for the uninitialized mme s1ap id 2020-02-26 15:17:45 +00:00
Francisco Paisana 2f57db5352 changed invalid rnti to 0 2020-02-26 15:17:45 +00:00
Francisco Paisana 7557ef45c8 changed the s1ap to allow the insertion of users without rnti 2020-02-26 15:17:45 +00:00
Francisco Paisana c29f08d8d5 refactored si acquisition procedure to use stack timers. Also created an interface that is going to be used for the task/timer handling 2020-02-20 20:48:36 +01:00
Ismael Gomez a5b7dcdf16
Remove boost string (#936)
* Remove boost string

* Make sure that int/enc algos can be specified in capital case in the MME.

* Use == instead of compare for comparing strings with const chars

Co-authored-by: Pedro Alvarez <pedro.alvarez@softwareradiosystems.com>
2020-02-16 21:32:49 +01:00
Francisco Paisana 42449b079a now the scell_activation CE is only for 1 octet. The 4 octet one is not yet supported. 2020-02-14 21:49:01 +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
Francisco Paisana a0407dd6f7 created a lock guard for pthread rwlocks. This will avoid using gotos in many cases, and the RAII technique avoids many accidents. 2020-02-14 14:53:57 +00:00
Xavier Arteaga 385102fa2d SRSENB: minor format, renaming and interface changes 2020-02-13 10:29:00 +01:00
Xavier Arteaga bf4ecc8064 Fix srsenb PHY and unit/component tests 2020-02-13 10:29:00 +01:00
Xavier Arteaga f9c3dd2748 more fixes in the srsenb 2020-02-13 10:29:00 +01:00
Xavier Arteaga 5dbc96458a Sets PUCCH decode threshold as macro 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 73c63b10f2 Fix compilation of dummy classes 2020-02-13 10:29:00 +01:00
Xavier Arteaga db9cd1683a SRSENB: improved phy test 2020-02-13 10:29:00 +01:00
Xavier Arteaga fd29944bf9 [Temporal] Disabled by default enb phy test 2020-02-13 10:29:00 +01:00
Xavier Arteaga 3f5c270fce SRSENB: added initial component PHY test 2020-02-13 10:29:00 +01:00
Xavier Arteaga 40772eae19 SRSENB: UE PHY dedicated takes a flat configuration structure 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 089f72d573 ensure minimum tbs. If it cant do it, increase mcs until it can. 2020-02-10 16:55:18 +00:00
Andre Puschmann cccabdaf4f removing unneeded install targets for static libs (reported by Filipe) 2020-02-10 17:38:42 +01: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